Maxime Coste
192e0c33f9
Cache commands in complete_commands
...
Iterating through all directories in path to find commands
can end up quite slow, so cache the result per directory and
update it only if the directory modification time changed.
2014-04-24 19:08:05 +01:00
Maxime Coste
418a04f49d
Support reading strings more that 2048 bytes
...
fixes #95
2014-04-23 22:21:04 +01:00
Maxime Coste
389308dfd8
Preserve current word in word completion if found elsewhere
...
If occurence count in the buffer if greater that one, do not
remove it from the matches.
2014-04-22 19:32:12 +01:00
Maxime Coste
65c818b859
Use StringView in CommandManager
2014-04-21 21:49:25 +01:00
Maxime Coste
8beda67fae
Use StringView in FunctionGroup and FunctionRegistry
2014-04-21 10:50:09 +01:00
Maxime Coste
a1ec45d91a
Use StringView in id_map
2014-04-21 10:47:21 +01:00
Maxime Coste
5ebd588e5f
remove unused memoryview<char> String::data
2014-04-21 00:26:20 +01:00
Maxime Coste
61619d82bf
use StringView::zstr() in place of StringView::str().c_str()
2014-04-21 00:26:20 +01:00
Maxime Coste
7cdb94d5c7
Use StringView in shell manager
2014-04-21 00:26:20 +01:00
Maxime Coste
63a0b9d22a
Add a zstr() method to StringView that returns a zero terminated string holder
2014-04-21 00:26:20 +01:00
Maxime Coste
c4295b7e30
Fix StringView::substr when passed a negative length
2014-04-20 12:03:57 +01:00
Maxime Coste
055eacd032
use StringView for parse_keys
2014-04-20 11:27:59 +01:00
Maxime Coste
b2123547df
Use StringView in BufferManager
2014-04-19 09:53:37 +01:00
Maxime Coste
97b08a6f09
Use StringView for file functions
2014-04-18 14:03:08 +01:00
Maxime Coste
adde2fef75
Use StringView for completion functions
2014-04-18 14:02:14 +01:00
Maxime Coste
af2d82dfc1
Add StringView class for non owning string
2014-04-18 13:47:39 +01:00
Maxime Coste
a7e6e5b936
Remove unimplemented String::replace method
2014-04-18 13:19:07 +01:00
Maxime Coste
1d7a481e81
word completion ignore the word on which the cursor is present
2014-04-17 19:33:49 +01:00
Maxime Coste
2b997719c3
Rename BufferCompleter to InputCompleter
2014-04-16 19:08:44 +01:00
Maxime Coste
7af9863e51
Add an explicit refresh method to user interface
...
With this refresh method user interface can defer updating
the display until really needed.
2014-04-15 19:19:44 +01:00
Maxime Coste
98c6a6f17e
RemoteClient process all available messages
2014-04-15 19:09:42 +01:00
Maxime Coste
374f97a592
fix exception being thrown in error in decl command
2014-04-14 19:01:00 +01:00
Maxime Coste
386813bbfd
Add a 'prompt' command
2014-04-13 14:15:34 +01:00
Maxime Coste
7097fcf640
Allow unset completer function in Prompt input mode
2014-04-13 14:15:05 +01:00
Maxime Coste
9ff356cb2b
Extract option descriptions in an shared OptionDesc class
2014-04-12 20:03:26 +01:00
Maxime Coste
e9276a0a85
Add a docstring to options
2014-04-11 18:43:25 +01:00
Maxime Coste
05d69f7f8e
Use stat when listing files so that link to directories are handled as directories
2014-04-11 18:43:25 +01:00
Jimmy Thrasher
061264c039
Define extern char **environ for OSX, which doesn't define it in a header
2014-04-10 15:23:39 -04:00
Maxime Coste
30bdc8936b
Fix select_whole_lines on empty buffer
2014-04-10 20:14:11 +01:00
Maxime Coste
19868f01c8
return a const String& in Option::name()
2014-04-09 19:33:37 +01:00
Maxime Coste
e0424ba017
Minor formatting fixes (very long lines)
2014-04-08 20:09:54 +01:00
Maxime Coste
20d20ae1dc
formatting changes in command_manager.cc
2014-04-08 19:55:31 +01:00
Maxime Coste
203a7732f5
Add support for querying client environement variables
...
At connection, a remote client sends all its environement to the
server, which then provides access to client env through
kak_client_env_VAR_NAME variables in the shell.
2014-04-07 23:47:51 +01:00
Maxime Coste
33de42610d
Add g. command to go to the last buffer modification position
2014-04-07 23:47:50 +01:00
Maxime Coste
a387e7a4c6
the 'def' commands now supports -(buffer|client)-completion switches
2014-04-07 23:47:50 +01:00
Maxime Coste
ca54909246
Add ClientManager::complete_client_name
2014-04-07 23:47:50 +01:00
Maxime Coste
a9b3a8b0d6
rename BufferManager::complete_buffername to complete_buffer_name
2014-04-07 23:47:50 +01:00
Maxime Coste
0df088be20
Code cleanup in list_files
2014-04-06 10:59:51 +01:00
Maxime Coste
b01ba59911
Merge remote-tracking branch 'jjthrash/fix-closedir-crash'
2014-04-06 02:58:34 +01:00
Jimmy Thrasher
fd5406282d
Fix crash caused by attempting to close a nonexistent DIR*
2014-04-05 18:00:59 -04:00
Maxime Coste
9b7d8a93c8
code formatting tweak
2014-04-05 12:04:37 +01:00
Maxime Coste
39983e54d0
minor code style tweak
2014-04-04 00:00:06 +01:00
Maxime Coste
3c40ac50af
Add %rec{...} string that recursively expand %block inside
...
the result is then used as one token
2014-04-03 23:57:14 +01:00
Maxime Coste
c4e694fb7b
Merge remote-tracking branch 'jjthrash/osx-install-fixes'
2014-04-03 20:26:47 +01:00
Jimmy Thrasher
cd8fa49ad1
Remove redundant -D that was causing problems on OSX
...
The prior `mkdir -p` took care of what -D was supposed to do.
2014-04-03 14:55:59 -04:00
Maxime Coste
fb72effde8
Fix cygwin detection in Makefile
2014-04-03 19:12:29 +01:00
Jimmy Thrasher
43b395533f
Use plain libncurses with Apple
2014-04-03 13:56:03 -04:00
Jimmy Thrasher
0bb46c8968
Detect Darwin in the Makefile and plan accordingly
2014-04-03 13:56:03 -04:00
Jimmy Thrasher
d2e9486f2d
Fix some more constexpr issues for clang
2014-04-03 13:56:03 -04:00
Maxime Coste
e94a82ac98
More OSX fixes
2014-04-02 22:52:00 +01:00
Maxime Coste
bf84f5dcef
Fix compilation with OSX C++ lib
2014-04-02 22:41:06 +01:00
Maxime Coste
e1a9d5f71e
Fix clang compilation
2014-04-02 22:33:52 +01:00
Maxime Coste
84c30c4b8a
Minor formatting changes
2014-04-01 18:54:46 +01:00
Maxime Coste
ac90839c3d
Select previous sentence or paragraph if selecting backward from the first char
...
[s and [p on the first char of a sentence or paragraph will select the
previous sentence or paragraph.
2014-03-31 21:46:47 +01:00
Maxime Coste
968922055b
debug command now serves as a frontend to get debug informations
2014-03-31 20:07:35 +01:00
Maxime Coste
60452d9745
echo command accepts -debug switch to write to the debug buffer
2014-03-31 20:07:02 +01:00
Maxime Coste
c3a1318ffd
When selecting forward paragraph and we are on an end of line, select the next one.
...
Fixes #62 . Thanks to alexherbo2.
2014-03-30 11:13:45 +01:00
Maxime Coste
5079d78747
minor cleanup in select_whole_sentence
2014-03-30 11:13:37 +01:00
Maxime Coste
cd908bf6a3
minor cleanup
2014-03-30 10:45:53 +01:00
Maxime Coste
2a7335edef
Add basic support for colalias completion
2014-03-29 13:18:46 +00:00
Maxime Coste
0fe9683c0f
Fix indent/deindent when only empty lines are selected
2014-03-29 09:02:09 +00:00
Maxime Coste
da9d099f3b
Remove Range struct, merge it back in Selection
2014-03-29 08:55:45 +00:00
Maxime Coste
c38e14958f
Change default menu colors
...
Distinguish menus from selection more easily
2014-03-29 08:54:45 +00:00
Maxime Coste
159e0d049d
rotate selection content count parameter groups selections
...
the count parameter does not specify the rotation count, but
the size of the rotation groups. with 2 for exemple, selection
contents will be swapped for each pair (1 and 2, 3 and 4, ...)
2014-03-27 00:11:30 +00:00
Maxime Coste
b6e268500d
notify buffer saved after closing the file descriptor
2014-03-26 19:11:04 +00:00
Maxime Coste
248e5ae6c0
fix file reload prompt displaying invalid message
2014-03-26 19:06:16 +00:00
Maxime Coste
58b4e29e81
ShellManager: Change the env var detection regex to find more uses
...
The regex is now just '\bkak_\w+\b', no need for it to be looking
like a shell variable use.
This allows other tools that the shell to access Kakoune vars as
long as the name appears directly in the shell string.
2014-03-25 19:43:56 +00:00
Maxime Coste
764e450fdd
Remove the shell option, always use /bin/sh
2014-03-25 09:28:44 +00:00
Maxime Coste
b677f9da63
do not write the trailing nul char in send_commands
...
That triggered creation of a new client, followed by it's immediate
destruction due to the connection closing.
2014-03-25 09:23:11 +00:00
Maxime Coste
0bc57e43d2
Server: correctly handle Accepters lifetime
...
When exiting kakoune, ClientAccepters (now Server::Accepter) could
stay alive, which left an FDWatcher in the EventManager triggering
an assert. Now Server is handling their lifetime.
2014-03-25 09:21:20 +00:00
Maxime Coste
2a23ce1987
FDWatchers are non copiable and non movable
2014-03-25 09:15:56 +00:00
Maxime Coste
ba6f3b833b
fix segfault in parameter parser
2014-03-25 08:21:16 +00:00
Maxime Coste
bbdb2494d1
Merge remote-tracking branch 'evertvp/master'
2014-03-24 21:44:14 +00:00
Evert Van Petegem
369728cd7f
Push aborted commands to history
2014-03-24 22:11:19 +01:00
Maxime Coste
30d36c0f1d
change ncurses menu scroll bar style
2014-03-24 19:36:34 +00:00
Maxime Coste
a4070d9037
Use an info box to prompt for reloading of modified files
2014-03-24 19:31:40 +00:00
Maxime Coste
93ecc3efd6
style tweak
2014-03-22 21:00:24 +00:00
Maxime Coste
459cb212e5
Correctly handle failing to connect to the given session in client mode
2014-03-21 13:42:37 +00:00
Maxime Coste
2cdf578834
Store key names in a constexpr array
2014-03-20 19:52:11 +00:00
Maxime Coste
0cdeb55968
Container utility functions now use the free begin/end functions
2014-03-20 19:51:25 +00:00
Maxime Coste
dc953197c3
Fix support for switches style option in user commands
2014-03-20 19:50:42 +00:00
Maxime Coste
c48bdbe4f1
exec and eval support the -no-hooks option
...
Hooks gets disabled during the execution of the commands
2014-03-20 08:29:41 +00:00
Maxime Coste
be417d3616
Remove dangling forward declaration of Editor class
2014-03-20 08:11:35 +00:00
Maxime Coste
86fd00d1ea
Fix comment
2014-03-20 08:10:31 +00:00
Maxime Coste
0db39ccfd0
Automatic insert filename completion kicks in only if prefix contains slash
2014-03-19 08:05:28 +00:00
Maxime Coste
dc087b3b7c
EventManager: fix busy loop when no timer events exists.
2014-03-18 18:53:35 +00:00
Maxime Coste
36b016226c
Insert mode completion execute completers in order, and supports multiple option
...
The 'completions' option is gone, just add option=completion_option_name
in the completers list.
2014-03-15 03:17:17 +00:00
Maxime Coste
19f5eb65e8
Clamp cursor position on buffer reloading
2014-03-07 01:05:51 +00:00
Maxime Coste
8e0b5d67aa
Fix segfault in get_until_delimiter
2014-03-05 20:57:12 +00:00
Maxime Coste
11c62e583c
Add -p <session> option to kak, which forward commands on stdin to session
...
This allows using directly the kak binary in place of socat for piping commands
to a foreing session.
2014-03-02 02:01:09 +00:00
Maxime Coste
e9442ea307
Rename connect_to's pid parameter to session
2014-03-02 02:00:13 +00:00
Maxime Coste
aab390ab92
Add -docstring option to the 'def' command
...
used defined commands can have their own documentation strings
2014-03-02 01:08:11 +00:00
Maxime Coste
4b9d49d7ab
Add support for -buffer <comma separated names> to eval and exec commands
...
fixes #47
2014-03-02 01:08:11 +00:00
Maxime Coste
15223cba1e
tweak docstring
2014-03-02 01:08:11 +00:00
Maxime Coste
8aaeaa3187
Declare commands in a CommandDesc structure
2014-03-02 01:08:11 +00:00
Maxime Coste
8ac19edf67
Add a docstring to commands
2014-03-02 01:08:11 +00:00
Maxime Coste
e6f5b3c038
Display command info only when the autoinfo option is true
2014-03-02 01:08:11 +00:00
Maxime Coste
486d1269e0
Consistently name -foo things 'switches'
2014-03-02 01:08:11 +00:00
Maxime Coste
9451782648
Add command switches information, and automatically display it
2014-03-02 01:08:11 +00:00
Maxime Coste
7f9f887b4a
All commands now take directly a parameter parser
...
The command parameters description are now stored in a ParameterDesc
structure.
2014-03-02 01:08:11 +00:00
Maxime Coste
bd331742d2
Add @ command for tabs to spaces and alt-@ for spaces to tabs
2014-03-02 01:06:13 +00:00
Maxime Coste
0cd82d0ebe
Rename align indent to more correct copy indent
2014-03-02 01:06:05 +00:00
Maxime Coste
c49e79c9e8
Add buffile env var for getting the buffer filename
2014-02-27 06:44:22 +00:00
Maxime Coste
aceee75ed9
Tolerate invalid %...{} when completing
2014-02-27 06:44:14 +00:00
Maxime Coste
6d651c59d0
regionref highlighter just ignore invalid references
...
fixes #68
2014-02-25 00:19:31 +00:00
Maxime Coste
daeefe2f33
Add support for strings
...
fixes #53
2014-02-15 00:36:00 +00:00
Maxime Coste
14f91e7132
Use a scoped edition when pasting
2014-02-12 00:03:01 +00:00
Maxime Coste
410932330c
EventManager now wakes up for next timer rather than running a 10Hz
2014-02-12 00:03:01 +00:00
Maxime Coste
938f66badd
Check for buffer external change when entering insert mode
2014-02-12 00:03:00 +00:00
Maxime Coste
d2a1c5ce46
Prompt handles scrolling in the line being edited
2014-02-12 00:03:00 +00:00
Maxime Coste
209a4a3ddf
ClientManager: use lifo behaviour for free windows
2014-02-12 00:03:00 +00:00
Maxime Coste
22f2f68d58
Fix LineChangeWatcher behaviour when inserting at buffer end
2014-01-28 19:07:36 +00:00
Maxime Coste
2159fc9563
Rename selections first,last to more explicit anchor,cursor
2014-01-28 19:06:52 +00:00
Maxime Coste
dbd194cea8
Fix autoinfo for angle bracket object
2014-01-27 21:11:45 +00:00
Maxime Coste
e364137196
Fix compilation with clang 3.4
2014-01-27 20:28:38 +00:00
Maxime Coste
2dd4761f89
remove unused Singleton::delete_instance
2014-01-27 19:53:33 +00:00
Maxime Coste
a6d14cecbe
Remove session socket on error signal
2014-01-27 19:53:17 +00:00
Maxime Coste
bbf48e1d39
Honor incsearch option for select/split/keep
...
fixes #37
2014-01-27 19:51:58 +00:00
Maxime Coste
37b4eacdc8
Rework command completion to allow partial token completion
...
Implement hook completion.
fixes #44
2014-01-27 19:51:58 +00:00
Maxime Coste
a32cac2f66
update gdbinit
2014-01-27 19:51:58 +00:00
Maxime Coste
ad818853a2
WordDB now uses a LineChangeWatcher based implementation
2014-01-27 19:51:58 +00:00
Maxime Coste
a96b2d3cd2
Rework regions highlighter, refactor and extract line tracking
2014-01-27 19:51:58 +00:00
Maxime Coste
f6e5deae5a
Add 'a' alias to angle brackets text object
...
fixes #39
2014-01-23 19:45:09 +00:00
Maxime Coste
cccb07c7cd
Catch parameter errors on startup and display option informations
2014-01-23 19:36:07 +00:00
Maxime Coste
c0bc7b6644
write_debug: fallback to stderr if the BufferManager does not exists yet
...
fixes #40
2014-01-23 19:21:00 +00:00
Maxime Coste
4f4a626754
Fix adapt_view_pos when the cursor is not on a display atom by itself
2014-01-21 18:52:51 +00:00
Maxime Coste
2cbb0bb27f
Add a show_matching highlighter
2014-01-20 21:02:43 +00:00
Maxime Coste
f6eaaf1e78
WordDB: use an ordered map for storing words
...
This way we can use lower_bound to find the first prefix match
in logarithm time and we know all other prefix matches will
follow.
2014-01-19 19:43:19 +00:00
Maxime Coste
2ac545d306
RegionHighlighter: correct coordinates that are one past end of line
...
As region highlighters store per lines matches, end of line ones
are not valid buffer coordinates and must be corrected as begining
of next line.
2014-01-18 11:47:18 +00:00
Maxime Coste
5cffc48efc
Pass a HighlightFlags parameter to highlighters
...
When only highlighting for finding character position on screen
pass HighlightFlags::MoveOnly so that non moving highlighters do
not need to run.
2014-01-18 01:59:37 +00:00
Maxime Coste
e1eec8903a
only highlight actually displayed regions
2014-01-17 23:39:01 +00:00
Maxime Coste
79c6d609c9
FunctionGroup: fix incorrect parameter for operator()
2014-01-17 13:13:08 +00:00
Maxime Coste
997aadd33f
Word completion use a WordDB stored as a buffer value.
2014-01-16 22:07:42 +00:00
Maxime Coste
a6b386e9b8
RegionHighlighter: Find the lines to be reparsed using the changes
2014-01-15 20:28:58 +00:00
Maxime Coste
c2f18e6e78
Use inplace_merge for sorting matches in region highlighter
2014-01-14 19:42:57 +00:00
Maxime Coste
ab508ea3da
Much faster implementation of SelectionList::merge_overlapping
2014-01-13 22:23:40 +00:00
Maxime Coste
86eaa64982
Optimization and code cleanup in the region highlighter.
2014-01-13 21:40:02 +00:00
Maxime Coste
219f4c9c19
minor code cleanup
2014-01-12 21:25:21 +00:00
Maxime Coste
737837216b
minor code cleanup
2014-01-12 21:24:59 +00:00
Maxime Coste
3248829f5b
rename buffer_iterator.inl.hh as buffer.inl.hh and inline some more methods
2014-01-12 17:19:05 +00:00
Maxime Coste
faabd24e11
Region highlighters track line changes in the buffer
...
This way, region highlighters only need to regex-parse lines that
actually changed. matches on lines that just moved around but whose
content did not change can be updated simply by updating their line
coordinate.
2014-01-12 16:28:11 +00:00
Maxime Coste
4aed32d152
Store timestamp of last content modification in buffer lines
...
That means that lines that move around keep their timestamp.
2014-01-12 16:26:31 +00:00
Maxime Coste
ba5b21d43e
Clear buffer values explicitely in destructor
...
Buffer values could be registered as a listener, so we need to
get rid of them before asserting that all listeners have been
unregistered.
2014-01-11 19:05:09 +00:00
Maxime Coste
1d51e6922a
minor code cleanup
2014-01-10 13:36:40 +00:00
Maxime Coste
d466193ee7
Use a per line caching strategy for region highlighter
2014-01-09 22:52:39 +00:00
Maxime Coste
b247a05e43
Buffer: maintain a per line timestamp
2014-01-09 22:51:50 +00:00
Maxime Coste
d96b5aa04d
Move highlighter cache logic to BufferSideCache template
2014-01-09 22:51:23 +00:00
Maxime Coste
85cc740de0
Use Buffer values for storing highlighting caches
2014-01-09 21:57:37 +00:00
Maxime Coste
85387b3efe
Buffers can hold arbitrary values for for other systems
2014-01-09 21:01:29 +00:00
Maxime Coste
e6884f989c
Style changes, replace typedefs with usings
2014-01-09 19:59:26 +00:00
Maxime Coste
560b4ab0b5
Fix DynamicSelectionList selecting buffer end on Buffer::reload
2014-01-08 19:36:18 +00:00
Maxime Coste
c8119885fa
Use Win32 MessageBox for asserts on cygwin
2014-01-08 19:23:59 +00:00
Maxime Coste
518bc4e7f3
Use a single edition for -itersel
...
-itersel would not make sense with changing context buffer, so
it should be safe.
Fixes #14
2014-01-06 20:10:46 +00:00
Maxime Coste
9455303a1e
Do not allow changing buffer when the context is editing
2014-01-06 20:07:08 +00:00
Maxime Coste
aadbd390c7
Use wide character function for categorizing codepoints
...
Previously we used the is... rather than isw...
These functions were not supporting non ascii characters correctly
2014-01-05 15:14:58 +00:00
Maxime Coste
1e6fbf548b
Fix some tabs in the code
2014-01-05 14:30:26 +00:00
Maxime Coste
feaf197cae
Add support for the erase key in prompt and insert mode
...
Fixes #18
2014-01-04 18:18:59 +00:00
Maxime Coste
8168cba1a3
Fix small misbehaviour in split_selections
2014-01-04 14:23:08 +00:00
Maxime Coste
540d82c452
shell_completion use command completion after | and &&
...
Fixes #21
2014-01-03 22:29:11 +00:00
Maxime Coste
3017531699
shell_completion uses command completion after semicolons
2014-01-03 20:47:49 +00:00
Maxime Coste
6c4c32eb59
Rewrite join_select_spaces
...
Stop using regex for selecting spaces at the begining of the line
2014-01-03 20:41:47 +00:00
Maxime Coste
26e8c45282
CommandManager: support completion of chained commands
...
Command completion now work after a command separator (;)
fixes #19
2014-01-03 20:07:40 +00:00
Maxime Coste
ae5115c31f
Add support for absolute paths in find_file
...
fixes #11
2014-01-03 19:32:42 +00:00
Maxime Coste
3be77842db
fix select_to_eol behaviour when on empty line
...
fixes #3
2014-01-03 19:00:19 +00:00
Maxime Coste
e12bf4978c
Try prefix completion and then subsequence completion for option names
...
fixes #4
2014-01-03 19:00:05 +00:00
Maxime Coste
608098cdde
InputHandler: selection first item when entering menu mode
2014-01-02 19:19:41 +00:00
Maxime Coste
ad7145dda4
Minor code cleanup in normal.cc
2014-01-01 18:45:28 +00:00
Maxime Coste
bcb53d8417
Add q and Q alias for single quote and double quote text object
2014-01-01 13:59:25 +00:00
Maxime Coste
d9b7eaef2b
NCursesUI: no item is selected on menu_show
2013-12-30 22:41:08 +00:00
Maxime Coste
a34b943749
Support completing %opt{...} and %sh{...} in command manager
2013-12-30 14:22:18 +00:00
Maxime Coste
0b509735ca
Extract shell_complete lambda as a proper function
2013-12-30 14:20:05 +00:00
Maxime Coste
56c3d9d137
Few cleanups in the command line parsing code
2013-12-29 18:37:48 +00:00
Maxime Coste
257f589e22
Add D for erasing with concatenated yanking
2013-12-26 10:40:22 +00:00
Maxime Coste
983abefc30
Add alt-| for piping and appending rather than replacing
2013-12-24 16:48:52 +00:00
Maxime Coste
fd17ea00dd
CommandManager: use aliases for commands rather than duplicating data
...
Completion now only proposes full command names
2013-12-24 02:06:22 +00:00
Maxime Coste
22102951e2
make userconfig: install all kak scripts
2013-12-23 21:52:59 +00:00
Maxime Coste
fa72d27f9a
Make kak more installable
...
* Kak relies on the kakrc file to be in ../share/kak/kakrc relative
to kak binary rather than in the same directory
* Added an install target to the Makefile
2013-12-23 21:36:05 +00:00
Maxime Coste
bcba5287ad
Add complete_command for completing commands in PATH
...
use it for pipe completion
2013-12-23 20:43:55 +00:00
Maxime Coste
a0d4a44dd5
Fix prefix completion in prompt
2013-12-23 20:43:29 +00:00
Maxime Coste
c0973075fa
Get rid of Editor for good
...
ClientManager now stores only the free windows, clients take
ownership of its own.
2013-12-20 20:14:57 +00:00
Maxime Coste
cb324a4b88
highlighters: add some optimization flags to regexes
2013-12-17 20:03:54 +00:00
Maxime Coste
0e6bbbb8c4
remove useless code in Buffer constructor
2013-12-16 23:53:04 +00:00
Maxime Coste
d9c3de3fc0
small cleanup in context_wrap
2013-12-16 23:51:57 +00:00
Maxime Coste
d1ac813f61
Pass a Context rather than a Window to highlighters
2013-12-16 23:24:08 +00:00
Maxime Coste
ae75594d25
Window: refactor center_selection/display_selection_at
...
Take the line we are intersted in as a parameter rather than getting
the main selection last char line.
2013-12-16 19:08:19 +00:00
Maxime Coste
94c9e4e99b
Fix select_coord that could select invalid positions
2013-12-16 13:39:02 +00:00
Maxime Coste
6641583a68
cleanup editor.hh, remove editor.cc...
2013-12-15 22:10:19 +00:00
Maxime Coste
f83d5672f8
Fix replace_with_char behaviour, keep the same selections
2013-12-15 20:52:57 +00:00
Maxime Coste
ea95632709
Move Editor::selections_content to Context
2013-12-15 20:37:07 +00:00
Maxime Coste
ad0682ec75
remove unused Editor::check_invariant
2013-12-15 20:32:58 +00:00
Maxime Coste
8047cc97d3
Move Editor::{undo,redo} to free functions in normal.cc
2013-12-15 20:23:02 +00:00
Maxime Coste
cb9384f8a7
move InsertMode to normal.hh
2013-12-15 20:23:02 +00:00
Maxime Coste
7267b8281f
Move insert and erase to normal.cc, and move edition management to context
2013-12-15 20:23:02 +00:00
Maxime Coste
e369b60258
Remove insert_hide_sel option
2013-12-15 14:57:55 +00:00
Maxime Coste
eb81eef03e
Move SelectMode enum as an implementation detail in normal.cc
2013-12-15 14:38:04 +00:00
Maxime Coste
39b43f4c3c
Less uses of Editor, in favor of Context
2013-12-15 14:33:09 +00:00
Maxime Coste
935bc3cec9
Add Context::selections method, and use it in priority to the Editor's one
2013-12-15 14:25:23 +00:00
Maxime Coste
9b6639eb27
Remove Editor::move_selections
2013-12-15 14:14:52 +00:00
Maxime Coste
4e3d551426
split_lines sets the last selection as the main one
2013-12-14 19:25:56 +00:00
Maxime Coste
49ee2495a4
Remove Editor::rotate_selections
2013-12-14 18:41:55 +00:00
Maxime Coste
d0d9717fcf
Fix select_next_match
2013-12-14 18:40:29 +00:00
Maxime Coste
ce0e71aacb
Remove Editor::select methods, add a non-const selections getter
2013-12-14 18:38:14 +00:00
Maxime Coste
0c4d523b22
Move template selectors to the header
2013-12-14 14:49:10 +00:00
Maxime Coste
93b561983a
Rename MultiSelector to Selector
2013-12-14 14:38:17 +00:00
Maxime Coste
6afef079b6
Remove Editor::main_selection(|index), directly use the SelectionList method
2013-12-14 14:38:17 +00:00
Maxime Coste
eced7d4c24
SelectionList should never be empty
2013-12-14 14:38:17 +00:00
Maxime Coste
77590fe2e8
Move (keep|flip|remove|clear)_selections from editor method to free selectors
2013-12-14 14:38:17 +00:00
Maxime Coste
dad27fe1a0
Remove simple selectors, always go through a multi selector
2013-12-14 14:38:17 +00:00
Maxime Coste
f53ba0baed
MultiSelectors takes a reference to the current selection and mutate it
2013-12-14 14:38:17 +00:00
Maxime Coste
db048a0792
MultiSelectors now transforms the whole selection
2013-12-14 14:38:17 +00:00
Maxime Coste
894ee0297e
Move main selection index to SelectionList
2013-12-14 14:38:17 +00:00
Maxime Coste
dffd68a8ca
honor jumpclient for grep
2013-12-13 14:00:14 +00:00
Maxime Coste
6966bf3303
make.kak: errjump tries to recognize current make directory
2013-12-13 13:58:12 +00:00
Maxime Coste
9a2e72f23c
Fix cpp strings highlight
2013-12-13 13:55:08 +00:00
Maxime Coste
ed484dc333
Region highlighter takes regexes for region start/end
2013-12-12 22:49:41 +00:00
Maxime Coste
563f62b467
Fix Buffer::char_next when the line ends with an invalid utf8 sequence
2013-12-12 13:45:14 +00:00
Maxime Coste
bd80cf0404
Add DisplayAtom::check_invariant method
2013-12-12 13:45:08 +00:00
Maxime Coste
277b02eee6
Add experimental region_ref highlighter
...
highlights a region using another highlighter.
2013-12-11 23:19:24 +00:00
Maxime Coste
39512914ad
Add BufWritePre and BufWritePost hooks
2013-12-11 13:58:38 +00:00
Maxime Coste
1b1031627c
Add Buffer::run_hook_in_own_context helper method
2013-12-11 13:57:10 +00:00
Maxime Coste
91cc8dd8bf
Add cursor_char_column env variable
2013-12-11 13:46:33 +00:00
Maxime Coste
f0c336a283
ctags.kak: Show message with Information colalias in gentags
2013-12-07 13:57:24 +00:00
Maxime Coste
9ecfcfad43
use -try-client in kak files rather than ad-hoc shell logic
2013-12-07 13:56:56 +00:00
Maxime Coste
0b473ffe58
eval and exec can use a -try-client option
...
When -try-client <client_name> is used, the context used for the
command is either the given client's context if the client is found,
or the current one if not.
2013-12-07 13:44:23 +00:00
Maxime Coste
05d0397936
Add Client* ClientManager::get_client_ifp() that can return nullptr
2013-12-07 13:43:48 +00:00
Maxime Coste
3dde0b2260
fix strings in comment being highlighted as strings
2013-12-04 18:53:17 +00:00
Maxime Coste
35f12bc5a0
Use a cache for region highlighter
2013-12-04 18:52:16 +00:00
Maxime Coste
054ae08a9f
use region highlighter for cpp
2013-12-04 00:48:57 +00:00
Maxime Coste
8b2f340238
Add basic region highlighter
2013-12-04 00:48:46 +00:00
Maxime Coste
e348c35b25
Write errors while sourcing a file in the debug buffer
2013-12-04 00:27:19 +00:00
Maxime Coste
c9eb65b04c
Change rc files to use shared highlighters
2013-12-03 22:15:59 +00:00
Maxime Coste
45d5dbcc85
Add support for defining and referencing highlighters
...
* defhl <name> defines a shared highlighter
* addhl -def-group <name> adds highlighters to the defined highlighter
* addhl ref <name> add the defined highlighter to the window's ones
2013-12-03 22:07:23 +00:00
Maxime Coste
d5a5b1c329
fixup cpp.kak
2013-12-03 21:21:02 +00:00
Maxime Coste
a443ff7ea6
indent fixes
2013-12-03 19:49:09 +00:00
Maxime Coste
df57870470
rework cpp indenter, try to make them more readable
2013-12-03 19:49:09 +00:00
Maxime Coste
d880465f38
Do not pass a window to highlighters factories
2013-11-28 18:48:40 +00:00
Maxime Coste
a9d832965f
RegexColorizer maintains a per buffer cache
2013-11-28 18:48:39 +00:00
Maxime Coste
255a747fdd
Simplify FlagLines, do not try to update the option
2013-11-28 18:48:39 +00:00
Maxime Coste
2d55ff5feb
Window: forget timestamp when options changes
2013-11-28 18:48:38 +00:00
Maxime Coste
fcf3e9e138
Improve ctags support
...
* cleanup tag command
* add a tag-complete command
* add a gentags command for launching ctags in the background
2013-11-28 18:48:09 +00:00
Maxime Coste
50325e62b0
fix prompt completion handling misbehaving with history
2013-11-28 18:48:09 +00:00
Maxime Coste
b83414ddf7
add alt-& for align indent
2013-11-22 09:55:32 +00:00
Maxime Coste
90ea3023fe
reenable undo support on fifo buffers when the fifo closes
2013-11-20 22:18:40 +00:00
Maxime Coste
b90594353c
NCursesUI: info_show do not require previous call to info_hide
2013-11-19 19:51:39 +00:00
Maxime Coste
44b0957e10
NCursesUI: fix redraw when showing a new menu
2013-11-19 19:51:39 +00:00
Maxime Coste
9a6712e56b
rename idvaluemap to id_map, remove Id template param, use String
2013-11-18 22:24:31 +00:00
Maxime Coste
d27548dd15
Resurect idvaluemap, order of traversal matters
...
This reverts commit 2b9b161d42
.
2013-11-18 22:17:50 +00:00
Maxime Coste
f57f065d76
Fix prompt completion
2013-11-18 21:47:16 +00:00
Maxime Coste
56c0d2de95
Fix insert completion
2013-11-18 21:45:42 +00:00
Maxime Coste
69113f30d1
fix git blame support in git-tools.kak
2013-11-18 01:37:03 +00:00
Maxime Coste
7f4d906774
move is_horizontal_blank to unicode.hh
2013-11-17 23:06:40 +00:00
Maxime Coste
2b9b161d42
remove idvaluemap, use unordered_map in place
2013-11-17 23:06:40 +00:00
Maxime Coste
c764fa7e25
write assert failed info to debug buffer
2013-11-17 13:25:58 +00:00
Maxime Coste
cb7ef23c44
fix invalid value handling for yes no ask options
2013-11-16 00:26:56 +00:00
Maxime Coste
62137f364d
tweak initial debug infos
2013-11-15 23:47:44 +00:00
Maxime Coste
8c25d62056
extract InputHandler to input_handler.{cc,hh}
2013-11-14 21:12:59 +00:00
Maxime Coste
f8cadc0c57
move Client::m_name to context, no more need for DraftUI
2013-11-14 20:51:25 +00:00
Maxime Coste
ad275d1d1c
Extract InputHandler from Client
2013-11-14 18:09:15 +00:00
Maxime Coste
fe55d51e9f
Use Q for macro recording and q for replay, document macros in README
2013-11-14 13:59:32 +00:00
Maxime Coste
f287df2139
align always insert at selection begin
2013-11-14 13:44:55 +00:00
Maxime Coste
9a1d50d9a2
deindent now deindent non completely indented lines
...
If indent is 4 spaces, and a line has only 3 leading spaces, they
will get removed. a-< can be used to avoid this behaviour.
2013-11-14 13:44:54 +00:00
Maxime Coste
04ae48c346
indent cleanup, correct erroneous 3 spaces indent
2013-11-14 00:12:15 +00:00
Maxime Coste
9679b17b16
tweak style cpp.kak
2013-11-14 00:11:27 +00:00
Maxime Coste
323997041d
Do not use eval for grepcmd, as it will evaluate \ escapes as well
2013-11-14 00:07:14 +00:00
Maxime Coste
d2e360a1c8
move cpp indentation to helper hidden commands
2013-11-13 13:11:22 +00:00
Maxime Coste
b2cb5b421c
Centralize file mimetype detection in mime.kak
...
This way, 'file --mime-type $buffer' is called only once per file
rather than once per filetype detection hook.
2013-11-12 20:38:00 +00:00
Maxime Coste
db5050fab0
Add BufSetOption hook support
2013-11-12 20:36:42 +00:00
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
c4de866903
Fix select_to_previous_word when cursor is on last buffer char
2013-11-12 18:59:19 +00:00
Maxime Coste
67452c3441
Tweak prompt auto show completion
...
* Auto show completion even before the first key is pressed
* Auto show next completions when validating a single choice completion
2013-11-12 18:56:48 +00:00
Maxime Coste
6877ae151f
Do not require call to menu_hide before menu_show in ncurses ui
2013-11-12 18:52:30 +00:00
Maxime Coste
83a6375263
Fix StronglyTypedInteger::operator%=
2013-11-11 19:11:17 +00:00
Maxime Coste
6b77860fc0
Make Context a class, not a struct
2013-11-11 19:10:49 +00:00
Maxime Coste
bc1d1ba59f
Fix warnings
2013-11-10 22:51:52 +00:00
Maxime Coste
03a6561f50
use abreviated form for keys in client.cc
2013-11-10 22:48:56 +00:00
Maxime Coste
4b518ee6b9
Add support for function keys F1-F12
2013-11-09 11:12:55 +00:00
Maxime Coste
a7ed017ef3
cleanup Makefile
2013-11-09 11:12:25 +00:00
Maxime Coste
b4cc8edd35
Use eval ${kak_opt_(make|grep}cmd} in (make|grep).kak
...
Quotes in the variable are preserved that way.
2013-11-08 19:05:30 +00:00
Maxime Coste
414a1332eb
update cpp indentation hooks, indent after visibilty specifier
2013-11-08 19:04:28 +00:00
Maxime Coste
82b1619b05
cleanup cpp hooks
2013-11-07 21:58:19 +00:00
Maxime Coste
a11bccaa12
fix Buffer constructor exception safety
2013-11-07 21:43:18 +00:00
Maxime Coste
d4216efd75
clang.kak: wrap clang-autocomplete hook in a try %{}
2013-11-07 18:50:16 +00:00
Maxime Coste
bfbb44d994
Makefile: use boost_regex-mt on Cygwin
2013-11-07 18:49:12 +00:00
Maxime Coste
0b23a4f67b
cpp indent improvement
...
* auto inserts a ; after } if it closes a class or struct
* auto copy the // comment of the previous line
2013-11-07 18:45:08 +00:00
Maxime Coste
2eb1a323d9
fix kakrc string highlighting
2013-11-07 18:44:27 +00:00
Maxime Coste
79883f6a51
make align tab-aware
2013-11-06 19:13:06 +00:00
Maxime Coste
f2a902f682
Add modulo operators to StronglyTypedNumber
2013-11-06 19:10:35 +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
088f670fe9
update cpp indent hooks, add align to opening paren support
2013-11-04 22:23:55 +00:00
Maxime Coste
68a27af56e
Use InsertChar hook for char insertion, and InsertKey for key press
2013-11-04 22:02:44 +00:00
Maxime Coste
9521413b62
Tweak insert completion behaviour
2013-11-04 22:02:44 +00:00
Maxime Coste
dd6462ed57
regex option highlighter use runtime window rather than creation time one
2013-11-04 22:02: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
5e54705e26
simplify clang-enable-autocomplete, no need for shell
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
4c39743b69
cpp.kak: replace filters with hooks
2013-11-04 22:02:44 +00:00
Maxime Coste
3e12507636
Remove IncrementalInserter and move it's code to InputModes::Insert
2013-11-04 22:02:43 +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
70e94cb00a
Fix select_next_match that would select the end of the buffer in some circumstances
2013-11-04 21:59:28 +00:00
Maxime Coste
7b0eeb26b1
Run new clients in a new process session
...
When running a terminal emulator containing a kakoune client,
it used to still have the server tty as controlling termnal,
and so received SIGINT's from the user in it. Termnal emulators
then responded by exiting. This is no longer the case.
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
cc01aab8b8
add <a-gt> for indenting even empty lines
2013-10-30 08:45:47 +00:00
Maxime Coste
dc1fbcdaa2
minor style fix
2013-10-26 19:23:00 +01:00
Maxime Coste
90d499b94d
Add a WinClose hook
2013-10-26 18:51:25 +01:00
Maxime Coste
29ab42149c
Keep does nothing if an empty regex is entered (rather than crashing)
2013-10-26 18:46:21 +01:00
Maxime Coste
cf6c07d37d
Specify key modifiers using constexpr functions for brevity
2013-10-26 18:42:36 +01:00
Maxime Coste
0746e7309e
InputMode::Prompt: use an enum for mode rather than bool m_insert_reg
2013-10-26 14:06:27 +01:00
Maxime Coste
ebd768e03d
remove unneeded code in client
2013-10-26 11:49:16 +01: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
748cc79d0f
Add std::hash specialization for std::pair
2013-10-24 22:21:41 +01:00
Maxime Coste
baa9f28714
Add an autoreload YesNoAsk option, for configuring buffer reloading behaviour.
2013-10-21 18:58:11 +01:00
Maxime Coste
76deb60771
Add YesNoAsk type for options
2013-10-21 18:57:48 +01:00
Maxime Coste
60dbec4949
Add Buffer::reload for reloading buffers without loosing options and hooks
2013-10-21 18:57:19 +01:00
Maxime Coste
9e9b503f5d
Code style cleanups in ncurses.{cc,hh}
2013-10-17 18:48:12 +01:00
Maxime Coste
44281c8fed
More robust Buffer filesystem timestamp handling
2013-10-17 18:47:09 +01:00
Maxime Coste
c3bafea2cd
Improve NCurses UI menu scroll bar, use a variable height
2013-10-17 00:32:13 +01:00
Maxime Coste
03c74b7a88
Detect file external modification and ask the user whether to reload or not
...
* Buffer now store a m_fs_timestamp field.
* Client in Normal mode checks current buffer file every 500 ms, or
each time it goes back to Normal mode.
2013-10-15 18:51:31 +01:00
Maxime Coste
fe0a4f0d11
Reset normal mode when changing the current editor
2013-10-15 18:50:43 +01:00
Maxime Coste
608196f526
Fix indent code, support indentwidth=0 for using tabs
2013-10-14 13:47:43 +01:00
Maxime Coste
bc3cfb9016
Fix ctags.kak function info support
2013-10-11 18:45:23 +01:00
Maxime Coste
17951bf077
Fix Editor::remove_selection when the main selection is the first one and is the removed one
2013-10-11 18:44:43 +01:00
Maxime Coste
ee0e6dcef9
Display session name in the status line
2013-10-11 18:43:39 +01:00
Maxime Coste
d1159be19c
Use { and } for extending selection to object start/end
2013-10-11 09:58:35 +01:00
Maxime Coste
632e7e217e
Save last pipe command to the '|' register, and use it for empty cmd
2013-10-11 00:31:03 +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
93f6a2ee43
Display target register name in status line when recording a macro
2013-10-11 00:17:22 +01:00
Maxime Coste
59ae6411f5
Only allow recording macro to register a-z
2013-10-11 00:17:21 +01:00
Maxime Coste
c478a97a2f
Let InputModes describe themselves for status line display
2013-10-11 00:17:21 +01:00
Maxime Coste
74fe8b5e8d
Remove Context::numeric_param, pass it directly to normal mode functions
2013-10-10 21:22:20 +01:00
Maxime Coste
00c8d1a4fa
Fix tabs that appeared in the codebase
2013-10-08 19:28:57 +01:00
Maxime Coste
ab925686ab
Improve object selection support
...
* A count is supported for nestable objects so that we
can specify the surrounding level.
* more symetric behavior for select to end/ to begin
2013-10-08 19:28:18 +01:00
Maxime Coste
fccb954611
Use WordType enum instead of a bool punctuation_is_word for word selector
2013-10-07 18:44:22 +01:00
Maxime Coste
6e5ff644f2
add <a-R> for rotating selections content
2013-10-02 19:10:43 +01:00
Maxime Coste
6331fb5a61
Add <c-s> for saving current selection in the jump list
2013-10-02 18:49:06 +01:00
Maxime Coste
307fc228d2
Add <c-u> in insert mode for forcing commiting the current undo group
2013-10-02 18:45:39 +01:00
Maxime Coste
bc051c53af
Cleanup dynamic registers init, and add # register for selection count
2013-10-01 19:52:19 +02:00
Maxime Coste
fb80ef092e
clean up env var registration
2013-10-01 19:47:37 +02:00
Maxime Coste
c312b06e39
Do not push jump on search next
2013-09-27 19:26:52 +01:00
Maxime Coste
560e3397e8
minor cleanup
2013-09-27 19:24:18 +01:00
Maxime Coste
61cc53b325
Support highlighters that add new lines in scroll_to_keep_cursor_visible
2013-09-27 19:16:49 +01:00
Maxime Coste
3021c7f60a
Remove $kak_socket replaced with $kak_session
...
use /tmp/kak-$kak_session to get the socket path
2013-09-25 19:04:52 +01:00
Maxime Coste
b080f456a7
Do not take directories into account when completing buffer name
...
(except if a / is found in the completion prefix)
2013-09-25 18:59:03 +01:00
Maxime Coste
60f4e1104f
complete_filename fallback on subsequence completion if prefix does not work
2013-09-24 10:16:47 +02:00
Maxime Coste
9018bc47df
use subsequence instead of regex matching for buffer completion
2013-09-24 10:13:39 +02:00
Maxime Coste
bab10f5b93
add subsequence_match(str, subseq) utility function
2013-09-23 21:17:16 +02:00
Maxime Coste
5ae43acf94
Add prefix_match function and use it instead of adhoc code
2013-09-23 21:16:25 +02:00
Maxime Coste
5a02d38081
small optimization in event manager
2013-09-23 20:32:45 +02:00
Maxime Coste
124be2ac2e
extract client main to a run_client function
2013-09-23 20:28:15 +02:00
Maxime Coste
ce4ed44496
Add missing newlines to printed messages
2013-09-21 17:10:37 +02:00
Maxime Coste
b1d62a307d
Add a -d command line option for running Kakoune as a headless server
2013-09-19 20:09:53 +01:00
Maxime Coste
415be1d2c7
Add a -s command line option for specifying session name
2013-09-19 19:54:14 +01:00
Maxime Coste
0b63074f90
extract main kakoune code to a kakoune function
2013-09-19 19:53:04 +01:00
Maxime Coste
03588f1b78
Support multiple selections per ligne when aligning
2013-09-18 18:54:04 +01:00
Maxime Coste
e70d75d6a6
Only redraw clients after handling all available events
2013-09-17 18:51:14 +01:00
Maxime Coste
7fef7ec063
Add a InputMode::on_replaced virtual method.
...
Destructors are not a good place to run mode exit hooks, as they
wont be called until the next mode trash clearing, so we now call
this virtual method on the previous mode just before it gets replaced.
2013-09-16 19:38:28 +01:00
Maxime Coste
168b4b775b
Do not clear Client::m_mode_trash in handle_key, but in handle_available_input
...
handle_key can be called from exec_keys while running a hook, and a previous
key in exec_keys could have changed the mode. This would make the mode that
runned the hook deleted when the controls returns to it.
handle_available_input should always be called at top level, so can safely
clear the mode trash.
2013-09-16 19:25:18 +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
49903523a7
Resurect Client::handle_available_input()
2013-09-16 18:48:41 +01:00
Maxime Coste
27a1e70b01
Rework client name change
2013-09-13 00:01:47 +02:00
Maxime Coste
000af8e206
Fix clang.kak, now that eval -draft does not use the client user interface
2013-09-12 23:52:43 +02:00
Maxime Coste
fd021de7d7
use directly context.client() for getting the kak_client env var value
2013-09-12 23:49:08 +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
96fc340a5c
add alt-& which aligns inserting spaces before selection start
2013-09-02 13:30:46 +01:00
Maxime Coste
70cd671ef6
support absolute filenames in insert mode filename completion
2013-08-29 13:50:55 +01:00
Maxime Coste
2125d95076
Use the Information color alias for auto info boxes
2013-08-29 13:50:24 +01:00
Maxime Coste
1d790541f5
handle client disconnection without crashing
2013-08-28 19:20:12 +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
3150fe97cf
selections env var is : separated, and : in selections are escaped
2013-08-28 18:52:29 +01:00
Maxime Coste
535a454349
Line completion: sort and uniquify lines
2013-08-06 11:35:38 +02:00
Maxime Coste
9148b1ae92
Add line completion
2013-08-05 10:23:13 +02:00
Maxime Coste
c05f9f31dd
add support for explicit insert mode completion using C-x prefix
2013-08-04 19:34:08 +02:00
Maxime Coste
0f4cecfa3e
BufferCompleter refactoring, add support for explicit filename completion with c-f
2013-08-04 18:59:31 +02:00
Maxime Coste
3fe0b8e719
Move insert mode completion functions into BufferCompleter
2013-08-04 17:42:09 +02:00
Maxime Coste
6b66a3dfe5
Add support for filename insert mode completion
2013-08-02 17:58:37 +01:00
Maxime Coste
af17010524
contains: do not check if container is empty
2013-08-01 18:35:13 +01:00
Maxime Coste
a2577b4180
buffer: move Buffer::Flags operator as friends defined inside Buffer
2013-08-01 00:28:01 +02:00
Maxime Coste
c6f08f6c34
fix c++11 union use in remote.cc
2013-07-31 00:32:51 +02:00
Maxime Coste
3c8df764be
fix insert mode erase utf-8 handling, add unit test
2013-07-30 19:18:01 +01:00
Maxime Coste
c84b861d2f
remove useless SelectionList copy in keep
2013-07-29 13:51:07 +01:00
Maxime Coste
4f452474c8
non-regex based implementation of split_lines
2013-07-29 13:50:31 +01:00
Maxime Coste
af8e8d27d4
Minor code cleanups
2013-07-28 16:40:02 +02:00
Maxime Coste
5dfd4a9869
more auto info for normal commands waiting for a key press
2013-07-27 15:58:06 +02:00
Maxime Coste
0267540985
Do not select the first line indent in inner indent select
2013-07-27 15:37:28 +02:00
Maxime Coste
740a6562d9
enable autoinfo by default
2013-07-26 18:52:25 +01:00
Maxime Coste
c3359f7edc
fix some auto info boxes text
2013-07-26 18:52:05 +01:00
Maxime Coste
8281d8c626
git-tools: use : as list separator, escape it correctly
2013-07-26 02:01:01 +02:00
Maxime Coste
233cb530fc
read<T>(int socket): type aliasing compliance
2013-07-26 01:50:36 +02:00
Maxime Coste
a4138201b0
Key: always pass by value
2013-07-26 01:50:36 +02:00
Maxime Coste
eedd37c09a
memoryview: always pass by value
2013-07-26 01:50:36 +02:00
Maxime Coste
3862b5cbb8
LineAndColumns: always pass by value
2013-07-26 01:50:09 +02:00
Maxime Coste
5d681f9efe
StronglyTypedNumber: take parameters by value
2013-07-26 01:49:57 +02:00
Maxime Coste
d5453152b3
Color,ColorPair: always pass by copy
2013-07-26 00:54:58 +02:00
Maxime Coste
8f73d3c173
fix last eol matching in regex highlighters
2013-07-25 00:18:50 +02:00
Maxime Coste
3da97c4269
decl command support bool type options
2013-07-24 22:56:21 +02:00
Maxime Coste
38c7197770
go back to : as set/list separator in options
2013-07-24 22:41:41 +02:00
Maxime Coste
d29fb6f2c4
list,set and tuple options support escaping the separator
2013-07-24 22:41:13 +02:00
Maxime Coste
b5db256384
string escaping support functions
...
the split function now takes an additional escape parameter and
does not split on separators that have the escaper before it.
An utility escape function that adds escape before separators
is also added.
2013-07-24 22:37:17 +02:00
Maxime Coste
d6425f1d50
merge AtomContent into DisplayAtom
2013-07-24 13:55:57 +01:00
Maxime Coste
f6308409a1
pipe: auto insert and end of line if needed
2013-07-24 13:38:26 +01:00
Maxime Coste
62fdacb757
Add scroll left/right support
2013-07-24 01:38:30 +02:00
Maxime Coste
8633a37dad
Try to keep the selection start visible if possible
2013-07-24 01:34:00 +02:00
Maxime Coste
c7e52a650d
DisplayLine no longer map to a single buffer line, but to a buffer range
2013-07-24 01:33:12 +02:00
Maxime Coste
486ebed098
try to preserve display column rather than buffer column when moving line
2013-07-23 20:46:15 +02:00
Maxime Coste
5a6922a045
expand_unprintable: use iscntrl rather than isprint which does not work as expected
2013-07-23 20:42:35 +02:00
Maxime Coste
c58bab0f66
Add indent object type (bound to i)
2013-07-23 19:12:53 +01:00
Maxime Coste
8ab7496058
use C isalnum instead of C++ std::isalnum
2013-07-15 13:49:50 +01:00
Maxime Coste
ee2d18df04
fix selection to search pattern word begin detection
2013-07-15 13:49:04 +01:00
Maxime Coste
90b92aed3c
add support for tolower (), toupper (~), and swap case become alt-
2013-07-12 13:55:48 +01:00
Maxime Coste
81b5c477f6
Compile with gnu++11 so that cygwin is happy, and remove unneeded -lmenu
2013-07-12 13:17:12 +01:00
Maxime Coste
fcb3594e4a
NCursesUI::draw_menu: be tolerant when the menu_win was not created
2013-07-12 13:15:56 +01:00
Maxime Coste
1388c0d540
Editor: clamp coordinates in select(BufferCoord)
2013-07-12 13:15:31 +01:00
Maxime Coste
0ba1ab04f0
cpp.kak: wrap trailing whitespace cleanup hook in a try catch
2013-07-12 13:13:54 +01:00
Maxime Coste
37807ba19b
Add support for arrow keys in normal mode
...
use a Direction enum instead of a bool forward parameter
2013-07-02 19:48:05 +01:00
Maxime Coste
6484fead0c
replace with char only replaces when entered character is printable
2013-07-02 19:48:04 +01:00
Maxime Coste
c1b2f7ef6a
use C locale function instead of C++ ones
2013-07-02 19:48:04 +01:00
Maxime Coste
2dcdc0cf4b
more horizontal scrolling fixes
2013-06-29 16:50:51 +02:00
Maxime Coste
e510bf8b96
Fix horizontal scrolling support with replaced buffer ranges
...
tab character were not properly handled when scrolling horizontally
2013-06-28 00:03:11 +02:00
Maxime Coste
5b4ef23b9d
more tolerant Buffer::string
2013-06-27 23:49:34 +02:00
Maxime Coste
b1f31d2e12
change string parsing behaviour in command manager
...
* single and doubly quoted strings correctly remove the \ when their
delimiter is quoted ('\'' is interpreted as ', not \')
* %{} strings do not support quoting when using matching pairs, so
%{\} is interpreted as \, however when using same ending character
as delimiter quoting still works: %~\~~ is interpreted as ~.
2013-06-27 19:07:26 +01:00
Maxime Coste
56bb0f9f2c
clang.kak: use socat in unidirectional mode
2013-06-21 18:51:18 +01:00
Maxime Coste
60dfeb2821
fix highlighting bug with inserting at eol on lines with tabs
2013-06-21 18:50:45 +01:00
Maxime Coste
c6bf0b4cc3
add missing errno include to file.cc
2013-06-19 19:29:05 +01:00
Maxime Coste
a3e032abd6
enable /proc/ method for runtime_directory with cygwin
2013-06-19 19:29:05 +01:00
Maxime Coste
6d125e6c36
do not use std::{to_string,stoi} as they cause problems with cygwin
2013-06-19 19:29:05 +01:00
Maxime Coste
a642026e7c
more portable use of ncurses
2013-06-19 19:29:04 +01:00
Maxime Coste
3e9439ac9f
restore compilation with gcc 4.7
2013-06-18 21:44:00 +02:00
Maxime Coste
ea9414fa21
Fix input completion on multiple selection
2013-06-12 00:43:11 +02:00
Maxime Coste
bd8daac3a1
Fix UndoGroupOptimizer
2013-06-12 00:14:05 +02:00
Maxime Coste
7306f6b33b
Buffer: always use {line_count(), 0} as end in Modifications
2013-06-06 20:02:20 +02:00
Maxime Coste
59b996be75
add an UndoGroupOptimizer test
2013-06-06 19:54:13 +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
cf454ef904
UndoGroupOptimizer: fix count_byte_to
2013-06-06 19:44:08 +02:00
Maxime Coste
357799c966
replace remaining plain assert with kak_assert
2013-06-06 19:44:08 +02:00
Maxime Coste
3d8eecbbb6
minor cleanups Editor
2013-06-06 19:44:08 +02:00
Maxime Coste
bd504058d9
remove unused Buffer::char_at
2013-06-06 19:44:07 +02:00
Maxime Coste
12d3b64a1b
avoid_eol: use direct line access
2013-06-06 19:44:07 +02:00
Maxime Coste
58ff97d51d
use_selection_as_search_pattern: use iterators instead of coords
2013-06-06 19:44:07 +02:00
Maxime Coste
43ff1909fb
add utf8::make_iterator helper function
2013-06-06 19:44:07 +02:00
Maxime Coste
245e68e26e
utf8_iterators: rename underlying_iterator to base
2013-06-06 19:44:07 +02:00
Maxime Coste
70bf71e51f
remove Buffer:char_{distance,advance} use line access instead
2013-06-06 19:44:07 +02:00
Maxime Coste
580749a91d
Buffer: remove line_length and replace line_content with operator[]
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
777158e86d
remove BufferIterator::is_valid()
2013-06-04 18:56:28 +02:00
Maxime Coste
a23aa10797
remove BufferIterator::buffer()
2013-06-04 18:55:06 +02:00
Maxime Coste
9fb4d42408
remove BufferIterator::is_{begin,end}
2013-06-04 18:53:56 +02:00
Maxime Coste
51acd456cc
remove BufferIterator::{line,column}()
2013-06-04 18:53:28 +02:00
Maxime Coste
ee22596d61
tweak Buffer::{,char_}prev
2013-06-04 18:53:28 +02:00
Maxime Coste
cf1f26ac91
fix Editor::move_selections(LineCount...) on buffer bounds
2013-06-04 18:53:13 +02:00
Maxime Coste
cc70e3ed70
selectors.cc: avoid dereferencing buffer end
2013-06-04 14:21:07 +02:00
Maxime Coste
5c2e3b25fa
Window: use AtomContent::length in scroll_to_keep_cursor_visible_ifn
2013-06-04 14:21:07 +02:00
Maxime Coste
76f55f5256
remove useless iterator_at calls
2013-06-04 14:21:07 +02:00
Maxime Coste
c4f9253634
Remove Buffer::iterator_at_line_{begin,end}, use iterator_at(line{,+1})
2013-06-04 14:21:07 +02:00
Maxime Coste
503f0cce25
IncrementalInserter: use coords instead of iterators
2013-06-04 14:21:07 +02:00
Maxime Coste
fb41e1fdf9
tweak Buffer::do_insert
2013-06-04 14:21:07 +02:00
Maxime Coste
4ef1bfa4db
Use coord instead of iterators for selections
2013-06-04 14:21:07 +02:00
Maxime Coste
02b33c7d8f
Buffer: add methods for char access instead of byte access
2013-06-03 18:56:48 +02:00
Maxime Coste
b198f6a5fb
Fix select_whole_paragraph so that buffer end is not selected
2013-06-03 14:27:51 +02:00
Maxime Coste
24ffd6abae
DynamicSelectionList check that buffer end is not selected
2013-06-03 14:26:05 +02:00
Maxime Coste
b51799a2b2
Explicitly pass buffer to selectors
2013-06-01 14:22:57 +02:00
Maxime Coste
3453ebbd52
BufferChangeListener: pass buffer to on_{inser,erase}
2013-06-01 00:48:46 +02:00
Maxime Coste
8ddeb141c8
Fix insert completion at beginning of buffer
2013-05-30 18:52:03 +02:00
Maxime Coste
2d96f853f8
Add utf8::codepoint_size function
2013-05-30 18:49:50 +02:00
Maxime Coste
28e127a48a
remove avoid_eol parameter from Buffer::{iterator_at,clamp}
2013-05-30 14:23:25 +02:00
Maxime Coste
07c8379313
BufferIterator are Random Access iterators
2013-05-30 14:05:05 +02:00
Maxime Coste
d2df6a9f15
remove BufferIterator::clamp
2013-05-30 14:00:41 +02:00
Maxime Coste
5e64f6d1ec
remove Selection::buffer
2013-05-30 13:59:38 +02:00
Maxime Coste
5b0087b545
InputHandler: pass buffer and BufferCoord to completers
2013-05-30 13:59:38 +02:00
Maxime Coste
ae947b456d
remove BufferIterator::offset
2013-05-30 13:59:38 +02:00
Maxime Coste
dbb1c57ec9
minor code cleanups in filters.cc
2013-05-30 13:59:38 +02:00
Maxime Coste
557acc5068
reorganize check_invariant in SelectionList
2013-05-30 13:59:38 +02:00
Maxime Coste
7f8d5c1fd0
Remove Range::content
2013-05-30 13:59:38 +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
a07fde181a
Add Buffer::{next,prev,at}(BufferCoord) methods and use them in iterators
2013-05-30 13:59:38 +02:00
Maxime Coste
9a80a58ff4
buffer end should not be in a selection
2013-05-30 13:59:38 +02:00
Maxime Coste
462da52218
InputHandler: less iterators, more coords
2013-05-30 13:59:38 +02:00
Maxime Coste
52b77c1915
window, editor: take coords rather than iterators parameters
2013-05-30 13:59:38 +02:00
Maxime Coste
4f1ba860f8
minor tweak buffer iterator
2013-05-30 13:59:38 +02:00
Maxime Coste
7f17644a6b
Buffer insert and erase takes coord rather than iterators
2013-05-30 13:59:38 +02:00
Maxime Coste
2902cc3275
BufferIterator convert implicitly to const BufferCoord&
2013-05-30 13:59:38 +02:00
Maxime Coste
d5b190369a
DisplayBuffer: use coords rather than iterators
2013-05-30 13:59:38 +02:00
Maxime Coste
97df6f2222
AtomContent uses coord rather than iterators
2013-05-29 18:58:20 +02:00
Maxime Coste
81ce4e4720
pass window param to highlighters
2013-05-29 18:58:20 +02:00
Maxime Coste
6c290eff9a
Buffer::do_{erase,insert} takes coord parameters rather than iterators
...
BufferChangeListeners do as well use coord rather than iterators
2013-05-29 18:58:20 +02:00
Maxime Coste
f23f48172f
Buffer: add some method to work directly with coord instead of iterators
2013-05-29 18:58:20 +02:00
Maxime Coste
6cb8d69d29
Context: return DynamicSelectionLists in jump_{forward,backward}
2013-05-29 18:56:14 +02:00
Maxime Coste
9630990b74
Remove Selection::avoid_eol, move as static func in editor.cc
...
Conflicts:
src/editor.cc
2013-05-29 18:53:57 +02:00
Maxime Coste
9991292bd3
tweak number line highlighter style
2013-05-24 18:39:28 +02:00
Maxime Coste
ad178e383b
insert mode completion for all selection that matches the main one prefix
2013-05-21 19:21:55 +02:00
Maxime Coste
eab1213555
throw an error when gf does not find any file to open
2013-05-21 14:01:04 +02:00
Maxime Coste
258637222f
Word completion can optionally look for candidates in all buffers
...
completers option accept word=buffer or word=all values
2013-05-20 14:10:53 +02:00
Maxime Coste
f3ad51444d
move line_with_cursor as LineEditor::build_display_line
2013-05-17 14:29:15 +02:00
Maxime Coste
48f98eae97
Allow macros to call other macros, only recursive macro calls are forbidden
2013-05-17 14:22:48 +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
37a2363301
cpp.kak: fix alt now that alt_dirs is a proper list
2013-05-17 14:08:02 +02:00
Maxime Coste
585c8ba3cf
Show an info box with available option when waiting for a key
...
Controled with the autoinfo option (disabled by default)
2013-05-16 22:33:48 +02:00
Maxime Coste
c91cea9dc3
fix ncurses info box placement
2013-05-16 22:33:28 +02:00
Maxime Coste
23f43376df
fix NCurses info box, avoid trailing space on each lines
2013-05-16 21:46:15 +02:00
Maxime Coste
b2dffbabb6
more robust NCursesUI::menu_show
2013-05-16 21:44:58 +02:00
Maxime Coste
310e0f5bd3
cpp.kak: fix alt_dirs option default value
2013-05-16 19:23:54 +02:00
Maxime Coste
400e46719d
Add scrolloff option support
2013-05-16 19:22:44 +02:00
Maxime Coste
389438164d
add '&' for aligning selections
2013-05-15 18:47:50 +02:00
Maxime Coste
64b20729a5
Full object selection support for paragraphs and sentences
2013-05-15 14:24:09 +02:00
Maxime Coste
ef7d90cbfa
colalias can reference another alias
2013-05-15 14:01:23 +02:00
Maxime Coste
1fb971e389
Editor::select(Selection, SelectMode::Extend) now only keeps the extended main selection
2013-05-14 13:58:41 +02:00
Maxime Coste
9cbf790d13
tweak Range::merge_with behaviour
2013-05-14 13:58:35 +02:00
Maxime Coste
2b12b72d6e
fix overlaps(Range, Range)
2013-05-14 13:58:19 +02:00
Maxime Coste
42be2b23ca
fix regex prompt whith empty regex
2013-05-13 18:43:38 +02:00
Maxime Coste
26f0fd4cc6
Use more std::* for string handling
2013-05-13 18:43:38 +02:00
Maxime Coste
56ab33c9d6
support specifying colors with RGB components
2013-05-13 14:25:05 +02:00
Maxime Coste
3a49e05832
Option can be declared with a checker function.
...
The checker function may throw if to be set option value is invalid.
Implemented with the completers option.
2013-05-06 13:52:41 +02:00
Maxime Coste
c1615b5c15
add unordered_set option support, use it for completers
2013-05-06 13:52:20 +02:00
Maxime Coste
2342e7686f
add specialized contains function for unordered_set
2013-05-06 13:51:23 +02:00
Maxime Coste
42d7fcacd8
add a completers option for specifying which completer to use for BufferCompleter
2013-05-03 18:44:27 +02:00
Maxime Coste
39f9ca33c8
BufferCompleter: avoid modifying the buffer when not needed
2013-05-03 18:44:27 +02:00
Maxime Coste
33740d06ee
Editor: tweak behaviour on undo/redo when selecting modified ranges
2013-05-03 18:44:26 +02:00
Maxime Coste
564cfb084e
Editor: undo and redo select all ranges modified instead of the last one
2013-05-03 18:44:26 +02:00
Maxime Coste
4c4b6a404d
add SelectionList::check_invariant
2013-05-03 18:44:26 +02:00
Maxime Coste
9b3e0c8055
Move selection update code to SelectionList
2013-05-02 19:04:59 +02:00
Maxime Coste
4ab5c7a203
DisplayBuffer: optimize Text and ReplacedBufferRange as well
2013-05-02 18:57:15 +02:00
Maxime Coste
d238707e6d
Fix UndoGroupOptimizer
2013-04-30 19:01:20 +02:00
Maxime Coste
b69c9ea753
add paragraph (p) object
2013-04-30 14:29:18 +02:00
Maxime Coste
4bb3863f95
add sentence (s) object
2013-04-30 14:21:48 +02:00
Maxime Coste
bef48b7df0
Fix UndoGroupOptimizer
2013-04-29 14:25:38 +02:00
Maxime Coste
11bc24f992
FlagLines: use a shared updaters for options
...
previously, having two windows showing the same buffer with
the same line flags would have updated the options twice, resulting
in wrong lines in option. Now line flags options are updated only
once by a shared object along all FlagLines highlighter using the
same option.
2013-04-29 14:20:42 +02:00
Maxime Coste
ba562367f0
catch errors when opening files given on command line
2013-04-29 13:50:13 +02:00
Maxime Coste
4a0aa96160
fix bug in compact_path
2013-04-29 13:49:47 +02:00
Maxime Coste
d49f35817e
fix handling of ~ in filenames so that :edit ~ does not open a file named '~'
2013-04-26 20:18:16 +02:00
Maxime Coste
70d65dac79
git-tools.kak: support add and diff command
2013-04-26 18:48:31 +02:00
Maxime Coste
8bfe2d62e5
echo: rename -col option to -color
2013-04-26 18:48:31 +02:00
Maxime Coste
7ce3212fb2
When committing an undo group, run an optimization pass on it
...
With incremntal insertion, undo groups tends to be a lot of single
character insertion/deletions at the same point, but the end
result is most of the time a single string insertion. Buffer
now tries to optimize the undo group.
2013-04-26 18:48:31 +02:00
Maxime Coste
b16c967f9c
Buffer::Modification::Position is a BufferCoord instead of a BufferIterator
2013-04-26 18:46:42 +02:00
Maxime Coste
f8c3b6c9ef
Buffer: rename character_count method to byte_count
2013-04-24 13:56:36 +02:00
Maxime Coste
7c4e79ef98
BufferCompleter: change behaviour to handle non prefix completions
...
Try to have a nice behaviour when the completions do not share
a prefix with the [completion begin, cursor pos] string.
For example an address book completion may provide candidates
for frrrwww that are 'Maxime Coste <frrrwww@gmail.com>', not
having frrrwww as a prefix.
2013-04-23 19:08:50 +02:00
Maxime Coste
ef07b98215
utils: add is_in_range function
2013-04-23 19:08:44 +02:00
Maxime Coste
6913510e67
use alt-J for joining and selecting the spaces replacing line breaks
2013-04-23 18:54:31 +02:00
Maxime Coste
72ef210e1b
Buffer: add is_valid(BufferCoord) method
2013-04-23 18:46:18 +02:00
Maxime Coste
dd3a7f739d
FlagLines: do not create a new local option in window if the option comes from the buffer
2013-04-23 14:03:54 +02:00
Maxime Coste
c844f6f5cf
git-tools.kak: use a single git command with subcommands
2013-04-23 14:03:23 +02:00
Maxime Coste
6df60f5d2f
use a DynamicSelectionList when searching as the buffer may be modified during the prompt
2013-04-22 18:49:52 +02:00
Maxime Coste
86f6282cbe
selecting a surrounding object goes up one level if what we find is already selected
2013-04-22 14:18:49 +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
362e346728
rename go function to goto_commands
2013-04-19 13:49:47 +02:00
Maxime Coste
38bd8c243f
add KakBegin and KakEnd hooks
2013-04-19 13:45:44 +02:00
Maxime Coste
ca69981cc6
Ncurses: display status line in terminal title as well
2013-04-18 20:22:19 +02:00
Maxime Coste
7af98eae43
add man.kak which provides a man command for displaying man pages in kakoune
2013-04-18 19:07:31 +02:00
Maxime Coste
5b61672948
add window_{width,height} env var
2013-04-18 14:28:53 +02:00
Maxime Coste
9a361e2657
Tweak status line
2013-04-18 14:28:35 +02:00
Maxime Coste
f4e7da8826
change swapped_case implementation
2013-04-17 19:31:31 +02:00
Maxime Coste
b229584e95
ShellManager: env_var_regex is an implementation detail
2013-04-17 19:26:44 +02:00
Maxime Coste
0a8f51bddd
ctags.kak: fix zc changed to vc
2013-04-17 19:15:34 +02:00
Maxime Coste
8d83a5ff9e
toolsclient option support is back, add docsclient for git-diff
2013-04-17 19:15:15 +02:00
Maxime Coste
021756dfd4
redeclaring an option with the same type is not an error
2013-04-17 19:10:51 +02:00
Maxime Coste
21f487417b
context_wrap options are allowed only at start
2013-04-17 19:10:06 +02:00
Maxime Coste
d3961768ec
add alt-X for trimming non full lines
2013-04-16 14:30:11 +02:00
Maxime Coste
979cfc1ff2
normal.cc: remove useless do_ prefix on function names
2013-04-16 14:08:15 +02:00
Maxime Coste
5b50b32e68
move view commands to v prefix instead of z
2013-04-16 13:54:04 +02:00
Maxime Coste
485a50bb4b
handle client_removed exception out of ClientManager as well
2013-04-15 18:55:41 +02:00
Maxime Coste
da4be95c90
Handle SIGHUP gracefully
2013-04-15 18:50:45 +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
385241d2c0
remove String::replace, use boost::regex_replace directly
2013-04-12 19:16:55 +02:00
Maxime Coste
b6d21514e4
BufOpen hook is only called for file buffers
2013-04-12 19:11:28 +02:00
Maxime Coste
5653af15ed
move normal mode implementation to normal.{cc,hh}
2013-04-12 14:28:13 +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
46deca4f3f
Add zj and zk command for scrolling the window
2013-04-12 01:31:21 +02:00
Maxime Coste
e4d87ee1f1
hide ncurses.h include in ncurses.cc
2013-04-12 01:28:22 +02:00
Maxime Coste
e68f3cfe35
git-tools.kak: initial git-show command
2013-04-11 23:09:42 +02:00
Maxime Coste
1b5760f1a1
delete buffer if needed when creating a scratch buffer
2013-04-11 23:09:17 +02:00
Maxime Coste
dcc054a785
git-tools: fix git-diff-show
2013-04-11 22:41:43 +02:00
Maxime Coste
3f5dc9e1cb
ctags.kak: <a-c> is now zc
2013-04-11 21:17:17 +02:00
Maxime Coste
99bb24dd09
add z prefixed 'window commands'
...
* zz or zc for centering selection on window (replaces alt-c)
* zt and zb for placing the main selection on top/bottom
2013-04-11 21:01:27 +02:00
Maxime Coste
fb87c7ac9f
add Window::display_selection_at(LineCount)
2013-04-11 21:01:00 +02:00
Maxime Coste
301921cd45
remove hooks when needed in rc files
2013-04-11 14:30:02 +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
172f46f679
idvaluemap: add a remove_all method
2013-04-11 14:27:32 +02:00
Maxime Coste
4cf7c4175a
HookManager: write to debug when a hook fails
2013-04-11 13:58:09 +02:00
Maxime Coste
35d0d5b2ea
exceptions: use const char* what() instead of String description()
2013-04-11 13:57:35 +02:00
Maxime Coste
c699172110
highlight strings after macros
2013-04-11 13:47:15 +02:00
Maxime Coste
8b829d1cdf
display character column instead of byte column in status line
2013-04-11 13:45:28 +02:00
Maxime Coste
1398641d22
Add gt, gb and gc to goto the first/last/middle displayed line
2013-04-10 19:02:28 +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
441f9a69ef
InputHandler: auto leave insert mode when editor changed
2013-04-10 14:30:32 +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
270e950cf1
sort includes directives
2013-04-09 20:05:40 +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
240e0321e8
ge goto end, last character of buffer
2013-04-09 19:32:44 +02:00
Maxime Coste
7f535988f0
gg is back to goto top
2013-04-09 19:32:26 +02:00
Maxime Coste
829876a6fa
Context: push_jump does not allow the same jump to be present multiple times
2013-04-09 14:29:28 +02:00
Maxime Coste
5b1839ab75
BufferIterator: allow operator{==,!=} for different buffers
2013-04-09 14:28:03 +02:00
Maxime Coste
61293e8d60
use gk and gj for goto first/last line instead of gt and gb
2013-04-09 14:23:26 +02:00
Maxime Coste
43b5bd5260
add ga binding to go to last buffer
2013-04-09 14:22:21 +02:00
Maxime Coste
7b94925898
force redraw window if needed in context_wrap
2013-04-09 14:21:48 +02:00
Maxime Coste
624c112d08
tweak prompt text
2013-04-06 15:43:33 +02:00
Maxime Coste
be9bfa479f
use more explicit prompts for search and pipe, use color to validate
2013-04-06 13:02:16 +02:00
Maxime Coste
1ab8120147
refactor regex based selectors, move regex construction out of them
2013-04-05 19:28:08 +02:00
Maxime Coste
c53319ce5e
refactor regex prompting commands
2013-04-05 18:29:05 +02:00
Maxime Coste
9bb9eda302
Dynamically change prompt color for regex prompt depending on regex validity
2013-04-04 19:09:34 +02:00
Maxime Coste
6e2fa38c15
InputHandler::prompt takes a color pair to use
2013-04-04 19:09:19 +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
1fd99e7e88
do not check buffer invariant in do_{erase,insert} as this cause O(n²) behaviour
2013-04-04 14:04:37 +02:00
Maxime Coste
4fbe2dc6bc
compile with -pedantic option and fix warnings
2013-04-04 14:04:37 +02:00
Maxime Coste
4aa5a9a3f6
display a message in the status line when yanking
2013-04-03 19:18:17 +02:00
Maxime Coste
c6262fc5e1
use Y for concatenated yank
2013-04-03 19:14:38 +02:00
Maxime Coste
d56f6444b5
Add alt-[kK] for keeping only selections matching/not matching a given regex
2013-04-03 19:07:43 +02:00
Maxime Coste
5bb8e656c5
Editor: fix utf8 handling in prepare_insert
2013-04-03 18:52:49 +02:00
Maxime Coste
72395840f9
Makefile: hide object files
2013-04-03 18:52:16 +02:00
Maxime Coste
0395f3b9fc
fix compilation with clang++
2013-04-03 18:51:40 +02:00
Maxime Coste
161fab13f7
complete_opt: accept an optional length in completion desciptor
2013-04-02 19:57:39 +02:00
Maxime Coste
aa44d05ede
add date information to git-blame
2013-04-02 18:57:02 +02:00
Maxime Coste
3a351aa436
Change list separators to ; and tuple separators to |
2013-04-02 18:56:09 +02:00
Maxime Coste
07f3bbe523
add alt-* for not smart set search pattern to selection
2013-04-02 18:46:33 +02:00
Maxime Coste
0550da2211
add <lt> and <gt> key name
2013-04-02 18:41:45 +02:00
Maxime Coste
b62c78f9e9
ConnectionAccepter: fix socket fd leak
2013-04-02 14:27:04 +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
7bf73b5896
OnScopeEnd: move parameter instead of copying it
2013-04-02 14:03:22 +02:00
Maxime Coste
e2d64b01d5
ClientAccepter triggers window redrawing after executing a command
2013-04-02 14:00:37 +02:00
Maxime Coste
cd16a7ff18
FlagLines triggers a window redraw when option is modified
2013-04-02 13:58:28 +02:00
Maxime Coste
e5215e7138
Window: move highlighters after options so that they can reference it
2013-04-02 13:58:04 +02:00
Maxime Coste
b9f5dbd3b5
add an OptionManagerWatcher_AutoRegister class
2013-04-02 13:57:04 +02:00
Maxime Coste
a18241a03b
Extract AutoRegister logic to a helper class
2013-04-02 13:56:30 +02:00
Maxime Coste
b266035c71
fix String::String(Codepoint, CharCount)
2013-04-02 13:42:24 +02:00
Maxime Coste
e070e738f1
Set default shell to bash, as most kak files requires it
2013-04-01 03:49:30 +02:00
Maxime Coste
75fae291e1
Fix flags width handling in FlagLine highlighter
2013-04-01 03:49:30 +02:00
Maxime Coste
f4b3510b14
add git-blame command to git-tools.kak
2013-04-01 03:49:30 +02:00
Maxime Coste
6c2430ce08
FlagLines updates the lines in the option according to buffer modifications
2013-03-31 14:53:32 +02:00
Maxime Coste
22c34b79f6
Move change listener registration to BufferChangeListener_AutoRegister
...
DynamicSelectionList now just inherit from this class, so that
the registration logic can be shared.
2013-03-31 14:53:32 +02:00
Maxime Coste
dbbe455eb1
add git-tools.kak, with experimental git diff display as line flags
2013-03-31 14:53:32 +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
8b821205da
fix BufferIterator::offset
2013-03-29 19:35:48 +01:00
Maxime Coste
585e64fd10
add swap case support with the ~ key
2013-03-29 19:35:48 +01:00
Maxime Coste
01968cb96e
String: inherit from std::string rather than using it as a backend
2013-03-29 19:35:48 +01:00
Maxime Coste
1f4072dc72
use a scoped edition in Repeated so that repeated actions have a single undo group
2013-03-29 19:35:48 +01:00
Maxime Coste
deb502cb40
kakrc: define colorscheme before sourcing user config
2013-03-29 19:35:48 +01:00
Maxime Coste
08873a779a
cpp.kak: fix alt_dirs handling with more than 2 directories
2013-03-29 19:35:47 +01:00
Maxime Coste
96b017f76e
Minor BufferCompleter refactoring
2013-03-29 19:35:47 +01:00
Maxime Coste
417682883e
use only one constructor with a default parameter for units
2013-03-27 18:42:38 +01:00
Maxime Coste
a3bc8dbc79
idvaluemap: minor style changes
2013-03-27 18:42:00 +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
a437e9488b
idvaluemap, FunctionGroup: consitfy completion methods
2013-03-27 14:09:09 +01:00
Maxime Coste
251f09ff89
Merge {Filter,Highlighter}Group in a FunctionGroup template
2013-03-27 13:45:22 +01:00
Maxime Coste
ee0e640384
kak_bufname env var use display_name
2013-03-26 19:28:44 +01:00
Maxime Coste
c6a1fed6b4
add regex_option highlighter, which takes a regex option name and highlight all its matches
2013-03-26 14:26:59 +01:00
Maxime Coste
996e5999ed
permit do declare regex option
2013-03-26 14:26:07 +01:00
Maxime Coste
4ec9c4c32a
Make TypedOption templates public
2013-03-26 13:47:14 +01:00
Maxime Coste
14933bdeaf
% register uses the buffer display name
2013-03-26 13:40:04 +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
36dc6c23a0
add default zero construction to units
2013-03-26 00:04:03 +01:00
Maxime Coste
d02133d382
extract parse_color to color.cc as str_to_color, and add color_to_str
2013-03-25 23:35:59 +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
dfa5318765
fix some style problems detected by cppcheck
2013-03-25 18:44:52 +01:00
Maxime Coste
3e9a0c4c13
{grep,make}.kak: use edit! instead of trying to delete buffer
2013-03-22 18:39:48 +01:00
Maxime Coste
a160fd6984
open_fifo delete existing buffer if needed
2013-03-22 18:39:00 +01:00
Maxime Coste
d04a6b1e18
cpp.kak: alt supports an alt_dirs options for directories to search
2013-03-22 14:30:09 +01:00
Maxime Coste
07866e6ae9
show informations on uncaught std::exceptions
2013-03-22 14:29:22 +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
9494fbbd87
kakrc: avoid bash features
2013-03-22 13:45:52 +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
38a46a6682
add WinDisplay hook
2013-03-22 13:41:48 +01:00
Maxime Coste
60599917cc
add a kak_selections env var, which contains all selections separated by a comma
2013-03-21 19:10:18 +01:00
Maxime Coste
e5d93c2194
BufferManager: replace Buffer* get_buffer with Buffer& get_buffer
2013-03-21 19:09:31 +01:00
Maxime Coste
df79b7610a
utf8 validity is not a buffer concern
2013-03-20 19:26:46 +01:00
Maxime Coste
abe37b5fdb
Add a RuntimeError hook called when a runtime_error exception is catched at client level
2013-03-20 19:11:58 +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
d99fe87b43
Editor: fix select(Selection&, SelectMode::Replace)
2013-03-20 19:11:58 +01:00
Maxime Coste
07a2c2944f
NCurses: draw a scroll bar
2013-03-20 19:11:58 +01:00
Maxime Coste
3f467ba451
BufferCompleter: preserve completions when inserting
...
try to narrow matches with entered prefix
2013-03-20 19:11:58 +01:00
Maxime Coste
a19a788b94
CommandManager: fix some crashes
2013-03-19 18:58:21 +01:00
Maxime Coste
9c78f02903
BufferCompleter: fix backward looping in completion candidates
2013-03-19 14:15:42 +01:00
Maxime Coste
42fae29391
Add an 'insert_hide_sel' option, which hides selection when inserting
2013-03-19 14:04:24 +01:00
Maxime Coste
f0baf35117
clang-complete: do the compilation in the buffer directory
2013-03-19 13:57:23 +01:00
Maxime Coste
ee800ad778
select_to_{,reverse}: search on other lines if needed
2013-03-18 23:47:18 +01:00
Maxime Coste
6907fcf76e
more robust implementation of expand_unprintable
2013-03-18 23:35:23 +01:00
Maxime Coste
d3f586f378
DisplayBuffer::split does not check if the split is on a character boundary
2013-03-18 23:34:40 +01:00
Maxime Coste
2de0d0fccf
add a reg command to set a register
2013-03-18 22:44:39 +01:00
Maxime Coste
5fe7315df9
add 'r' object alias for [] (range)
2013-03-18 22:31:05 +01:00
Maxime Coste
a11a162734
Buffer: optimize do_insert to minimize changes in m_lines vector
2013-03-18 19:45:17 +01:00
Maxime Coste
e6c635be34
DynamicSelectionList: optimize updating on buffer modification
...
Now that we know selections are sorted, we can get the set of selections
needing updating in log(n) time using a binary search, for modification
not changing the line count, this makes updating selections run in log(n)
instead of n.
2013-03-18 19:09:07 +01:00
Maxime Coste
354ae7ad89
Editor: keep selections sorted and use an index for the main one
2013-03-18 19:09:07 +01:00
Maxime Coste
a981d41cde
Editor: replace selections().back() with main_selection()
2013-03-15 18:22:08 +01:00
Maxime Coste
5e88b7fe28
move BufferIterator on_{insert,erase} as DynamicSelectionList implementation detail
2013-03-15 14:22:42 +01:00
Maxime Coste
0c4addb40c
replay_macro: parse keys only once
2013-03-15 14:16:15 +01:00
Maxime Coste
84e3c99c93
Buffer::on_erase: avoid resizing lines more than necessary
2013-03-15 14:15:29 +01:00
Maxime Coste
5dc6a36bf8
Makefile: fix link with bfd linker
2013-03-15 14:03:12 +01:00
Maxime Coste
0ca23f9ebd
clang: fix auto completion when cursor is on end of line
2013-03-14 20:40:43 +01:00
Maxime Coste
17b2d8c052
NCurses: hand coded menu implementation
2013-03-14 19:19:33 +01:00
Maxime Coste
65850ff1e8
add clang.kak, providing clang based insert completion
2013-03-14 14:12:14 +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
0b45a725e4
move remoting code to remote.cc
...
ClientAccepter is now Server's implementation detail and all socket logic
are isolated in remote.cc
2013-03-14 10:23:35 +01:00
Maxime Coste
b309d1df61
move complete_filename to file.cc
2013-03-13 19:39:38 +01:00
Maxime Coste
de536b80cd
goto file uses the 'path' string-list option instead of hard coded paths
2013-03-13 18:52:55 +01:00
Maxime Coste
4069f42845
find_file: automatically add missing '/' and end of paths
2013-03-13 18:52:08 +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
0f957b3743
Editor: fix replace at end of buffer
2013-03-13 14:37:03 +01:00
Maxime Coste
c1db67e31a
Buffer: minor refactoring
2013-03-13 14:36:10 +01:00
Maxime Coste
8acb25d9a4
ctags: use - instead of _ in command name
2013-03-12 19:51:08 +01:00
Maxime Coste
09e30c40e3
BufferCompleter: watch 'completions' option, and update completions when it changes
2013-03-12 19:23:41 +01:00
Maxime Coste
2440a7e82e
NCurses: hook redraw on c-l
2013-03-12 18:57:12 +01:00
Maxime Coste
e428a9757f
Modify network protocol to allow commands through the socket
2013-03-12 18:53:18 +01:00
Maxime Coste
17b861d78e
NCurses: handle empty items in menu_show
2013-03-11 14:20:28 +01:00
Maxime Coste
ddc894ccfe
Add an experimental configurable input completion fonction
...
The completions option (a std::vector<String>) is used for
completions candidates, if it's first element matches the current
cursor position and buffer timestamp.
2013-03-11 14:20:28 +01:00
Maxime Coste
4db6e3e917
add kak_timestamp env var to access current buffer timestamp
2013-03-11 14:20:28 +01:00
Maxime Coste
8cc9a44d47
minor cleanups in complete_word
2013-03-11 14:20:28 +01:00
Maxime Coste
eab2cc240a
InputHandler: complete_word knows best when not to complete
2013-03-09 13:23:47 +01:00
Maxime Coste
89ba8535e2
InputHandler: extract word completion algorithm
2013-03-08 18:43:14 +01:00
Maxime Coste
cfafe203e2
NCurses: fix redrawing when info or menu is hidden
2013-03-08 18:42:43 +01:00
Maxime Coste
1e8a109d0d
Use some builtins colors aliases instead of hardcoded values for highlighters
2013-03-06 20:33:20 +01:00
Maxime Coste
e4240448b1
colalias: always override
2013-03-06 20:30:02 +01:00
Maxime Coste
f677d4ba32
Use a ColorPair in DisplayAtoms instead of separate fg/bg colors
2013-03-06 20:28:02 +01:00
Maxime Coste
594ee65949
do not redraw the whole screen each time
2013-03-06 19:07:10 +01:00
Maxime Coste
a10bfed9e5
ncurses: fix unicode handling in status line
2013-03-06 19:03:58 +01:00
Maxime Coste
5ff22d44be
Add utf8_iterator::advance(CharCount, utf8_iterator end)
2013-03-06 19:03:43 +01:00
Maxime Coste
4712765e8a
Add FlagLines highlighter
...
This highlighter show a given flag in front of each lines whose number
is present in a given int-list option
2013-03-06 14:27:33 +01:00
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