Maxime Coste
1fd8ec8bfd
support Ctrl-R <reg> when inserting to insert a register
2012-01-24 19:08:57 +00:00
Maxime Coste
a62d56064f
replace ncurses getch calls with a get_key method
2012-01-23 14:17:31 +00:00
Maxime Coste
950a734ce5
adapt rc files to the new hook command
2012-01-23 14:00:33 +00:00
Maxime Coste
a1ff9999f5
the hook command takes a first parameter to specify the hook owner
...
currently 'global' and 'window' are accepted owners. 'window' will
add the hook to the current context window.
2012-01-23 13:58:43 +00:00
Maxime Coste
c38f244c06
Window have it's own hooks manager
2012-01-23 13:57:24 +00:00
Maxime Coste
945ad361fb
HooksManager: forward declare Context instead of including context.hh
2012-01-23 13:56:43 +00:00
Maxime Coste
db9040e29e
HooksManager: extract the Singleton version as GlobalHooksManager
2012-01-23 13:40:42 +00:00
Maxime Coste
73ae3d292f
implement finding kak executable path on MacOS
2012-01-20 21:12:57 +00:00
Maxime Coste
bb36271ae5
HighlighterGroup: use idvaluemap::complete_id_if in complete_group_id
2012-01-19 20:53:15 +00:00
Maxime Coste
ce6b4c2cc4
idvaluemap: complete_id_if method for conditional id completion
2012-01-19 20:52:08 +00:00
Maxime Coste
2824bd9a46
HighlighterGroup: move to it's own file, Window uses them directly
2012-01-19 20:37:29 +00:00
Maxime Coste
541872cafa
completion support for addgrouphl and rmgrouphl
2012-01-18 11:33:58 +00:00
Maxime Coste
cffdbcb689
replace addhl -group with addgrouphl command, and add rmgrouphl
2012-01-18 00:15:10 +00:00
Maxime Coste
ae8882b0de
Context: do not permit access to window or buffer if null
2012-01-15 21:33:35 +00:00
Maxime Coste
a6930395b8
tweak kakrc files highlighting
2012-01-15 17:50:46 +00:00
Maxime Coste
c1f625054a
split kakrc with filetype specific files in rc/
...
cpp highlighting is now specified by rc/cpp.kak.
2012-01-15 17:35:25 +00:00
Maxime Coste
c62b3b251d
add a runtime command to execute files in the runtime directory
2012-01-15 17:34:05 +00:00
Maxime Coste
f99c3a1a6a
kakrc: use a hlkakrc highlighter group for kakrc highlighting regex
2012-01-15 13:48:48 +00:00
Maxime Coste
f3e8498a58
addhl supports a -group option
...
-group <group_id> can be used to add the highlighter in a
highlighter group which will be then handled as a whole.
2012-01-15 13:47:12 +00:00
Maxime Coste
98f937146a
HighlighterRegistry: add add_highlighter_to_group method
2012-01-15 13:46:45 +00:00
Maxime Coste
2cfa70a466
Window: add get_highlighter_group method
2012-01-15 13:46:12 +00:00
Maxime Coste
0c1e763d66
Highlighters: add an HighlighterGroup class
2012-01-15 13:45:18 +00:00
Maxime Coste
5092456186
Highlighters: move HighlighterParameters definition from highlighter_registry.hh to highlighter.hh
2012-01-15 13:44:16 +00:00
Maxime Coste
7599edffa9
idvaluemap: add missing includes
2012-01-15 13:40:58 +00:00
Maxime Coste
0234378bcf
kakrc: refactor using lists of commands for hooks
2012-01-15 03:04:37 +00:00
Maxime Coste
f259af9326
CommandManager: add flags support and IgnoreSemiColons flag
...
commands are now registred with flags, and the IgnoreSemiColons
flag permit to specify a command which needs all the parameters
on the line, bypassing the command sequence operator ';'.
the hook command is tagged as such.
2012-01-15 03:02:08 +00:00
Maxime Coste
be5cf92367
Completion: sort results in complete_filename
2012-01-15 02:02:18 +00:00
Maxime Coste
f673f3c334
Completion: handle hidden files in complete_filenam
2012-01-15 02:01:58 +00:00
Maxime Coste
49ea6f7103
correctly clear the window status line
2012-01-15 01:45:23 +00:00
Maxime Coste
4a5758ebb3
CommandManager: support ';' as a command separator
2012-01-15 01:37:35 +00:00
Maxime Coste
272f2d87a1
Highlighters: tweak colorize_cplusplus
2012-01-14 14:12:20 +00:00
Maxime Coste
95db828e17
CommandManager: use directly first command parameter as the command name
2012-01-14 14:02:54 +00:00
Maxime Coste
66d91b8828
support '\' as a line continuation marker when executing commands in file
2012-01-14 13:50:45 +00:00
Maxime Coste
fea81e1378
kakrc: add support for kakrc file highlighting
2012-01-14 01:04:08 +00:00
Maxime Coste
50ce3d1549
Document some Kakoune concepts, as Window, Buffer, DisplayAtom...
2012-01-11 14:21:58 +00:00
Maxime Coste
9557167f26
<space> with a count argument replaces current selections with the counth selection.
2012-01-09 14:28:01 +00:00
Maxime Coste
e02cb4e5bd
Selectors: select_next_match starts from cursor+1
...
so searching effectively starts on the character after current
selection end. Which makes repeating 'n' on a one character match
work.
2012-01-09 14:22:52 +00:00
Maxime Coste
8b1b1d9cd8
Selectors: add select_surrounding to select blocks
...
Alt-a followed by []()<>{}bB selects the block surrounding current
selection end.
Alt-i is similar but selects only the inside of the block.
2012-01-04 14:18:08 +00:00
Maxime Coste
e59bdd931e
search for kakrc next to the kak executable instead of in the current directory
2011-12-28 22:57:48 +00:00
Maxime Coste
4de41197c0
Add a | key that pipes each selection through an external filter
2011-12-28 19:04:06 +00:00
Maxime Coste
c9ac4d615d
Highlighters: tweak colorize_cplusplus
2011-12-28 18:52:35 +00:00
Maxime Coste
0e398566d2
Buffer: fix compute_lines on empty_buffer
2011-12-28 18:52:14 +00:00
Maxime Coste
aa1c4d64f9
Completions: complete_filename correctly support directories
2011-12-22 13:44:04 +00:00
Maxime Coste
6fa5d809ef
whitespace fix
2011-12-22 13:33:29 +00:00
Maxime Coste
67c08e598b
IncrementalInserter: preserve selection through hook call
2011-12-21 19:06:51 +00:00
Maxime Coste
f77fc3980b
Window: store a stack of selections
2011-12-21 19:06:26 +00:00
Maxime Coste
c11b548662
kakrc: cleanup trailing whitespaces when quiting insert mode
2011-12-21 18:58:41 +00:00
Maxime Coste
70bb4847ee
IncrementalInserter: catch exception thrown by the hook
2011-12-21 18:57:07 +00:00
Maxime Coste
6c817c8117
Window: do not manage undo groups when an inserter is active
2011-12-21 18:56:32 +00:00
Maxime Coste
913ee3f096
Use Keys instead of char for keymap
2011-12-21 14:29:28 +00:00
Maxime Coste
ba1fe056f4
Add an exec command, similar to vim normal command
2011-12-20 19:22:05 +00:00
Maxime Coste
7116ed6d61
Window: throw when multiselect results in no selections
2011-12-20 19:27:13 +00:00
Maxime Coste
42a24895de
Add Key struct
2011-12-20 19:21:11 +00:00
Maxime Coste
91606850fd
Utils: add on_scope_end utility
...
on_scope_end permits to register a functor to be called at scope
end (either exception thrown or normal scope end). this is usefull
for cleanup code that must be run.
usage:
auto cleaner = on_scope_end([]() { cleanup(); });
2011-12-20 19:18:00 +00:00
Maxime Coste
17cab9c7c4
Filters: add cleanup_whitespace filter
...
this filter remove trailing whitespaces on the previous line
when inserting an end-of-line.
2011-12-20 14:27:01 +00:00
Maxime Coste
e77f58c010
better rvalue reference forwarding
2011-12-07 18:57:07 +00:00
Maxime Coste
2239fb6e49
Filters: move from buffer to window
2011-12-07 14:29:10 +00:00
Maxime Coste
c40eb2b03a
Buffer: replace insert and erase methods with modify
...
modify directly takes a Modification as parameter
2011-12-07 14:26:40 +00:00
Maxime Coste
2edddfe009
Buffer: rename BufferModification to Modification
2011-12-06 18:58:43 +00:00
Maxime Coste
73cebb9072
kakrc: do not highlight the end-of-line in trailing whitespaces
2011-12-06 18:50:05 +00:00
Maxime Coste
b245d80c4e
Window: preserve current selection when empty multi_select
2011-12-05 19:21:16 +00:00
Maxime Coste
4ae2fcffbd
Buffer: add comment for clamp
2011-12-05 19:21:11 +00:00
Maxime Coste
711c05b81e
Window: fix trailing spaces
2011-12-05 14:29:36 +00:00
Maxime Coste
23eafd4504
Add a repeat last insert command, bound to .
2011-12-05 14:28:45 +00:00
Maxime Coste
d1cc5da8a6
Filters: add expand_tabulations to insert spaces instead of tabs
2011-12-03 20:25:05 +00:00
Maxime Coste
74a315cd0e
kakrc: add preserve_indent filter on c++ files and highlight trailing spaces
2011-12-02 19:01:08 +00:00
Maxime Coste
c761420055
fix exec_commands_in_file
2011-12-02 19:00:37 +00:00
Maxime Coste
11d606f79e
{Filter,Highlighter}Registry: more infos on factory not found
2011-12-02 19:00:01 +00:00
Maxime Coste
0b4ed2280f
Buffer: call BufCreate hook on construction
2011-12-02 18:59:18 +00:00
Maxime Coste
8e39edc567
DynamicBufferIterator: fix end of buffer corner case
2011-12-02 18:57:18 +00:00
Maxime Coste
b1daf8de16
Selectors: fix select_line on the last line
2011-12-02 18:56:18 +00:00
Maxime Coste
94d59cc4dd
Buffer: add filter support
...
filters are functions called prior to applying a modification
to a buffer. They can manipulate the modification to change
the editor behaviour.
2011-12-02 14:28:27 +00:00
Maxime Coste
8e06e168d9
HighlighterRegistry: use idvaluemap to store factories
2011-12-02 14:22:51 +00:00
Maxime Coste
4252e0d610
Window: use an idvaluemap to store highlighters
2011-12-02 14:20:11 +00:00
Maxime Coste
a5a726d291
Add idvaluemap container
...
it is a vector based map, preserving insertion order and providing
completion on ids it contains.
2011-12-02 14:18:31 +00:00
Maxime Coste
934e62b502
stop clearing selections all the time
2011-11-30 14:18:54 +00:00
Maxime Coste
d8dd782960
Highlighters: style fix
2011-11-30 14:11:53 +00:00
Maxime Coste
0b48525b35
Window: do not stay on an eol when clearing selections
2011-11-29 22:48:00 +00:00
Maxime Coste
0859b20bcf
Rename Filter to Highlighter to be more explicit
2011-11-29 22:37:20 +00:00
Maxime Coste
e89516f2a3
IncrementalInserter: refactoring
2011-11-29 21:35:50 +00:00
Maxime Coste
b24dec89a2
Buffer: add iterator_at_line_{begin,end} methods
2011-11-28 19:31:29 +00:00
Maxime Coste
51ee0b61f4
DynamicBufferIterator: use const_cast instead of having a mutable field in Buffer
2011-11-28 18:55:17 +00:00
Maxime Coste
46a01b5a0b
Debug: stop writing key codes to debug buffer and cleanups
2011-11-28 18:52:29 +00:00
Maxime Coste
dc642f8afa
Buffer: refactor to remove do_{insert,erase} methods
2011-11-27 18:41:25 +00:00
Maxime Coste
08ba791ff4
Add a kakrc file which automatically enables hlcpp on c/c++ files
2011-11-27 13:02:50 +00:00
Maxime Coste
70e0393c4d
Add a source command to execute commands from file
...
a kakrc file in current directory is sourced automatically
at start
2011-11-27 12:59:59 +00:00
Maxime Coste
de19aeb035
File: extract read_file function which returns file content in a string
2011-11-27 12:56:38 +00:00
Maxime Coste
b59a0816b9
Add wq and wq! commands
2011-11-26 19:11:24 +00:00
Maxime Coste
e36153f035
CommandManager: fix complete and style tweak
2011-11-26 19:05:49 +00:00
Maxime Coste
a00961da99
Add hook command
2011-11-26 18:41:55 +00:00
Maxime Coste
dd2896ecc8
Window: call WinCreate hook on creation
2011-11-26 18:39:59 +00:00
Maxime Coste
9c117a821c
Filters: fix colorize_regex_range when range is not visible
2011-11-26 18:34:49 +00:00
Maxime Coste
68f3d24199
HooksManager: replace HookContext with Context
2011-11-26 18:34:10 +00:00
Maxime Coste
957446dee4
Add a Context parameter to commands
2011-11-26 18:32:57 +00:00
Maxime Coste
417802cbdf
CommandManager: argument splitting supports "multi word"
...
works with " and '
2011-11-26 17:20:02 +00:00
Maxime Coste
9775958012
Add a HooksManager class
2011-11-25 14:26:29 +00:00
Maxime Coste
9a4d8d5f4d
Filters: tweak colorize_cplusplus
2011-11-24 19:13:58 +00:00
Maxime Coste
dcfb5e15f2
SelectionHighlighter: highlight end of lines in selection
2011-11-24 19:13:38 +00:00
Maxime Coste
ea2aeea3a4
Filters: generalize colorize_regex in colorize_regex_range
2011-11-24 19:11:58 +00:00
Maxime Coste
2549a63c0b
Selectors: fix corner cases on first/last buffer char
2011-11-24 18:46:35 +00:00
Maxime Coste
30b4fb6513
Buffer: fix handling of last eol
2011-11-24 14:23:41 +00:00
Maxime Coste
7b09b34cab
Selectors: fix select_whole_lines
2011-11-22 18:58:05 +00:00
Maxime Coste
d27aaab066
use alt-x instead of , to select whole lines
2011-11-22 14:31:20 +00:00
Maxime Coste
a1200aacad
Add alt-j command to join lines
2011-11-22 14:24:50 +00:00
Maxime Coste
95f87a6694
Window: add replace method
...
permits to replace selection by a string in a single undo step
2011-11-22 14:23:46 +00:00
Maxime Coste
a7309fbe87
IncrementalInserter: fix erase
2011-11-21 22:18:00 +00:00
Maxime Coste
7861ad9ddb
Selectors: add split_selection bound to Alt-s
2011-11-21 19:30:44 +00:00
Maxime Coste
b67c36358d
Extract RegexSelector methods as plain selectors
2011-11-21 19:08:51 +00:00
Maxime Coste
2677fa7961
Add , to fully selects lines selection is on.
2011-11-21 18:53:22 +00:00
Maxime Coste
a1a57ea137
DisplayBuffer: fix DisplayAtom::iterator_at
2011-11-16 21:03:32 +00:00
Maxime Coste
bef193ae54
RegexSelector: support captures
2011-11-16 20:05:29 +00:00
Maxime Coste
18913cfbff
IncrementalInserter: add insert_capture method bound to ^B<num>
2011-11-16 19:24:37 +00:00
Maxime Coste
52b8abfe02
Selections: add captures field
...
Selections now can have associated captures, for backreferences when
selections are created from a regex search
2011-11-16 19:23:09 +00:00
Maxime Coste
b1e815a66c
RegexSelector: support multi selections, bound to s key
2011-11-16 14:06:01 +00:00
Maxime Coste
0203b904e1
Window: add multi_select method
...
multi_select provides Selection -> SelectionList operations
2011-11-16 14:04:45 +00:00
Maxime Coste
7423677236
Filters: cleanup trailing whitespaces
...
detected with ':addfilter regex \h+\n default red' !
2011-11-15 14:28:03 +00:00
Maxime Coste
d1868e8f07
ncurses: set ESCDELAY to 25 so that esc key lag is less noticeable
2011-11-15 14:26:28 +00:00
Maxime Coste
a3b5c74512
remove unused code
2011-11-14 14:27:33 +00:00
Maxime Coste
031fa1a25c
Filters: colorize_regex supports matches spanning multiple display atoms
2011-11-14 14:23:02 +00:00
Maxime Coste
d2b9cd6e60
DisplayBuffer: split now preserve iterator parameter
...
that means that the given iterator points to the first part of the
split (instead of the second in previous implementation).
2011-11-14 14:10:11 +00:00
Maxime Coste
0dc8442ca4
Completions: add filterid completion for rmfilter
2011-11-12 14:15:35 +00:00
Maxime Coste
a8b2c4f568
Completions: add basic addfilter completion
2011-11-12 14:08:05 +00:00
Maxime Coste
f5ad32f137
Completion: decentralise, move buffer name completion to BufferManager
2011-11-12 14:06:49 +00:00
Maxime Coste
82baa55eed
Completions: change NullCompletion functor to complete_nothing function
2011-11-10 20:57:25 +00:00
Maxime Coste
56231b4239
Filters: make colorize_regex accessible through addfilter
2011-11-10 14:28:38 +00:00
Maxime Coste
f12929abad
Filters: refactoring
2011-11-09 23:56:22 +00:00
Maxime Coste
5aeee719dd
fix launching on new file
2011-11-09 14:17:46 +00:00
Maxime Coste
55c092eed9
Filters: code cleanup
2011-11-09 14:06:05 +00:00
Maxime Coste
3af1b89034
Window: support adding and removing filters with :addfilter :rmfilter
2011-11-08 14:29:52 +00:00
Maxime Coste
1f3f5ea1ba
Filters: register existing filters with the registry
2011-11-08 14:28:01 +00:00
Maxime Coste
e4ff1d8ad8
Add a filter registry class
2011-11-08 14:27:21 +00:00
Maxime Coste
0ddb6df80d
IncrementalInserter: move cursor left when finishing
2011-11-04 14:15:35 +00:00
Maxime Coste
46e727d5b6
Filters: tweak colorize_cplusplus
2011-11-04 09:10:28 +00:00
Maxime Coste
cebb7980cb
Buffer: tweak default content
2011-11-04 09:10:05 +00:00
Maxime Coste
9cf7cb682c
Buffer: fix modified handling
2011-11-03 13:44:02 +00:00
Maxime Coste
4982620c4c
IncrementalInserter: support insert at line begin and append at line end
2011-11-02 20:03:41 +00:00
Maxime Coste
856a870d8b
fix not existing lines drawing
2011-11-02 14:22:20 +00:00
Maxime Coste
fbe8eed3e4
Selectors: select_line selects next line when cursor is on eol
2011-10-27 18:57:31 +00:00
Maxime Coste
0e18db5a88
lines and columns used for user interaction are 1-indexed
2011-10-27 14:27:39 +00:00
Maxime Coste
55cd4949e0
Selection: more intelligent merging
2011-10-27 14:22:17 +00:00
Maxime Coste
62482b65ec
rename buffer_iterator.inl.h to buffer_iterator.inl.hh
2011-10-27 14:13:39 +00:00
Maxime Coste
5bd61a3f38
Filters: correct select_to_previous_WORD
2011-10-27 14:09:57 +00:00
Maxime Coste
c532f031d2
Filters: tweak colorize_cpluscplus
2011-10-26 14:29:04 +00:00
Maxime Coste
b58694939c
bind alt-[lLhH] to select_to_eol(_reverse)?
2011-10-26 14:22:48 +00:00
Maxime Coste
5d5e76a3eb
change select_line binding from . to x
2011-10-26 14:18:43 +00:00
Maxime Coste
2c8f3229c0
Selectors: add selectors for WORDs
...
WORDs are the same as vim's ones, i.e. a group of contiguous non blank
characters. They are bound as alt + word selector key.
2011-10-25 18:46:14 +00:00
Maxime Coste
97a279e229
add alt-key binding support
...
bind alt-[tTfF] to backward version of [tTfF]
2011-10-25 14:28:20 +00:00
Maxime Coste
57b55a5824
DisplayBuffer: deactivate too expensive check
2011-10-24 19:27:36 +00:00
Maxime Coste
d2c6ceb47b
DynamicBufferIterator: add and use in Selections
...
DynamicBufferIterator are a new type of BufferIterators that
automatically update themselves when their buffer is modified.
Selections now uses this type of iterators instead of plain ones
2011-10-24 14:26:21 +00:00
Maxime Coste
bace526fa3
Buffer: not copyable, add destructor
2011-10-24 14:23:13 +00:00