Maxime Coste
d78a586126
Do not allow using color names as face names
2014-08-19 23:16:21 +01:00
Maxime Coste
d78e331304
Allow faces to reference faces
...
Fixes #102
2014-08-19 23:10:56 +01:00
Maxime Coste
bea53d09b2
Remove option checkers, handle that through the type system
...
Use a specific type for InsertCompleterDesc with checks in
the option_{from,to}_string functions
2014-08-19 18:56:11 +01:00
Maxime Coste
a36aed94f1
Add support for operator== to Optional
2014-08-19 18:55:36 +01:00
Maxime Coste
2e2812b10f
Do not escape completions in completer functions let the client decide
...
Fixes #231
2014-08-18 23:31:02 +01:00
Maxime Coste
e6b9a1d982
Get forced file descriptors after calling poll
...
That way, we do not wait for the next poll to finish before servicing
forced fd triggered by a signal that interupted the poll call.
2014-08-17 15:58:42 +01:00
Maxime Coste
6ba3017a8e
Always inline a few more methods
2014-08-17 15:36:12 +01:00
Maxime Coste
5c3f01fea2
Add exception reporting in filter mode
2014-08-17 15:19:04 +01:00
Maxime Coste
8d4531d419
Add support for reading from stdin/writing to stdout in filter mode
...
Note that kakoune still needs to read the whole buffer first, only
once stdin is closed can it execute the keys.
2014-08-15 13:21:54 +01:00
Maxime Coste
eff32aa1a1
Refactor, remove kakoune function and move it inside main.
2014-08-14 23:57:13 +01:00
Maxime Coste
ceb10665d1
Add support for running kakoune as a filter, using -f 'keys'
...
It will cycle on every given files, apply the keys and write to
<filename>.kak-out. Only normal/insert mode is available, kakrc
are not read.
2014-08-14 23:51:24 +01:00
Maxime Coste
0588780866
Refactor main loops, use separate functions for each running mode
...
Server, Client, and Pipe are handle through separate functions,
with the kakoune function handling parameter parsing.
2014-08-14 20:37:36 +01:00
Maxime Coste
aaa6d3ab39
memoryview: add support for reverse iteration
2014-08-14 20:35:03 +01:00
Maxime Coste
fbbe741c07
Add support for <c-w> <c-b> and <c-e> for word moves in the line editor
...
This might go away later if we find a better way of handling line
edition, but seems like a good compromise for now.
Fixes #168
2014-08-14 00:31:39 +01:00
Maxime Coste
518b995720
NCurses: properly handle ctrl+alt
2014-08-14 00:30:32 +01:00
Maxime Coste
2204b7cf06
Defer deletion of buffers to after the event loop
...
We can have SelectionList in flights on the buffer, so mark
it for deletion by moving it in a buffer trash, and effectively
delete it later, at a point where there should not be any further
access to it.
2014-08-12 19:24:09 +01:00
Maxime Coste
e2b3dd0ca4
Tweak client redraw logic, avoid highlight if only status line changed
2014-08-12 19:19:46 +01:00
Maxime Coste
d356ae2419
Make safe_ptr able to track callstacks
...
The code stays disabled, as the performance penalty is quite
high, but can be enabled to help debugging safe pointers.
2014-08-12 19:18:10 +01:00
Maxime Coste
1b54b65bb5
Add an operator[](CharCount) to String and StringView
2014-08-11 19:40:35 +01:00
Maxime Coste
43f44bbab3
Fix buffer modification check
...
It used to grab the next key, because the normal mode reactivation
when executing the on_next_key would trigger a timestamp check again.
2014-08-07 21:51:36 +01:00
Maxime Coste
c4f0c4dee6
Change escaping method for command completion
2014-08-03 10:03:14 +01:00
Maxime Coste
8ee2aa9ba7
Use more StringView in string helper functions
2014-08-03 10:02:17 +01:00
Maxime Coste
de402c4703
Fix buffer name completion when basename only
2014-08-03 10:00:34 +01:00
Maxime Coste
aac02410b1
Buffer completion match directory names as well for subsequence match
2014-07-31 22:43:36 +01:00
Maxime Coste
beb6065a71
Add a -existing switch to edit command
...
with this switch, fail if the file is not found rather than creating
a new one. Use that in grep and make jump commands.
2014-07-31 22:10:01 +01:00
Maxime Coste
5fc063c520
Insert word completion: Use subsequence matching if prefix failed
2014-07-30 19:58:34 +01:00
Maxime Coste
4c31449a65
Add access to specific env vars in %val{...} evaluation
2014-07-30 19:17:04 +01:00
Maxime Coste
31f9d87798
Only change search register when prompt are validated
...
Fixes #160
2014-07-30 19:15:16 +01:00
Maxime Coste
9fe4724743
Stop macro recording on esc in normal mode
...
Fixes #221
2014-07-30 01:09:04 +01:00
Maxime Coste
06fc329739
Rewrite real_path, try to find an existing directory in the given path
...
Never throw, return the given filename in the worst case.
2014-07-30 00:03:01 +01:00
Maxime Coste
8ed16bb2e9
In non interactive interactive mode, disable user key mappings
...
exec and eval now accepts a -with-maps to use them. But by default
they are disabled, so that all the indent scripts work even if you
remap basic keys.
Fixes #217
2014-07-27 20:18:09 +01:00
Maxime Coste
7c10660f9a
Fix resize handling in ncurses UI
2014-07-26 22:38:10 +01:00
Maxime Coste
8d6e8bc06f
Display a [no-hooks] tag in the mode line when hooks are disabled
2014-07-25 23:47:47 +01:00
Maxime Coste
6813440212
Fix Selection::insert when replacing with empty string at the end of the buffer
2014-07-25 23:47:11 +01:00
Maxime Coste
731277a425
Disable hooks on a per context basis, and propagate that to Insert mode
...
using \ before entering insert mode will disable hooks during the whole
insert session rather than only the entering phase. That gives a nice
way of pasting text into kakoune.
2014-07-24 19:18:39 +01:00
Maxime Coste
826bf22eef
fix align with multiple columns
2014-07-22 00:41:10 +01:00
Maxime Coste
bc48d9260d
Fix Menu use of j/k keys when editing filter
2014-07-22 18:39:04 +01:00
Maxime Coste
3c021672d2
Add completion support for rmhooks
2014-07-21 21:14:32 +01:00
Maxime Coste
50abc18c8e
Add some more force inlines to some buffer methods
2014-07-19 00:18:16 +01:00
Maxime Coste
f4e3df817f
Clear status line on normal mode command
2014-07-17 19:37:30 +01:00
Maxime Coste
880a8becb6
Fix ncurses flickering of the menu and info box
2014-07-16 23:11:18 +01:00
Maxime Coste
032b621150
Use strongly typed enum for Face Attribute, add Dim
2014-07-15 20:11:47 +01:00
Maxime Coste
e6699c66ed
Fix comment parsing error in CommandManager
2014-07-15 13:15:21 +01:00
Maxime Coste
ac5cbba0ae
Remove region highlighter, rename multi_regions to regions, cleanup
2014-07-14 21:42:19 +01:00
Maxime Coste
ec37adc523
Fix bug in nested highlighting
2014-07-14 21:41:29 +01:00
Maxime Coste
d5d76721b0
Avoid infinite loop in MultiRegionHighlighter when regexes generate empty matches
2014-07-14 20:46:46 +01:00
Alex Leferry 2
12cdfb316a
underline (MatchingChar|Search) faces
2014-07-14 20:23:56 +01:00
Maxime Coste
b96f653b6c
Fix numbering with '#' register
2014-07-14 19:00:54 +01:00
Maxime Coste
cbfceba149
Do not resolve faces in highlighter factories, defer to actual highlighting
2014-07-13 16:52:51 +01:00
Maxime Coste
d78ece490f
Rename RegexColorizer to RegexHighlighter
2014-07-12 13:57:16 +01:00
Maxime Coste
72ccb9bce6
Refactor RegexColorizers face handling
2014-07-12 11:19:35 +01:00
Maxime Coste
d0d4108085
Rename :colalias to :face and update documentation
2014-07-12 10:55:50 +01:00
Maxime Coste
608e188960
Support attributes in face specifications
2014-07-11 00:44:59 +01:00
Maxime Coste
a32b49acd1
Rename ColorPair to Face and ColorRegistry to FaceRegistry
...
Face also stores the attributes
2014-07-11 00:27:43 +01:00
Maxime Coste
42611aef1e
Fix select_number
2014-07-10 19:22:14 +01:00
Maxime Coste
b6979e2d2c
Add docstring for normal mode commands and display them if autoinfo >= 2
2014-07-10 19:22:14 +01:00
Maxime Coste
4c3bd68876
Change autoinfo option to be an integer, allowing different levels
2014-07-10 19:22:14 +01:00
Maxime Coste
81d3eadd09
:edit! without argument reload current buffer
2014-07-10 19:22:14 +01:00
Maxime Coste
9952704eaf
Fix :map scope completion
2014-07-08 00:53:06 +01:00
Maxime Coste
c6df0c9174
Do not write '*** kak: fifo closed ***' in buffers
...
The status line '[fifo]' flag should replace that
2014-07-07 23:56:17 +01:00
Maxime Coste
55866b51d7
Fix redrawing of windows when only the status line changes
2014-07-07 23:56:17 +01:00
Maxime Coste
90c2647c0b
Use colors in status bar for certain flags
2014-07-07 23:56:17 +01:00
Maxime Coste
7726db0799
NCurses: change scroll bar characters
2014-07-05 19:18:59 +01:00
Maxime Coste
fc7f017372
Remove 'ReplaceMain' select mode
2014-07-05 12:37:49 +01:00
Maxime Coste
a61db7ef5e
Merge remote-tracking branch 'alexherbo2/previous-match'
2014-07-05 12:36:35 +01:00
Maxime Coste
9439d28028
More consistent <space> and <a-space> behaviour
...
<space> and <a-space> without count now remove all except/keep
main selection. Without reducing main selection to cursor.
Reduce to cursor is moved to ';' and flip selections to <a-;>
2014-07-05 12:10:06 +01:00
Maxime Coste
60bf540ee6
NCurses: better support for 256 color terminals that cannot change colors
2014-07-05 12:10:06 +01:00
Maxime Coste
d181a40a91
Add support for paste all (on <a-[pP]>)
...
Paste all pastes all yanked text at all selections, selecting each
pasted text.
Replace paste moves to R, and concat yank/concat delete (Y and D)
are removed.
Fixes #161
2014-07-05 12:10:06 +01:00
Maxime Coste
8795efdf19
Minor style cleanup
2014-07-05 12:10:06 +01:00
Maxime Coste
ed68d1ff28
utf8: use end of sequence iterators for more security
2014-07-05 12:10:06 +01:00
Maxime Coste
3f70d91f8c
Use unsigned char rather than char in utf8 decoding to avoid sign extension
2014-07-05 12:10:06 +01:00
Alex Leferry 2
581dc59fb8
add alt-n commands to (replace|append) previous match
...
Note: alt-n command were used to replace main selection with next match
(preserving the others)
2014-07-03 15:27:07 +02:00
Maxime Coste
d69664f401
Add :waq for write all an quit, with slight refactoring
...
Fixes #175
2014-07-01 20:38:55 +01:00
Maxime Coste
ffe8143cc7
Accept upper case macro names, convert them to lower case
2014-07-01 08:48:52 +01:00
Maxime Coste
b18db68c8a
Fix spurious eol appearing in non scrolling fifo buffers
2014-06-30 18:56:18 +01:00
Maxime Coste
d6bb5b5a4b
Canonicalize filenames when checking if a buffer was written to its file
2014-06-29 22:03:59 +01:00
Maxime Coste
df3bf7445d
Replace boost::optional with our own implementation
2014-06-27 21:10:09 +01:00
Maxime Coste
7aa78d726a
fix potential infinite loop in show_matching highlighter
2014-06-27 21:10:09 +01:00
Maxime Coste
63878b03c5
Style fixes
2014-06-26 19:01:39 +01:00
Maxime Coste
047488a8da
Fix recursive string parsing, correct handling of escapes
2014-06-26 18:59:41 +01:00
Maxime Coste
5b27b956ad
Rename utf8::utf8_iterator to utf8::iterator
2014-06-24 19:10:57 +01:00
Maxime Coste
b934c8ede5
Fix crash in Context::main_sel_register_value
2014-06-23 13:16:51 +01:00
Maxime Coste
df4983b6d4
Do not try to reload buffer if the buffer was deleted
...
Fixes #121
2014-06-22 11:09:44 +01:00
Maxime Coste
b89b7c754f
Add \ in normal mode to disable user hooks on next normal command
...
Fixes #112
2014-06-21 22:06:02 +01:00
Maxime Coste
edd883ad18
Only user hooks can be disabled
2014-06-21 12:08:19 +01:00
Maxime Coste
7235180614
Use main selection index as default when accessing only one register value
...
Fixes #117
2014-06-21 11:31:08 +01:00
Maxime Coste
e202b7af50
Add a line_option highlighter that highlight the line stored in an int option
...
Use it to highlight the current error in the *make* buffer
2014-06-18 20:50:39 +01:00
Maxime Coste
6f2569ff30
Color Default now means 'keep as is' for most highlighters
2014-06-18 20:33:23 +01:00
Maxime Coste
54590f5d79
Minor code cleanup in highlighters
2014-06-18 20:31:49 +01:00
Maxime Coste
1c69764774
Merge branch 'master' into hierarchical-highlighters
2014-06-18 20:20:58 +01:00
Maxime Coste
9aa8c8a60a
Add a %val{...} expand type
...
%val{name} gives access to values given in shell through $kak_<name>
2014-06-18 19:32:13 +01:00
Maxime Coste
b8a205b858
Use -group rather than -id in hooks to mirror highlighters closer
2014-06-16 20:42:12 +01:00
Maxime Coste
3ef5bf53d5
Add BufCloseFifo hook and use that to remove fifo directories
2014-06-16 19:50:20 +01:00
Maxime Coste
fc6a16a571
Fix corner cases in region highlighting
2014-06-16 19:41:07 +01:00
Maxime Coste
51da452dc4
Merge branch 'master' into hierarchical-highlighters
2014-06-16 01:06:09 +01:00
Maxime Coste
e78fd2d235
Do not merge overlapping selection when entering append mode
...
Fixes #163
2014-06-16 01:05:38 +01:00
Maxime Coste
2acfe85281
Highlight selection cursors in a second pass
...
This allows cursors to overlap on next selection and still be
visible.
2014-06-16 00:59:05 +01:00
Maxime Coste
c87e81e8de
Use zstr instead of c_str in ncurses addutf8str
2014-06-16 00:53:25 +01:00
Maxime Coste
b5f5610cbe
Share implementation in complete_id/complete_group_id
2014-06-16 00:49:39 +01:00
Maxime Coste
205e8b2889
Refactor highlighter command completions
2014-06-15 16:04:38 +01:00