Commit Graph

241 Commits

Author SHA1 Message Date
Maxime Coste
0244112af4 Add support for hidden commands, that will not show on completion 2013-11-12 19:38:19 +00:00
Maxime Coste
5a4650aecc Add support for hidden options, not showed by completion
the decl command can take a -hidden parameter to hide an option
2013-11-12 19:21:07 +00:00
Maxime Coste
7495d04a47 Add support for -itersel option in exec/eval
-itersel makes a -draft eval/exec run once for each selections
separately rather than with all selections at a time.
2013-11-05 23:50:44 +00:00
Maxime Coste
02312fe5ff Allow to ommit the catch part in the try command 2013-11-04 22:02:44 +00:00
Maxime Coste
471aeaab9a remove filters, use hooks instead 2013-11-04 22:02:44 +00:00
Maxime Coste
3e1bb777ce Add automatic completion display in prompt mode
Controlled by the autoshowcompl option
Completers now take a CompletionFlag parameter, used to specify
we want fast completion (tag completion can be slow, we do not
want to run it if not explicitely wanted by the user).
2013-11-04 21:59:28 +00:00
Maxime Coste
feff965ac6 Remove setg/setb/setw and use set <scope>
(with scope a prefix of global,buffer or window)
2013-10-30 09:38:40 +00:00
Maxime Coste
2c09da50be Add key mapping support 2013-10-25 00:30:46 +01:00
Maxime Coste
77ac777526 use prefix matching for hook scope 2013-10-25 00:00:44 +01:00
Maxime Coste
44281c8fed More robust Buffer filesystem timestamp handling 2013-10-17 18:47:09 +01:00
Maxime Coste
3c959cee99 Pass title to UserInterface::info_show
Move unicode box generation and assistant code as
a NcursesUI implementation detail.
2013-10-11 00:17:22 +01:00
Maxime Coste
e70d75d6a6 Only redraw clients after handling all available events 2013-09-17 18:51:14 +01:00
Maxime Coste
06e06d6ea6 remove print_status from UserInterface, pass status line to draw
Client store the current status line. This way calls to print status
do not force the user interface to display directly.
2013-09-16 19:15:13 +01:00
Maxime Coste
27a1e70b01 Rework client name change 2013-09-13 00:01:47 +02:00
Maxime Coste
823812fd1a rename InputHandler to Client 2013-09-12 23:47:23 +02:00
Maxime Coste
ac7e437730 Move Client responsibilities to InputHandler
InputHandler owns it's UserInterface, and is directly stored by the ClientManager.
2013-09-12 23:39:34 +02:00
Maxime Coste
916a0cb52e Allow :exec mode changes to remains when keys are finished
Pass keys one by one to the input handler so that BatchUI is not needed
We can now use :exec to pre-fill the command line without validating
the command.
2013-09-11 18:58:23 +01:00
Maxime Coste
ef01cf71ff tolerate empty strings (interpreted as 0) as line and column parameters in edit 2013-08-28 19:05:01 +01:00
Maxime Coste
eedd37c09a memoryview: always pass by value 2013-07-26 01:50:36 +02:00
Maxime Coste
3da97c4269 decl command support bool type options 2013-07-24 22:56:21 +02:00
Maxime Coste
2a74b0e9e2 Buffer: insert and erase go back to taking iterators, and return iterators 2013-06-06 19:44:08 +02:00
Maxime Coste
245e68e26e utf8_iterators: rename underlying_iterator to base 2013-06-06 19:44:07 +02:00
Maxime Coste
6b667bc803 remove BufferIterator conversion to/from BufferCoord 2013-06-06 19:44:07 +02:00
Maxime Coste
76f55f5256 remove useless iterator_at calls 2013-06-04 14:21:07 +02:00
Maxime Coste
93dd1ff3c7 Remove begin/end from Ranges, replace with min/max
Ranges should not be utf8 aware (needed for end), and a lot of
uses for end() were in fact looking for max.
2013-05-30 13:59:38 +02:00
Maxime Coste
c3d53d588d revive str_to_int so that the good exception type is thrown on error 2013-05-17 14:09:42 +02:00
Maxime Coste
26f0fd4cc6 Use more std::* for string handling 2013-05-13 18:43:38 +02:00
Maxime Coste
8bfe2d62e5 echo: rename -col option to -color 2013-04-26 18:48:31 +02:00
Maxime Coste
681f30dd28 support renaming buffers
Changing buffer name allows to save a *make* or *grep* buffer when
launching another one for exemple.
2013-04-22 13:49:07 +02:00
Maxime Coste
21f487417b context_wrap options are allowed only at start 2013-04-17 19:10:06 +02:00
Maxime Coste
cc91a71a96 move Client as a public class instead of a ClientManager implementation detail 2013-04-15 14:28:21 +02:00
Maxime Coste
dbffcb226b echo command can take a -col parameter to specify the colors to use 2013-04-12 14:22:01 +02:00
Maxime Coste
1b5760f1a1 delete buffer if needed when creating a scratch buffer 2013-04-11 23:09:17 +02:00
Maxime Coste
107e95622d Hooks can have an (shareable) identifier, and thus be removed 2013-04-11 14:29:10 +02:00
Maxime Coste
9999e5698d Use the buffer manager to delete buffer, throw when a client is inserting 2013-04-10 18:54:01 +02:00
Maxime Coste
bdd617006b add a 'debug' command, which write to the debug buffer 2013-04-10 13:45:17 +02:00
Maxime Coste
5adee4a6a7 rename assert to kak_assert to avoid collisions 2013-04-09 20:04:11 +02:00
Maxime Coste
34b8604f90 move context implementation to context.cc 2013-04-09 19:39:03 +02:00
Maxime Coste
7b94925898 force redraw window if needed in context_wrap 2013-04-09 14:21:48 +02:00
Maxime Coste
f540566b1b UserInterface: status line messages are now DisplayLines
This add color support for the status line
2013-04-04 18:50:00 +02:00
Maxime Coste
6ffdfd7735 Add get_color helper function 2013-04-04 18:47:34 +02:00
Maxime Coste
1822b81d58 pass a color pair when displaying an information window 2013-04-04 14:04:38 +02:00
Maxime Coste
b58f614f40 Pass a fg and bg color when displaying a menu 2013-04-04 14:04:38 +02:00
Maxime Coste
0395f3b9fc fix compilation with clang++ 2013-04-03 18:51:40 +02:00
Maxime Coste
76e73866e5 ParameterParser takes flags
Only implemented flag is OptionsOnlyAtStart which considers
options given after the first positional parameter as a positional one
2013-04-02 14:22:55 +02:00
Maxime Coste
0325e7f312 minor cleanup in assist function 2013-04-02 14:03:39 +02:00
Maxime Coste
f09e24607a add support for adding to options instead of replacing 2013-03-31 14:53:32 +02:00
Maxime Coste
a80cee0d2c Add support for tuple Options, implement LineAndFlag using that 2013-03-29 19:35:48 +01:00
Maxime Coste
29f79346c3 Move parameter count validation to the ParameterParser 2013-03-27 14:27:12 +01:00
Maxime Coste
a48672b3bc factor addhl/rmhl/addfilter/rmfilter completion functions 2013-03-27 14:19:07 +01:00
Maxime Coste
996e5999ed permit do declare regex option 2013-03-26 14:26:07 +01:00
Maxime Coste
1982144b04 Add a special option type LineAndFlag, use it for FlagLines highlighter 2013-03-26 00:14:38 +01:00
Maxime Coste
9429b662ca move absolute path logic to Buffer class 2013-03-25 19:58:23 +01:00
Maxime Coste
58caeaa8a8 add a cd command 2013-03-25 19:19:44 +01:00
Maxime Coste
ce67d29871 Always use absolute path for file buffer names, compact paths for display 2013-03-25 19:11:26 +01:00
Maxime Coste
a160fd6984 open_fifo delete existing buffer if needed 2013-03-22 18:39:00 +01:00
Maxime Coste
0082238c75 use canonicalized filenames for buffers 2013-03-22 14:27:30 +01:00
Maxime Coste
5bba01ca9c BufferManager notify the ClientManager when a buffer dies 2013-03-22 14:26:44 +01:00
Maxime Coste
a2476a8fbf setb can take a -buffer argument 2013-03-22 13:44:40 +01:00
Maxime Coste
eeadb59f7f eval,exec: -restore-selections become -draft, and restore the buffer as well 2013-03-22 13:42:29 +01:00
Maxime Coste
e5d93c2194 BufferManager: replace Buffer* get_buffer with Buffer& get_buffer 2013-03-21 19:09:31 +01:00
Maxime Coste
3883bffacc user defined hooks can access the hook parameter in shell with $kak_hook_param 2013-03-20 19:11:58 +01:00
Maxime Coste
2de0d0fccf add a reg command to set a register 2013-03-18 22:44:39 +01:00
Maxime Coste
a981d41cde Editor: replace selections().back() with main_selection() 2013-03-15 18:22:08 +01:00
Maxime Coste
066876a131 add str-list option support to decl command 2013-03-14 14:11:00 +01:00
Maxime Coste
50d9c4dfda add support for regex options, make ignored_files one 2013-03-14 13:42:07 +01:00
Maxime Coste
b309d1df61 move complete_filename to file.cc 2013-03-13 19:39:38 +01:00
Maxime Coste
17f7607a30 write_buffer: consider buffer as saved only if we used it's filename 2013-03-13 18:51:36 +01:00
Maxime Coste
e4240448b1 colalias: always override 2013-03-06 20:30:02 +01:00
Maxime Coste
fb7234544e HighlightersFactories takes back a Window parameter 2013-03-06 14:27:33 +01:00
Maxime Coste
0e2ba188dc Add support for int list options, specified using a comma seperated list of int 2013-03-06 14:27:00 +01:00
Maxime Coste
fac222a427 Strongly typed options support
* non builtins options require declaration using the decl command

* At the moment, only int and string options are supported, however
the goal of this change is to provide a consistent way to support
more complex options, namely lists and booleans
2013-03-05 18:49:26 +01:00
Maxime Coste
d23694e31f Do not use a factory for window builtins highlighters
This helps cleanup up the code, as factories no longer takes
a window as parameter.
2013-03-01 19:15:05 +01:00
Maxime Coste
6318f2268f assistant: no need for raw strings 2013-03-01 14:29:28 +01:00
Maxime Coste
849f225e70 use a 16K buffer when reading from fifo 2013-02-28 18:51:11 +01:00
Maxime Coste
cd8c36fc50 Add a debug option to Makefile, and use KAK_DEBUG define to remove debug code 2013-02-27 19:02:01 +01:00
Maxime Coste
3d19111570 Use unicode box drawing character for the assistant 2013-02-26 14:28:42 +01:00
Maxime Coste
dc7227b983 Add the most important missing feature of Kakoune 2013-02-25 19:38:20 +01:00
Maxime Coste
577734dae7 expose exec_keys function in commands.hh 2013-02-18 18:57:08 +01:00
Maxime Coste
32e6184210 context_wrap: create a DynamicSelectionList only when needed 2013-02-07 19:25:07 +01:00
Maxime Coste
6c7d646d35 exec keys: push_jump if editor has changed 2013-02-07 13:35:21 +01:00
Maxime Coste
bc63be3388 open_fifo uses fcntl for more portable CLOEXEC bit setting 2013-01-30 19:08:16 +01:00
Maxime Coste
84ea452ed2 info command take a -anchor <pos> instead of -inline params 2013-01-29 18:56:14 +01:00
Maxime Coste
38a67e72bc Do not pass a context to InputHandler methods 2013-01-29 13:49:01 +01:00
Maxime Coste
94bbf47cd4 InputHandler have it's own context 2013-01-28 13:48:34 +01:00
Maxime Coste
edb5dbc56f move {exec,eval}_string common code to a helper context_wrap function 2013-01-17 14:06:06 +01:00
Maxime Coste
cedb0d18a3 exec and eval accepts a restore-selection parameter 2013-01-17 13:58:09 +01:00
Maxime Coste
621be2ceab Hooks now takes a non-const context 2013-01-17 13:45:43 +01:00
Maxime Coste
310ec1f791 move input watching responsibility into UserInterface implementations 2013-01-14 18:50:17 +01:00
Maxime Coste
79d28e68dc Refactor EventManager
Watching a file descriptor is now done using a FDWatcher object
2013-01-10 19:10:42 +01:00
Maxime Coste
4b649d386c various code style fixes 2013-01-04 18:39:13 +01:00
Maxime Coste
08fd946c07 Add a nop command to avoid accidental shell output evaluation 2013-01-03 18:52:07 +01:00
Maxime Coste
2b2474b2d1 add a force mode to delete buffer (db!) 2012-12-28 14:07:35 +01:00
Maxime Coste
43ad920bd8 menu commands has a -select-cmds option
when this option is given, menu expect three argument per entry
instead of two, the last one being the command to run when the
entry is selected, but not yet validated.
2012-12-15 19:11:22 +01:00
Maxime Coste
d208067589 InputHandler: call callback on abort and on selected element change as well 2012-12-14 19:38:11 +01:00
Maxime Coste
3184159572 info: support a -inline option
By default display info box above command line, full width
(like menu), in inline mode, display the info box close
to cursor, using only needed width.
2012-12-14 19:25:27 +01:00
Maxime Coste
9236c87842 UserInterface: add info box support
using the info command, you can display an arbitrary string
in a tooltip box.
2012-12-14 19:04:34 +01:00
Maxime Coste
d0c800a7d7 Support nested {Filters,Highlighter}Group 2012-12-09 18:58:58 +01:00
Maxime Coste
158f5a5c84 extract ParametersParser to it's own file 2012-12-07 19:20:26 +01:00
Maxime Coste
ce6e864772 'exec' and (resurected) 'eval' commands can take a '-client' parameter 2012-12-03 18:57:57 +01:00