Commit Graph

961 Commits

Author SHA1 Message Date
Maxime Coste
2195d59b49 refactoring selectors 2013-01-03 14:30:14 +01:00
Maxime Coste
4f6507b808 Highlight last selection differently 2013-01-03 14:01:34 +01:00
Maxime Coste
0045456f87 alt-n replace last selection with next match 2013-01-03 14:00:59 +01:00
Maxime Coste
02b9fcc3df Editor: add a ReplaceLast select mode 2013-01-03 14:00:31 +01:00
Maxime Coste
9fb0129061 Editor: keep last selection as last when sorting
sort selections 'circularly', keeping the last one
at the end of the list.
2013-01-03 13:59:53 +01:00
Maxime Coste
a9d5f126a0 Editor: preserve captures accross movements 2013-01-02 13:49:02 +01:00
Maxime Coste
476363bf0d Editor: cleanup check_invariants calls 2012-12-31 18:36:28 +01:00
Maxime Coste
074a21463b add a current search highlighter 2012-12-31 14:37:11 +01:00
Maxime Coste
d5582b0df4 add incsearch option to choose if incremental search is enabled 2012-12-31 14:12:00 +01:00
Maxime Coste
76c3246642 Add Editor::select(const Selection&, SelectMode) 2012-12-31 14:06:20 +01:00
Maxime Coste
4e69ec078d minor cleanup 2012-12-31 13:57:21 +01:00
Maxime Coste
18b35a3ab3 Editor: merge_overlapping -> sort_and_merge_overlapping 2012-12-31 13:56:52 +01:00
Maxime Coste
dc9635a247 Fix join on last line (it appended a trailing space) 2012-12-31 13:44:01 +01:00
Maxime Coste
fe363094cf support count in search next, and only push jump in replace mode 2012-12-31 13:42:59 +01:00
Maxime Coste
2b2474b2d1 add a force mode to delete buffer (db!) 2012-12-28 14:07:35 +01:00
Maxime Coste
cb80ae139b IncrementalInserter: fix append mode when on line end 2012-12-28 14:06:56 +01:00
Maxime Coste
28cf772deb tweak window status line format 2012-12-28 13:53:00 +01:00
Maxime Coste
9531fd5915 Buffer loses the 'New' flag when written 2012-12-28 13:52:19 +01:00
Maxime Coste
d4f155cae7 new clients always takes last used buffer, support multiple file on command line 2012-12-28 13:51:14 +01:00
Maxime Coste
8f5be9bf91 BufferManager: registering buffers are front inserted 2012-12-28 13:50:02 +01:00
Maxime Coste
030df1c4be IncrementalInserter: preserve captures 2012-12-27 19:11:42 +01:00
Maxime Coste
8bfb7da674 fix splitting with inverted selection 2012-12-27 18:56:06 +01:00
Maxime Coste
41979c91f4 Editor: when replacing, select inserted text 2012-12-27 18:54:52 +01:00
Maxime Coste
ac778c8aa2 select_matching: fix when matching is the first character 2012-12-27 13:41:45 +01:00
Maxime Coste
f3a7c76c4e add a -n option prevent kakrc from being sourced 2012-12-19 18:57:10 +01:00
Maxime Coste
2ab9b474be Client: catch errors when executing init commands 2012-12-19 18:56:47 +01:00
Maxime Coste
6c901e9152 Buffer: close undo group when saved 2012-12-19 18:56:20 +01:00
Maxime Coste
63d30a30d5 support -e switch for initial command to execute 2012-12-18 21:41:13 +01:00
Maxime Coste
26632726ad Support initial command passing when a client is connecting 2012-12-18 21:20:36 +01:00
Maxime Coste
9ca69820ac do_go: support append mode on go to top/bottom, ignore case 2012-12-18 19:12:24 +01:00
Maxime Coste
6cc4ec796e editor: support select mode on select(BufferIterator) 2012-12-18 19:12:15 +01:00
Maxime Coste
cf7e6bdd07 join: preserve multiple selections 2012-12-18 19:00:55 +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
df14427210 NCurses: info window tries to avoid the menu one 2012-12-15 19:11:04 +01:00
Maxime Coste
fd09e8a2de NCurses: some code refactoring 2012-12-15 18:32:56 +01:00
Maxime Coste
b090465e80 Command line parsing: support empty strings 2012-12-15 17:47:50 +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
8e170e4385 optimize merge_overlappings
assume selections are sorted, so we have a linear complexity algorithm
instead of O(n²).
2012-12-13 18:50:27 +01:00
Maxime Coste
3aee1c37fb perf tweak in BufferIterator 2012-12-13 18:50:27 +01:00
Maxime Coste
bf07d2576e minor refactoring in highlight_range 2012-12-13 18:50:27 +01:00
Maxime Coste
31d2cfa9a1 ctags.kak: avoid brackets in search pattern 2012-12-13 18:50:27 +01:00
Maxime Coste
1c94064713 DynamicSelectionList: derive from SelectionList
the previous implementation did not preserve invariant
either, so we'd better use less code.
2012-12-13 18:50:27 +01:00
Maxime Coste
57ad454b53 tweak cpp highlighting 2012-12-13 18:50:27 +01:00
Maxime Coste
c74b44f540 change replace char behaviour, now replace each selected chars 2012-12-13 18:50:27 +01:00
Maxime Coste
777a79d37c File completion: when no files match entered text as prefix, try as regex 2012-12-13 18:50:27 +01:00
Maxime Coste
cfd7ee049a move selection updating code out of selection, to DynamicSelectionList
this avoids a lot of unnecessary (add|remove)_change_listener as
creating temporary Selections do not call that anymore.

Use can choose between a SelectionList which or a DynamicSelectionList
depending on wethear the buffer will be modified or not during the
selections lifetime.
2012-12-13 18:50:27 +01:00
Maxime Coste
e36bc74f43 do_select: do not propagate errors on incremental search 2012-12-13 18:50:27 +01:00
Maxime Coste
892b65b355 overlaps takes Range parameters instead of Selection 2012-12-13 18:49:29 +01:00
Maxime Coste
48c9d89585 tweak git commit message highlighting 2012-12-13 18:49:29 +01:00
Maxime Coste
969a1213c4 Makefile: add a userconfig target
make userconfig takes care of creating $XDG_CONFIG_HOME/kak/autoload
and populate it with links to files in the rc directory
2012-12-13 18:49:29 +01:00
Maxime Coste
92c4a9abce Prompt: when completion has only one candidate, next tab starts a new completion 2012-12-13 18:49:29 +01:00
Maxime Coste
bc1a90d4f5 file completion: disable ignored files when entered prefix matches. 2012-12-13 18:49:29 +01:00
Maxime Coste
b63c658da5 remote.cc: move write function as member of Message 2012-12-13 18:49:29 +01:00
Maxime Coste
db3a953961 code cleanup in remote.cc 2012-12-13 18:49:29 +01:00
Maxime Coste
9230ccc087 the shell used for command execution can be changed using the 'shell' option 2012-12-13 18:49:29 +01:00
Maxime Coste
33f87db553 minor code cleanup in do_select_object 2012-12-13 13:25:39 +01:00
Maxime Coste
8223679247 select/split: check expression is not empty 2012-12-13 13:25:21 +01:00
Maxime Coste
7cc66ee64d push current selection on search 2012-12-13 13:24:38 +01:00
Maxime Coste
d0c800a7d7 Support nested {Filters,Highlighter}Group 2012-12-09 18:58:58 +01:00
Maxime Coste
7d6a48f43a ncurses.cc: handle ascii del as backspace 2012-12-09 14:31:19 +01:00
Maxime Coste
afc8ad77e8 InputHandler: tweak prefix completion behaviour 2012-12-07 19:20:26 +01:00
Maxime Coste
158f5a5c84 extract ParametersParser to it's own file 2012-12-07 19:20:26 +01:00
Maxime Coste
d25bafa95d grep.kak: configurable grep command, search selection when no params 2012-12-07 19:20:26 +01:00
Maxime Coste
c000ca2220 source user kakrc after autoloads, so that user can override options 2012-12-07 19:19:45 +01:00
Maxime Coste
ff1f9f662d cleanup {make,grep}.kak 2012-12-07 19:19:45 +01:00
Maxime Coste
b81ea0bc92 PromptHandler now call callback when edited and aborted.
Used for a new feature: incremental search
2012-12-06 13:33:26 +01:00
Maxime Coste
3438ba7ec3 *scratch* buffer use undo 2012-12-05 19:22:07 +01:00
Maxime Coste
479bb9df2c fail nicely when trying to open a directory 2012-12-05 13:59:08 +01:00
Maxime Coste
ce6e864772 'exec' and (resurected) 'eval' commands can take a '-client' parameter 2012-12-03 18:57:57 +01:00
Maxime Coste
cf39835805 add 'name' command to set current client name 2012-12-03 18:57:23 +01:00
Maxime Coste
4a3f9d6187 ClientManager: support naming clients and accessing client's context by name 2012-12-03 18:56:53 +01:00
Maxime Coste
e8df81a39d RemoteClient: call get_key soon so that it may process a resize before size change checks are done 2012-12-03 18:51:28 +01:00
Maxime Coste
8724a12dc1 NCurses: do not resize directly in signal handler, malloc may not be working there 2012-12-03 18:50:44 +01:00
Maxime Coste
9e3c1c74c5 EventManager: fix forced event processing
previous implementation could drop some forced events.
2012-12-03 18:49:09 +01:00
Maxime Coste
b23af02ec4 fix quit modified file behaviour 2012-12-03 13:33:05 +01:00
Maxime Coste
b764a0a63e Selection: refactoring, move CaptureList to Selection 2012-11-30 18:32:49 +01:00
Maxime Coste
956ac60d4a add an ignored_files regex option whose matches are not used for completion 2012-11-29 20:09:37 +01:00
Maxime Coste
33482b0979 Add configurable prompt completion behaviour
If option 'complete_prefix' is non 0, then completion first
use completion candidates common prefix, then circle through
candidates.
2012-11-29 19:56:34 +01:00
Maxime Coste
7dc634444d Fix InputMode::Prompt blocking behaviour when inserting register 2012-11-29 19:03:17 +01:00
Maxime Coste
a6f0d53dbf Remote unused Context::change_ui 2012-11-29 19:03:17 +01:00
Maxime Coste
acbe45e294 local client forks in destructor so that the kak server detaches from terminal 2012-11-29 19:03:17 +01:00
Maxime Coste
16b8f19db3 use more portable fcntl method for FD_CLOEXEC bit, enable it on forgotten sockets 2012-11-29 18:55:08 +01:00
Maxime Coste
0955ef5eb0 add an empty buffer unit test 2012-11-28 20:10:49 +01:00
Maxime Coste
3a4859ecba ncurses: avoid refering to dead NCursesUI in signal handler 2012-11-27 18:54:27 +01:00
Maxime Coste
4c1b48e314 InputHandler: InputModes no longer die directly on mode change, they survive until end of on_key 2012-11-27 18:52:43 +01:00
Maxime Coste
dc268758dd fix cpp indent filter 2012-11-27 14:03:21 +01:00
Maxime Coste
6ca530b5cc EventManager: refactor (again) 2012-11-27 13:57:03 +01:00
Maxime Coste
f1b15ef86b fix buffer creation on empty file 2012-11-27 13:39:35 +01:00
Maxime Coste
557128b641 IncrementalInsert::move_cursors: use overloaded for LineCount/CharCount editor implementation 2012-11-26 19:38:07 +01:00
Maxime Coste
cad4d3c01e fix InsertMode::OpenLineBelow behaviour in prepare_insert 2012-11-26 19:24:38 +01:00
Maxime Coste
cee0a2d128 Append on end of line now appends to current line 2012-11-26 19:23:50 +01:00
Maxime Coste
e77ca7a4be minor code simplification 2012-11-26 18:50:34 +01:00
Maxime Coste
91d2cc38e5 EventManager: avoid erasing an event handler while it may be in use 2012-11-26 14:08:27 +01:00
Maxime Coste
52ee8b46ae fix crlf file reading 2012-11-26 13:36:43 +01:00
Maxime Coste
84db1e2b8c Editor: fix replacement beheviour just before end of line 2012-11-23 19:13:47 +01:00
Maxime Coste
dca05ecc73 small code tweak 2012-11-23 18:48:04 +01:00
Maxime Coste
9c99c238e8 rewrite file opening code using mmap, opening big files is much much faster 2012-11-23 18:43:10 +01:00
Maxime Coste
c32a7b9b74 Buffer takes a vector of lines as initial content 2012-11-23 18:42:07 +01:00