Commit Graph

1456 Commits

Author SHA1 Message Date
Maxime Coste
fb7234544e HighlightersFactories takes back a Window parameter 2013-03-06 14:27:33 +01:00
Maxime Coste
558f32d2d5 throw a runtime error when a wrong type is requested for an option 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
3e7344fb14 remove commented line in ncurses.cc 2013-03-05 19:35:40 +01:00
Maxime Coste
ca1d957829 fix ignored_files default value 2013-03-05 19:35:40 +01:00
Maxime Coste
e5dc850274 log to debug when make_regex_ifp catch a regex_error 2013-03-05 19:35:39 +01:00
Maxime Coste
0c4eb7a861 simplify how string -> option conversion are written, free functions instead of template specialization 2013-03-05 19:35:39 +01:00
Maxime Coste
09cf5acb23 Add support for boolean options 2013-03-05 19:03:42 +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
a36befd653 Use colors instead of underline to highlight selections 2013-03-01 19:31:14 +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
8ef79c41bd show_line_numbers does not need a window 2013-03-01 14:30:30 +01:00
Maxime Coste
6b812d9f6c Window: segregate builtins highlighters from the others 2013-03-01 14:29:59 +01:00
Maxime Coste
6318f2268f assistant: no need for raw strings 2013-03-01 14:29:28 +01:00
Maxime Coste
3a60e633a4 safe_ptr have no overhead when KAK_DEBUG is not defined 2013-02-28 18:54:15 +01:00
Maxime Coste
298926a16e Editor::multi_select: reserve some vector space in advance 2013-02-28 18:51:58 +01:00
Maxime Coste
161e32e137 fix warning 2013-02-28 18:51:24 +01:00
Maxime Coste
849f225e70 use a 16K buffer when reading from fifo 2013-02-28 18:51:11 +01:00
Maxime Coste
26826b981d grep: highlight columns when present 2013-02-27 23:50:57 +01:00
Maxime Coste
9f9ad58b39 utf8::dump uses a copy of the output iterator instead of a reference 2013-02-27 23:50:33 +01:00
Maxime Coste
8e07e00f18 ShellManager: remove unneeded end of lines when writing stderr 2013-02-27 21:31:48 +01:00
Maxime Coste
72531f2df0 string: remove unneeded headers 2013-02-27 21:26:12 +01:00
Maxime Coste
9ea11394bc reorganize keymap 2013-02-27 21:21:11 +01:00
Maxime Coste
771241ad97 use 'Q' for replay macro 2013-02-27 21:13:06 +01:00
Maxime Coste
4ad8941563 Editor: fix move_selection(LineCount) when current column is after next line end 2013-02-27 21:09:48 +01:00
Maxime Coste
8606fdae5d NCurses: go back to non ncursesw/ headers 2013-02-27 21:05:17 +01:00
Maxime Coste
43bc8314fb ParameterParser: refactoring, simplify 2013-02-27 20:51:44 +01:00
Maxime Coste
09901d455e Add 'gf' (goto file) functionality 2013-02-27 19:58:38 +01:00
Maxime Coste
99475f93d9 String: add rbegin/rend methods 2013-02-27 19:58:24 +01:00
Maxime Coste
f82a2e22a1 Containers utils: use Container&& in order to accept temporaries 2013-02-27 19:58:07 +01:00
Maxime Coste
2f410f62e4 Add String Range::content() const 2013-02-27 19:11:25 +01:00
Maxime Coste
9230667c11 Add " and ' support to object selection 2013-02-27 19:08:13 +01:00
Maxime Coste
be0c5ddf49 minor performance tweaks 2013-02-27 19:03:33 +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
6f48407f55 Use current locale 2013-02-27 19:01:07 +01:00
Maxime Coste
2854984c79 use std::isalnum for is_word implementation in order to support unicode 2013-02-26 18:54:11 +01:00
Maxime Coste
b68cc3cd3c NCurses: fix unneeded last line when displaying info box 2013-02-26 18:53:29 +01:00
Maxime Coste
0f413607c2 Fix utf8 handling when moving selection up/down 2013-02-26 18:52:49 +01:00
Maxime Coste
3d19111570 Use unicode box drawing character for the assistant 2013-02-26 14:28:42 +01:00
Maxime Coste
ffc5a4a334 Add a String(Codepoint, CharCount) constructor 2013-02-26 14:28:20 +01:00
Maxime Coste
2726d11108 handle SIGFPE, SIGQUIT and SIGTERM as well as SIGSEGV 2013-02-26 14:13:37 +01:00
Maxime Coste
6d4552e7d8 Add an expand_unprintable highlighter which replaces unprintable char with U+XXXX 2013-02-26 14:12:21 +01:00
Maxime Coste
c343407465 Fix utf8 handling in Editor::insert when replacing 2013-02-26 14:06:25 +01:00
Maxime Coste
7865223587 Add utf8::character_start function 2013-02-26 14:05:51 +01:00
Maxime Coste
9b3bc8523b Use ncursesw in order to get correct utf8 handling 2013-02-26 14:05:16 +01:00
Maxime Coste
dc7227b983 Add the most important missing feature of Kakoune 2013-02-25 19:38:20 +01:00
Maxime Coste
dc8803e41b String: use a CharCount instead of a size_t in String(char, CharCount) 2013-02-25 19:25:32 +01:00
Maxime Coste
8f3d2ae089 main: catch all exceptions 2013-02-22 18:45:59 +01:00
Maxime Coste
77dc9955d3 Paste: use count for repetition 2013-02-22 18:45:27 +01:00
Maxime Coste
4b11f73f1e buffer: remove too slow check from check_invariant 2013-02-22 18:38:53 +01:00
Maxime Coste
5c74f98757 Use S for regex splitting, and alt-s for line splitting 2013-02-22 18:37:34 +01:00
Maxime Coste
5f446d9aec try to merge selections when begining incremental insertion 2013-02-21 18:44:17 +01:00
Maxime Coste
d647e817a4 grep,make: bind normal mode return to jump 2013-02-21 13:39:31 +01:00
Maxime Coste
efc0a8bc07 grep,make: support specifying client with toolsclient option
When toolsclient option is set, make and grep opens their buffer
in the specified client instead of the current one.
2013-02-21 13:38:12 +01:00
Maxime Coste
901d5ea1be Add mail.kak for mail file highlighting 2013-02-21 13:36:25 +01:00
Maxime Coste
cf01f0ed7a Avoid recursive macro calls 2013-02-21 13:35:20 +01:00
Maxime Coste
9306a89deb Fix macro recording on the same register, replace instead of appending. 2013-02-21 13:34:34 +01:00
Maxime Coste
6573f16dd9 Buffer: commit current undo group before attempting to undo anything 2013-02-20 14:23:52 +01:00
Maxime Coste
9f4498e035 Buffer: replace {begin,end}_undo_group with a single commit_undo_group method 2013-02-20 14:20:16 +01:00
Maxime Coste
682e4faff0 select and split operations use the search pattern register 2013-02-20 14:04:46 +01:00
Maxime Coste
02b01e2f0a ShellManager: catch exception thrown by env var functors 2013-02-19 19:06:13 +01:00
Maxime Coste
a83731c8e1 search: fix empty search string, use previous pattern 2013-02-19 19:05:13 +01:00
Maxime Coste
c451dd07c6 InputHandler: do not put empty lines in history 2013-02-19 19:04:36 +01:00
Maxime Coste
18aac3d4e8 Add '*' binding, which (smart) copy current selection to search pattern 2013-02-19 19:04:09 +01:00
Maxime Coste
a453ddaf37 Add support for Home/End key in prompts 2013-02-19 13:50:27 +01:00
Maxime Coste
b08749285e move status line generation code to client manager 2013-02-18 19:03:39 +01:00
Maxime Coste
b43fdc7eb6 Add macro recording/replay support 2013-02-18 18:58:07 +01:00
Maxime Coste
577734dae7 expose exec_keys function in commands.hh 2013-02-18 18:57:08 +01:00
Maxime Coste
9936ace0db input_handler: ask dimensions to ui instead of window 2013-02-18 14:13:52 +01:00
Maxime Coste
fc2dd599a3 Move last insert state from context to input handler 2013-02-18 14:07:30 +01:00
Maxime Coste
0e081a76c1 make keymap definition more readable using a select helper function 2013-02-18 14:01:24 +01:00
Maxime Coste
67971995f8 Fix class/struct mismatches 2013-02-18 14:00:43 +01:00
Maxime Coste
bd5955c737 grep: remove enventual \r 2013-02-13 14:32:30 +01:00
Maxime Coste
4eea0a4ce1 Window: try to show as much of the selection as possible 2013-02-12 19:01:25 +01:00
Maxime Coste
cb26948ad3 ClientManager: move the Client inner class detail in the cpp file 2013-02-07 19:25:42 +01:00
Maxime Coste
32e6184210 context_wrap: create a DynamicSelectionList only when needed 2013-02-07 19:25:07 +01:00
Maxime Coste
2f9041b842 Editor: fix warning 2013-02-07 13:37:22 +01:00
Maxime Coste
6c7d646d35 exec keys: push_jump if editor has changed 2013-02-07 13:35:21 +01:00
Maxime Coste
785abfbad5 ctags.kak: do not automatically enable info tooltips 2013-01-31 19:00:02 +01:00
Maxime Coste
1c301482d5 tweak buffer unit test 2013-01-31 18:59:23 +01:00
Maxime Coste
edef8e4e98 Remove Set and use unordered_set 2013-01-31 18:58:25 +01:00
Maxime Coste
7f02ef334f add some tests for Key functions 2013-01-30 19:16:36 +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
45367bf447 ctags.kak: tweak auto info 2013-01-30 19:05:52 +01:00
Maxime Coste
c9b113fd5f InputHandler: add some new hooks 2013-01-30 19:04:03 +01:00
Maxime Coste
de0f765498 Keys: add key_to_str function 2013-01-30 19:03:11 +01:00
Maxime Coste
045aa0c7ec style fix 2013-01-30 00:27:22 +01:00
Maxime Coste
e278196e99 ctags: initial auto fonction documentation support 2013-01-30 00:24:10 +01:00
Maxime Coste
00a9cdfc90 Context: remove some unused code 2013-01-29 23:16:58 +01:00
Maxime Coste
8933109cc5 Context: fix unintialized m_input_handler 2013-01-29 19:13:39 +01:00
Maxime Coste
252f875926 fix sort_and_merge_overlapping 2013-01-29 19:05:40 +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
f8209e3b52 fix contains for empty containers 2013-01-29 18:55:32 +01:00
Maxime Coste
3171ab0c52 NCurses: fix multiline info 2013-01-29 14:24:42 +01:00
Maxime Coste
2235944e60 Add NormalIdle hook support 2013-01-29 13:58:19 +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
3d430e14c4 Buffer: small fix in apply_modification 2013-01-28 13:45:32 +01:00
Maxime Coste
54725ebcca Buffer::do_insert: fix on_insert call when inserting at the end 2013-01-24 14:08:24 +01:00
Maxime Coste
28cb78bed1 Editor: refactor InsertMode::Replace 2013-01-23 18:58:43 +01:00
Maxime Coste
410067282a Buffer: end is either one past last character, or one past last line 2013-01-23 18:52:42 +01:00
Maxime Coste
72cc61c987 add undo unit_test and fix Buffer 2013-01-23 14:39:33 +01:00
Maxime Coste
3404366b65 add more asserts 2013-01-23 14:39:33 +01:00
Maxime Coste
f14bc5e310 Buffer: small style fixes 2013-01-23 13:47:45 +01:00
Maxime Coste
9dbc6adcda add a SIGSEGV handler 2013-01-23 13:46:18 +01:00
Maxime Coste
2f9e061252 assert: add some debug info in the message 2013-01-23 13:45:44 +01:00
Maxime Coste
4497767492 NCursesUI::get_key(): move getch_iterator as a local type 2013-01-22 14:29:16 +01:00
Maxime Coste
0c8832c42a LineAndColumn::operator+= is not constexpr 2013-01-22 14:28:43 +01:00
Maxime Coste
1b53b92267 Buffer: check that newlines are at the end of lines 2013-01-22 14:28:15 +01:00
Maxime Coste
f7038980a0 Add kak_cursor_{line,column} env var 2013-01-21 13:58:54 +01:00
Maxime Coste
9002059c0d Window: fix display position, count utf8 characters for column 2013-01-17 19:49:49 +01:00
Maxime Coste
f1b6108367 NCurses: use default background for '~' 2013-01-17 19:49:48 +01:00
Maxime Coste
9c2bbe218b replace char: fix unicode handling 2013-01-17 19:49:48 +01:00
Maxime Coste
44ca4d23de Fix sort_and_merge_overlapping 2013-01-17 19:49:48 +01:00
Maxime Coste
3f01f4bdf5 Add some documentation to InputHandler 2013-01-17 14:27:32 +01:00
Maxime Coste
d1f15123e4 InputHandler: minor code cleanup 2013-01-17 14:22:24 +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
c45838cc57 Move Insertion Hooks handing to the input handler 2013-01-17 13:58:57 +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
bdc47ddef8 NCursesUI: redraw becomes a member 2013-01-15 14:16:45 +01:00
Maxime Coste
93cad94330 InputHandler: Insert mode calls 'InsertIdle' hook when idle 2013-01-15 14:15:12 +01:00
Maxime Coste
12ce590f18 Context: add a hooks method similar to the options one 2013-01-14 19:26:44 +01:00
Maxime Coste
a1998dac7a InputHandler: use a timer for word completion instead of calling it at each insertion 2013-01-14 19:17:37 +01:00
Maxime Coste
90eeb7b8a7 EventManager: add support for timers 2013-01-14 19:07:38 +01:00
Maxime Coste
eaaf88db1d rename StronglyTypedInteger to more accurate StronglyTypedNumber 2013-01-14 18:51:45 +01:00
Maxime Coste
3d00f398fe NCurses: redraw after menu/info window is modified 2013-01-14 18:51:07 +01:00
Maxime Coste
310ec1f791 move input watching responsibility into UserInterface implementations 2013-01-14 18:50:17 +01:00
Maxime Coste
d2f0e2de66 RemoteClient owns the FDWatcher of it's socket 2013-01-11 18:44:02 +01:00
Maxime Coste
914ede7a82 Add and use a Set template class for recuring small sets 2013-01-11 14:28:13 +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
bba7152063 Add backward search support (bound to alt-/) 2013-01-08 18:46:45 +01:00
Maxime Coste
f77509d498 add sh.kak for shell script highlighting 2013-01-08 14:01:22 +01:00
Maxime Coste
59941bcfa9 Make: fix userconfig target 2013-01-08 14:00:13 +01:00
Maxime Coste
3f7bf82cde Support for selecting to surrounding object begin/end with [ and ] 2013-01-07 18:53:27 +01:00
Maxime Coste
8d4678a82e Autoname client on creation, and access client name from shell with $kak_client 2013-01-07 13:59:09 +01:00
Maxime Coste
7acd4e3e6a minor code cleanup 2013-01-06 21:58:02 +01:00
Maxime Coste
9efc32596b make: use a makecmd option 2013-01-06 19:21:42 +01:00
Maxime Coste
f3640a2d03 alt-r rotates selections 2013-01-05 18:26:57 +01:00
Maxime Coste
4b649d386c various code style fixes 2013-01-04 18:39:13 +01:00
Maxime Coste
5939eb219f add client.kak providing 'new' command for opening a new client
Autodetect tmux, use tmux if we are in a tmux session, else fallback to
urxvt.
2013-01-04 18:31:37 +01:00
Maxime Coste
03d32c2e2d tweak kakrc highlighting 2013-01-03 18:53:04 +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
f84e46f805 tweak errjump command 2013-01-03 18:47:51 +01:00
Maxime Coste
ae9aadb07d Fix captures preservation in Editor 2013-01-03 18:47:02 +01:00
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
Maxime Coste
53be5c87d2 String: add non const front() and back() methods 2012-11-23 18:41:33 +01:00
Maxime Coste
6a7193cf63 filter: minor code cleanup 2012-11-23 18:35:05 +01:00
Maxime Coste
ecd556db59 NCurses: use Default bg color for status line 2012-11-23 13:46:39 +01:00
Maxime Coste
2523c4955b buffer: increment timestamp on notify saved 2012-11-23 13:41:07 +01:00
Maxime Coste
d2f811a8d5 Refactor filter and highlighter registry into a common template 2012-11-23 13:40:20 +01:00
Maxime Coste
11e885e5a5 Cleanups and minor refactoring on Buffer 2012-11-22 18:54:37 +01:00
Maxime Coste
73c446e379 code style cleanup in CommandManager 2012-11-22 14:28:14 +01:00
Maxime Coste
7bcd0353cb ClientManager: store client with a unique_ptr 2012-11-22 14:17:46 +01:00
Maxime Coste
08ad8e8a40 move Window ownership to the ClientManager instead of the Buffer 2012-11-22 14:08:55 +01:00
Maxime Coste
3b5530ac09 rename (hook|option)_manager to (hook|option)s.
And Global(Hook|Option)Manager to Global(Hook|Option)s
2012-11-22 13:50:29 +01:00
Maxime Coste
e981fb7957 cpp.kak: use regex filter to handle indentation 2012-11-21 19:07:41 +01:00
Maxime Coste
ff4e907fa9 fix trailing '"' in make.kak 2012-11-21 19:01:41 +01:00
Maxime Coste
d331856fb3 refactor/cleanup NCursesUI::menu_show 2012-11-21 19:01:13 +01:00
Maxime Coste
9d04c773c1 CommandManager: diagnose unterminated strings 2012-11-21 13:56:52 +01:00
Maxime Coste
6bbbd2543a move wrong_argument_count to commands.cc, where it is used 2012-11-21 13:44:43 +01:00
Maxime Coste
d1fade5c9e Buffer: replace reset_undo_data with a NoUndo flag 2012-11-21 13:43:10 +01:00
Maxime Coste
ac6171686d minor fixes to buffer constructor 2012-11-21 13:37:36 +01:00
Maxime Coste
985464bee5 Fix FIFO double deregistering issue when closing the buffer after EOF
When a fifo was closed, the fifo event handler would close the fd and
unregister it from the event handler, however the hook on BufClose
did that as well without checking if the fd was still refering to the
fifo.

Now we use a Buffer flag Fifo to tag the buffer as still linked to
a fifo so that the BufClose hook do not close and unregister a second
time
2012-11-20 19:48:27 +01:00
Maxime Coste
8bbfbc8c72 Buffer: replace Buffer::Type with Buffer::Flags 2012-11-20 19:47:56 +01:00
Maxime Coste
0b14f387d4 fix error handling in ncurses resize code 2012-11-20 18:55:44 +01:00
Maxime Coste
95cc08a19e More type safety on SelectFlags 2012-11-20 18:55:17 +01:00
Maxime Coste
533079c389 Let client manager handle deleting client 2012-11-20 18:54:35 +01:00
Maxime Coste
713fa9d406 more exception safety with file descriptors 2012-11-20 18:52:36 +01:00
Maxime Coste
7c69d170df tweak kakrc highlighting 2012-11-20 14:14:54 +01:00
Maxime Coste
4dc333c8b3 minor cleanups 2012-11-20 14:14:32 +01:00
Maxime Coste
0ca66e3bf9 Add indent/deindent binding (> and <) 2012-11-19 19:22:11 +01:00
Maxime Coste
1602fcf012 Remote: read now retry when it did not get all the expected data 2012-11-19 19:07:32 +01:00
Maxime Coste
fe98ba7494 add some debug output to RemoteUI 2012-11-19 19:06:32 +01:00
Maxime Coste
3e53ebb5d6 alt-space without numeric parameter now flips selections, inverting first and last char 2012-11-19 19:03:56 +01:00
Maxime Coste
07e5655ac1 write_debug automatically appends an eol to the message 2012-11-19 19:03:01 +01:00
Maxime Coste
c636a291bd Add a regex filter
regex filter takes three arguments: <line_match> <insert_match> <replacement>
<line_match> is checked from begining of line to point of insertion
<insert_match> is checked on the inserted text (usually only one char)
<replacement> is used to replace the inserted text, it can use $1..9
for captures in line_match, and $c to specify the cursor position.

for example, ':addfilter regex .* \( ($c)' makes inserting an opening
parens insert the closing one as well, keeping the insertion cursor
in the right spot.
2012-11-19 14:19:41 +01:00
Maxime Coste
22c545884f Selection: allow write access to first and last 2012-11-19 14:19:31 +01:00
Maxime Coste
45bd3dbe5a Pass the selection instead of only point of insertion to filters 2012-11-19 13:40:23 +01:00
Maxime Coste
fd50046f3a ctags.kak: center selection in window when jumping on a tag 2012-11-19 13:38:03 +01:00
Maxime Coste
6ffa74a24d Context: set dimensions of window on change_editor 2012-11-19 13:37:38 +01:00
Maxime Coste
9c368c85d6 use SelectionsAndCaptures to store jumps 2012-11-12 20:41:03 +01:00
Maxime Coste
14f980e4e0 move overlaps function to selection.hh 2012-11-12 20:27:56 +01:00
Maxime Coste
77272db0fd make Buffer::{add,remove}_change_listener const and the listener list mutable 2012-11-12 20:11:27 +01:00
Maxime Coste
489621cf58 update c++ highlighter 2012-11-12 20:07:47 +01:00
Maxime Coste
6ebe41b1a5 BufferIterator holds a safe_ptr to their buffer instead of a raw pointer 2012-11-12 20:07:33 +01:00
Maxime Coste
037210c70c SafeCountable::m_count is mutable so that we can have safe_ptr<const T> 2012-11-12 20:07:05 +01:00
Maxime Coste
801f4e740c Add jump list support to context
jump forward is bound to ctrl-i
jump backward is bound to ctrl-o

switch buffers or jumping somewhere in the buffer push the current
position to the jump list.

when a buffer is deleted, all entries referencing it in jump lists
are erased.
2012-11-12 19:59:25 +01:00
Maxime Coste
41b5336296 make ctags.kak tag implementation more robust 2012-11-12 19:42:26 +01:00
Maxime Coste
3f403474ac update asciidoc highlighting 2012-11-12 19:41:39 +01:00
Maxime Coste
39932f7ea2 Fix IncrementalInserter::insert(memoryview<String>) so that inserting registers works as intended 2012-11-12 13:40:07 +01:00
Maxime Coste
2781056ce6 Add a rc/ctags.kak for a :tag implementation using exuberant ctags 2012-11-09 19:10:08 +01:00
Maxime Coste
0887e1364e InputHandler: Handle C-c as Escape 2012-11-08 14:05:00 +01:00
Maxime Coste
68cc07022c NCurses: catch SIGINT and send a C-c instead 2012-11-08 14:04:41 +01:00
Maxime Coste
0e5f548f76 minor tweaks in displayed texts 2012-11-08 13:38:02 +01:00
Maxime Coste
3a34fae9a7 Editor: avoid end of lines when moving selection 2012-11-08 13:37:29 +01:00
Maxime Coste
bdd0758ee2 Saner :edit and :buffer behaviour when buffer is the current one 2012-11-07 14:04:47 +01:00
Maxime Coste
0f7948848e Fix buffer deletion from a client when another is editing it 2012-11-07 14:02:23 +01:00
Maxime Coste
d6923af3c4 server socket filename available through $kak_socket env var 2012-11-06 14:25:25 +01:00
Maxime Coste
3471d795c9 ClientManager: tweak on input event lambda 2012-11-06 13:37:18 +01:00
Maxime Coste
d347223e42 EventManager: store event handlers in an unordered_map instead of a vector
If an event handler add or removes an event from the manager, it may then
be moved in the vector, and if after that it access any of it's members
(through this), it results in an invalid memory access.
2012-11-06 13:34:58 +01:00
Maxime Coste
3daac4883e Move client drawing responsiblity to the ClientManager 2012-11-05 19:58:04 +01:00
Maxime Coste
a41bb34b21 Window: maintain the timestamp of last display buffer update 2012-11-05 19:54:09 +01:00
Maxime Coste
fedabb4176 Rework Window creation, avoid using the same window in multiple clients 2012-11-05 19:15:42 +01:00
Maxime Coste
42315c4b5c Editor: store a safe_ptr to buffer instead of reference 2012-11-04 23:39:25 +01:00
Maxime Coste
ea17525b2a Window: sanitize position in set_position 2012-10-31 14:28:47 +01:00
Maxime Coste
c947819154 Fix buffer iterator_at_line_{begin,end}(LineCount) 2012-10-31 14:28:03 +01:00
Maxime Coste
74731b0d0f refactor Client creation 2012-10-31 14:23:44 +01:00
Maxime Coste
6eef68124f use custom Client::operator=(Client&&) to drop safe counts first 2012-10-30 18:13:57 +01:00
Maxime Coste
1ea4b3998a Add a ClientManager for managing client lifetimes 2012-10-30 14:00:44 +01:00
Maxime Coste
bc7dfec44c tweak cpp highlighting 2012-10-29 19:17:48 +01:00
Maxime Coste
945f54daea fix crashes when cycling through menu with an active filter 2012-10-29 19:17:37 +01:00
Maxime Coste
254d43856d NCurses: refactor status line handling, and disambiguate status line from mode line 2012-10-29 19:01:57 +01:00
Maxime Coste
6f2c69a0eb fix adapt_for_linewise for Replace mode 2012-10-29 19:00:28 +01:00
Maxime Coste
cc876f7107 validate key in InputHandler before sending to mode, and minor refactor 2012-10-29 18:59:41 +01:00
Maxime Coste
6b664052b8 Use a Server object instead of just calling setup_server 2012-10-29 13:44:53 +01:00
Maxime Coste
ba244a70a3 NCurses: fix long lines handling 2012-10-28 11:00:23 +01:00
Maxime Coste
d9729cc29e Handle all available input before redrawing 2012-10-28 09:26:54 +01:00
Maxime Coste
13a081ed4a Remote: fix resize handling 2012-10-27 15:49:10 +02:00
Maxime Coste
b24a80a3ec NCurses::draw: maintain current column without using ncurses 2012-10-27 15:48:08 +02:00
Maxime Coste
031ed91ea6 EventManager: handle forced events even when poll return -1 2012-10-27 15:15:34 +02:00
Maxime Coste
b199cfd644 NCursesUI: force input handling reexecution when resizing 2012-10-27 15:02:17 +02:00
Maxime Coste
70cdb7a811 EventManager: add force_signal method to force event execution 2012-10-27 15:01:13 +02:00
Maxime Coste
24b43f91c8 NCurses: rework terminal resize handling 2012-10-27 14:18:52 +02:00
Maxime Coste
ee882d9d02 utf8: use CharCount instead of size_t 2012-10-27 13:26:40 +02:00
Maxime Coste
61c8ef6ce4 remote: send resize message when needed 2012-10-26 16:14:51 +02:00
Maxime Coste
73aa11ac16 remote: check read/write results, detect disconnections 2012-10-26 13:45:32 +02:00
Maxime Coste
1c3f6c314f send actual dimensions of remote client at connection 2012-10-25 12:51:01 +02:00
Maxime Coste
0735c69a92 add initial (and buggy) unix socket based client/server code 2012-10-24 21:44:19 +02:00
Maxime Coste
b9eb939e05 Add some remote client support protocol code 2012-10-23 22:55:44 +02:00
Maxime Coste
b163711963 DisplayBuffer: store lines in a vector, not a list 2012-10-23 22:55:04 +02:00
Maxime Coste
227c66cf61 use Colors and Attributes are char 2012-10-23 22:53:56 +02:00
Maxime Coste
98b6618658 merge contiguous DisplayAtoms after highlighting DisplayBuffer 2012-10-22 13:20:02 +02:00
Maxime Coste
eed8a2a57c add basic utf8 unit test 2012-10-22 01:05:56 +02:00
Maxime Coste
49237a771b some minor cleanups/refactorings in main 2012-10-21 13:09:01 +02:00
Maxime Coste
a0cca31dc1 make UserInterface unaware of Window, only of DisplayBuffer 2012-10-20 20:15:20 +02:00
Maxime Coste
48fe18ff0a memoryview: include cstddef for size_t 2012-10-20 16:40:12 +02:00
Maxime Coste
28c8acf80a assert: throw if launching xmessage fails 2012-10-19 03:53:10 +02:00
Maxime Coste
abf514f305 avoid utf8 errors with invalid keys, like ncurse KEY_RESIZE 2012-10-18 19:56:57 +02:00
Maxime Coste
132c31042e main: prepare for multi client support 2012-10-17 17:49:34 +02:00
Maxime Coste
df400f90ab utf8: replace InvalidBytePolicy::Throw with InvalidBytePolicy::Assert 2012-10-17 17:01:51 +02:00
Maxime Coste
c1387dc592 assert: simplify header 2012-10-17 17:01:08 +02:00
Maxime Coste
4aa3a36102 rename Client to InputHandler 2012-10-17 13:14:03 +02:00
Maxime Coste
1ab486b0d8 verious refactoring 2012-10-16 18:42:51 +02:00
Maxime Coste
f8abbfbb44 assert: use xmessage to block on assert failed 2012-10-16 16:16:32 +02:00
Maxime Coste
214baf4cdd add a _str user defined literal to create String 2012-10-16 15:11:22 +02:00
Maxime Coste
6ff6058ceb create_buffer_from file return nullptr on file not found instead of throwing 2012-10-16 14:59:39 +02:00
Maxime Coste
4be6882bd5 Menu: support searching through choices with /
when hitting / while in a menu, a regex filter can be entered so that only
entries matching it are selectable, <esc> disable filtering while a second
<esc> close the menu as usual.
2012-10-15 12:49:46 +02:00
Maxime Coste
148466c659 Extract basic line editing functionality from PromptMode to LineEditor 2012-10-14 16:24:35 +02:00
Maxime Coste
dfafcdb6e6 utf8::codepoint: configurable invalid byte policy 2012-10-13 19:05:14 +02:00
Maxime Coste
4f1ab5b749 fix Window::scroll_to_keep_cursor_visible_ifn 2012-10-11 14:23:20 +02:00
Maxime Coste
4210a17753 Client: never call substr(CharCount, String::npos); 2012-10-11 14:22:08 +02:00
Maxime Coste
c92077762c Makefile: add -Wall to CXXFLAGS 2012-10-11 01:17:29 +02:00
Maxime Coste
0ce6bd9bf5 use ByteCount instead of CharCount when we are really counting bytes
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
571861bc7b Return something in utf8::distance, thanks again gcc for letting this work 2012-10-11 00:39:17 +02:00
Maxime Coste
561cc72d6c Add a ByteCount unit 2012-10-11 00:13:31 +02:00
Maxime Coste
2cdebe01d3 fix make tags 2012-10-10 22:44:06 +02:00
Maxime Coste
8de754e2e9 when executing keys, propagate potentially changed editor to calling context 2012-10-10 19:15:43 +02:00
Maxime Coste
dae8f65308 exec concat all its arguments instead of accepting only one 2012-10-10 19:15:09 +02:00
Maxime Coste
ffba94fcde Actually return something in utf8::codepoint, thanks gcc for using rax 2012-10-10 19:14:18 +02:00
Maxime Coste
a04d1e3a1f Editor merge selections when they overlap 2012-10-10 19:11:24 +02:00
Maxime Coste
5bb37ad755 Support Append mode for Editor::select and use it for 'N' key 2012-10-10 13:59:55 +02:00
Maxime Coste
4c8b4890e6 Context: explicit constructors and more comments 2012-10-10 13:59:55 +02:00
Maxime Coste
74cdeb5952 Paste use a linewise mode when pasted string ends with a \n 2012-10-10 13:59:55 +02:00
Maxime Coste
b48d639976 Editor::insert handle all InsertModes 2012-10-10 13:59:55 +02:00
Maxime Coste
d574ae864d Editor::insert takes an InsertMode param, remove Editor::{append,replace} 2012-10-09 19:25:20 +02:00
Maxime Coste
7a8366da2b add a unicode.hh header for Codepoint related functions, s/utf8::Codepoint/Codepoint/ 2012-10-09 19:15:05 +02:00
Maxime Coste
e1d4215159 InsertMode insert the whole utf8 representation of a codepoint 2012-10-09 14:31:00 +02:00
Maxime Coste
c0db3b81be NCursesUI::get_key returns the codepoint 2012-10-09 14:30:35 +02:00
Maxime Coste
ba50d853b3 Editor: fix move_selection(LineCount) for utf8 2012-10-09 14:29:59 +02:00
Maxime Coste
1af7465107 utf8: add dump(OutputIterator& it, Codepoint cp) 2012-10-09 14:29:37 +02:00
Maxime Coste
c7272e427d get rid of Character 2012-10-08 19:33:53 +02:00
Maxime Coste
194bf6ac98 Buffer: add some utf8 sanity checks 2012-10-08 19:25:17 +02:00
Maxime Coste
bff015d5b9 WordCompleter: avoid word currently being edited 2012-10-08 19:14:48 +02:00
Maxime Coste
0a686573ab utf8 awareness in selectors 2012-10-08 19:12:09 +02:00
Maxime Coste
ed592a3005 DisplayAtom: add utf8 sanity check 2012-10-08 14:28:54 +02:00
Maxime Coste
5602bc10e8 DisplayAtom: only let DisplayLine touch m_begin and m_end 2012-10-08 14:28:38 +02:00
Maxime Coste
7e046e3f0b utf8 awareness in editor, highlighters and ncurses 2012-10-08 14:27:43 +02:00
Maxime Coste
5a267ab627 selections should always point to an utf8 character sequence start byte 2012-10-08 14:26:57 +02:00
Maxime Coste
f2e98f700e add utf8_iterator for adapting byte iterators to iterate on unicode characters 2012-10-08 14:25:58 +02:00
Maxime Coste
2db1d02329 add utf8 helpers in utf8.hh 2012-10-08 14:25:05 +02:00
Maxime Coste
946b4650b6 fix postfix StronglyTypedInteger::operator{++,--} 2012-10-02 14:19:45 +02:00
Maxime Coste
514aeead63 do not use our broken safe bool, c++11 explicit bool conversion is better 2012-10-02 14:18:34 +02:00
Maxime Coste
9ae8f5e47b Editor::move_selection now either takes a LineCount or a CharCount 2012-10-02 14:10:00 +02:00
Maxime Coste
669d2e456f add postfix operator++ to BufferIterator 2012-10-02 14:09:06 +02:00
Maxime Coste
9ec10daf69 move clamp to utils.hh 2012-10-02 14:08:09 +02:00
Maxime Coste
84acf2594a grep,make: tweak mktemp call to work on OSX 2012-10-02 10:37:08 +02:00
Maxime Coste
081f579ba1 OSX compilation fixes 2012-10-02 10:36:28 +02:00
Maxime Coste
4b0ccb0437 String and BufferIterator value_type goes back to plain char 2012-10-01 20:20:08 +02:00
Maxime Coste
f2f3421637 cpp.kak: fix string highlighter 2012-10-01 14:24:32 +02:00
Maxime Coste
bd0805cf3e autoenable word completion while inserting 2012-10-01 14:23:04 +02:00
Maxime Coste
29b72b3e24 Add a word completing functionality to insert mode (wip) 2012-09-30 16:24:06 +02:00
Maxime Coste
430765e132 extract is_alpha to string.hh 2012-09-30 16:23:18 +02:00
Maxime Coste
801e3eaae2 Add a Window::display_position(const BufferIterator&) method 2012-09-30 16:22:03 +02:00
Maxime Coste
6cd5d80757 Add a length method to AtomContent 2012-09-30 16:21:20 +02:00
Maxime Coste
5b6cb500fc Menus can be placed anywhere on the screen, and takes a style parameter
This paves the way for insert mode completion menu using the current
prompt menu system.
2012-09-30 15:18:37 +02:00
Maxime Coste
f230feec7f Change buffer order based on the last one used 2012-09-28 14:14:49 +02:00
Maxime Coste
79d8d082bd Store capture groups with selections in editor, and access them through dynamic registers 2012-09-26 20:43:42 +02:00
Maxime Coste
a8d2482eb6 Editor now stores selections as SelectionAndCapturesList 2012-09-26 20:33:47 +02:00
Maxime Coste
a2fd1528e6 Move last insertion from Client to Context 2012-09-26 20:07:06 +02:00
Maxime Coste
77eb86bcdb Forbid context copy 2012-09-26 14:27:23 +02:00
Maxime Coste
efc069b531 Extract IncrementalInserter::Mode as InsertMode
move ClientMode classes in a namespace due to InsertMode name collisions
2012-09-26 14:22:24 +02:00
Maxime Coste
f76323f56e Move UserInterface out of Client into Context 2012-09-26 14:13:04 +02:00
Maxime Coste
c36ee924eb cleanup BatchUI 2012-09-25 14:23:50 +02:00
Maxime Coste
730f39aaa0 remove selection stack from editor 2012-09-24 20:47:06 +02:00
Maxime Coste
747c14c19f Hide more Client Mode code in the cpp 2012-09-24 19:39:40 +02:00
Maxime Coste
a312ce6dc2 extract Client virtual methods to a UserInterface class 2012-09-24 19:24:27 +02:00
Maxime Coste
0380c999c3 move Client::Mode class definition in client.cc 2012-09-24 14:03:04 +02:00
Maxime Coste
b3c4912404 Use context.editor() instead of context.window() when a window is not needed 2012-09-24 13:56:39 +02:00
Maxime Coste
e86e3bda4d select_all_matches: reject match that start at the end of originating selection 2012-09-19 14:04:09 +02:00
Maxime Coste
81eae79154 ncurses: fix displaying of lines longer than screen 2012-09-17 21:38:51 +02:00
Maxime Coste
b245b39a85 RegexColorizer: store ColorPairs by pointer so that alias changes are taken into account 2012-09-17 21:02:08 +02:00
Maxime Coste
a92a6dc7f3 ColorRegistry: permit overriding an alias 2012-09-17 21:01:11 +02:00
Maxime Coste
4d369d6290 kakrc: use color aliases for cpp and kakrc highlighting 2012-09-17 19:02:08 +02:00
Maxime Coste
5cf947f845 Add a ColorRegistry class responsible of color parsing and supporting aliases
colalias command permits to define names for color pairs
2012-09-17 19:01:13 +02:00
Maxime Coste
45bffd8b8a fix parse_keys for <esc> 2012-09-17 13:46:34 +02:00
Maxime Coste
00e357ed56 PromptMode: fix completion of non-last parameters 2012-09-17 13:37:08 +02:00
Maxime Coste
ebae75e96e fifo: buffer size is 4k instead of 512 2012-09-14 14:29:54 +02:00
Maxime Coste
f6d2533cae rework fifo handling, use real fifos in {make,grep}.kak, update README 2012-09-12 19:54:46 +02:00
Maxime Coste
a467d73115 use parse_filename when opening files or completing filenames so that ~ and env vars are handled 2012-09-12 19:42:12 +02:00
Maxime Coste
6f6f10c83d simplify tab completion code in Client::InsertMode 2012-09-12 19:09:27 +02:00
Maxime Coste
ec57990060 whine when a search selected nothing so that the user knows 2012-09-12 19:09:10 +02:00
Maxime Coste
cfbe32f6a2 support Tab/BackTab keys in MenuMode as well 2012-09-12 14:25:14 +02:00
Maxime Coste
7266052d46 grep command uses file completion 2012-09-12 14:22:01 +02:00
Maxime Coste
7c039585a4 add -file-completion option to def command and document in README 2012-09-12 14:21:42 +02:00
Maxime Coste
62e50c38fa commands.cc: cleanup 2012-09-11 19:09:55 +02:00
Maxime Coste
9dfccddca8 Correctly handle arrow keys in insert mode 2012-09-11 19:09:14 +02:00
Maxime Coste
e39086cd5f Buffer: reset undo data after executing hooks in constructor 2012-09-11 19:03:37 +02:00
Maxime Coste
a0b75817a5 do not keep undo data in the debug buffer 2012-09-11 19:03:13 +02:00
Maxime Coste
eac68f09a4 NCursesClient::show_menu: stop displaying counts in front of items 2012-09-11 14:30:32 +02:00
Maxime Coste
859e907396 fix NCursesClient::menu_select for one past last item 2012-09-11 14:28:54 +02:00
Maxime Coste
ee4c6b04a6 Support Shift-Tab in prompt mode to go back in completions 2012-09-11 14:27:21 +02:00
Maxime Coste
b5a2901f8d add 'r' for replacing selection with next typed char 2012-09-11 14:01:41 +02:00
Maxime Coste
f8a6045307 Load config file in ${XDG_CONFIG_HOME}/kak/kakrc and ${XDG_CONFIG_HOME}/kak/autload/*
Do not autoload files in $kak_runtime/rc, let the user choose
restore the runtime command implemented in shell this time.
2012-09-10 20:45:34 +02:00
Maxime Coste
82a2bb37e7 Remove runtime command, use shell expansion to source files in rc dir.
With the help of a new kak_runtime env var.
2012-09-10 20:10:18 +02:00
Maxime Coste
f9e31856cf Buffer: Allow inserting at the end when the inserted text ends with an end of line
Adapted other code in consequence and added unit tests so that this behavior
is maintained.
2012-09-10 19:26:17 +02:00
Maxime Coste
a37b14785f use -shell-params in rc files 2012-09-09 17:14:08 +02:00
Maxime Coste
ae76b7dddc Add support for shell script parameters
Now %sh{ ... } can access positional parameters through
standard shell construct, allowing simple handling of variable
parameters.

def command accepts -shell-params flag to use this facility.
2012-09-09 17:10:53 +02:00
Maxime Coste
46565723b1 Add support for page up and page down 2012-09-07 21:09:23 +02:00
Maxime Coste
499bb77491 Cleanup Key handling, use symbolic names for function keys 2012-09-07 20:22:19 +02:00
Maxime Coste
287628ec19 Editor::{select,move_cursor} takes a enum SelectMode parameter instead of a boolean 2012-09-07 14:29:29 +02:00
Maxime Coste
1e18dcba0f fix Client::repeat_last_insert when no last insert 2012-09-07 14:28:27 +02:00
Maxime Coste
4e356a6312 kakrc.kak: fix comments highlighting 2012-09-06 14:30:09 +02:00
Maxime Coste
96beaf50dd ShellManager: output stderr in the debug buffer 2012-09-06 14:28:07 +02:00
Maxime Coste
ddd5236b08 cpp.kak: smarter alt command 2012-09-06 13:38:51 +02:00
Maxime Coste
41b0751a5d tweak make output highlighting 2012-09-06 13:35:36 +02:00
Maxime Coste
16e1c2daf9 simplify menu api 2012-09-05 19:02:06 +02:00
Maxime Coste
11d86ca3f3 fix Selection::merge_with 2012-09-05 14:27:48 +02:00
Maxime Coste
bf42d77469 Handle inserting in Client::InsertMode 2012-09-05 14:27:14 +02:00
Maxime Coste
d4446d1525 Client: fix history search 2012-09-05 00:52:09 +02:00
Maxime Coste
5c4df507c4 ncurses: colorize the menu 2012-09-05 00:49:59 +02:00