Commit Graph

449 Commits

Author SHA1 Message Date
Maxime Coste
dcd733e5fa Do a first phase of command renaming 2016-11-14 00:27:14 +00:00
Maxime Coste
9153663dfa Add -save-regs defaults in the context wrap docstring 2016-11-08 09:49:48 +00:00
Nikolaus Wittenstein
e7970232d3 Fix typo in write_cmd's desc
Should be possessive "its".
2016-10-31 12:42:10 -04:00
Maxime Coste
cc2affea11 Always allow to delete a buffer, just recreate a scratch buffer if needed
Fixes #850
2016-10-13 21:37:44 +01:00
Maxime Coste
1f3e424047 Do not expand filenames when doing insert filename completion
Fixes #855
2016-10-13 19:46:09 +01:00
Frank LENORMAND
f7e2bfd76f Document the optional parameter of the cd command 2016-10-11 10:39:20 +03:00
Maxime Coste
025b91baca Convert some uses of lambda to more concise std::mem_fn 2016-10-10 23:44:18 +01:00
Maxime Coste
5dd47e9c33 Preserve shell context through eval command
Fixes #835
2016-10-06 23:22:39 +01:00
Maxime Coste
d50087eabe Change BufWritePre/BufWritePost logic
Run them in client context if possible, and give them the target
filename instead of the buffer name.

Fixes #823
2016-10-01 23:51:53 +01:00
Maxime Coste
35559b65dd Support codepoints of variable width
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.

Fixes #811
2016-10-01 13:45:00 +01:00
Maxime Coste
e3c4bddd3b Make hook disabling work for all hooks, not only user hooks
Fixes #823
2016-09-26 23:43:05 +01:00
Maxime Coste
4f874a3679 Code cleanup in make_completer, use std::decay 2016-09-19 23:26:52 +01:00
Maxime Coste
396b71ecc2 Add an unmap command to remove key mappings 2016-09-19 09:10:41 +01:00
Maxime Coste
44e9da3bee More command completer code cleanup 2016-09-18 16:27:34 +01:00
Maxime Coste
d14c39ebdd Rewrite PerArgumentCommandCompleter to use compile time dispatching
No need to store these vectors of std::functions around anymore.
2016-09-18 16:07:00 +01:00
Maxime Coste
4fc20b8d7d Rework client quitting and handling of remote errors
Client quitting no longer immediately unwinds, client is just pushed
for deletion until we get back to the main loop, similarly to what
happens for buffer and window deletion.
2016-09-04 17:56:07 +01:00
Maxime Coste
3831117bc7 style tweak 2016-08-30 23:23:07 +01:00
Maxime Coste
b6cab458ed Use a heap instead of sorting to gather the best shell-candidates matches
O(n + k * log n) (with k = 100 here) instead of O(n log n), much faster
with many candidates.
2016-08-30 13:42:29 +01:00
Maxime Coste
f6cb6319d6 Enable shell-candidates update in fast completion mode 2016-08-30 00:55:01 +01:00
Maxime Coste
911a32a992 Only drop blank prefixed history entries in command/shell prompts
For regex prompts we actually want to save them, as a leading space
is significant

Fixes #767
2016-08-22 20:37:14 +01:00
Maxime Coste
f73e89a716 Add information of types of options 2016-08-06 09:05:50 +01:00
Maxime Coste
5b7b6eebaf Regenerate shell-candidates for each completion sessions
That should allow fixing the #665 issue while still avoiding to
run a potentially long shell command on each keystroke.
2016-08-05 13:53:19 +01:00
Maxime Coste
38d372567b Do not force exec to run in normal mode anymore, run in the current mode 2016-08-05 09:43:33 +01:00
Maxime Coste
2425f4a781 Tweak session renaming code 2016-07-28 00:16:41 +01:00
Maxime Coste
62fa133efd Merge remote-tracking branch 'doppioandante/set_session' 2016-07-28 00:12:09 +01:00
Enrico Lumetti
1a7cd707aa Add 'session' command to change remote session name 2016-07-24 22:46:33 +02:00
Frank LENORMAND
e3bf01d1f9 Replace C-style operators with their alphabetical equivalent 2016-07-24 08:34:49 +03:00
Frank LENORMAND
8a4596bea9 Implement a readonly mode
This commit introduces the `readonly` variable as well as the `-ro`
command line option which prevent buffers from being overwritten on
disk when the `write` command is used without arguments. Some buffers
can selectively be put in readonly mode by setting the `readonly`
variable on the `buffer` scope, the `global` mode will affect all
buffers (even those who will be open subsequently), using the `window`
scope will have no effect.

Closes #685
2016-07-23 10:03:21 +03:00
Maxime Coste
88a9607552 Keep modified selections in non-draft exec/eval -itersel
Fixes #727
2016-07-08 09:52:10 +01:00
Maxime Coste
fcf73c2293 Refactor context_wrap to share more code between draft/non draft case
Fixes #706
2016-06-22 22:27:43 +01:00
Maxime Coste
5cb9cf4cc3 Go back to saving built-in registers by default in non draft :exec/:eval 2016-06-22 19:57:21 +01:00
Maxime Coste
91bf0d4622 Make window scope available to draft contexts
We do want window options/aliases/keymaps/hooks to be available in
draft context, dont we ?

Fixes #702
2016-06-20 19:45:15 +01:00
Maxime Coste
fef37e6a92 Do not preserve registers by default when exec/eval in a non draft context
Fixes #700
2016-06-20 19:40:49 +01:00
Maxime Coste
5cab2078f8 Fix string view created from a temporary string
This is clearly a case where rust style lifetime analysis would
have been nice, hopefully it comes with GSL lifetime extensions...

Fixes #680
2016-05-24 22:36:20 +01:00
Maxime Coste
6181781f3d Change dir to $HOME when no parameters are given to cd
Fixes #678
2016-05-20 09:41:29 +01:00
Maxime Coste
fb01c8c377 Do not force recreate scratch buffers by default, require edit! for that 2016-05-17 19:41:24 +01:00
Maxime Coste
1788126f38 BufferManager now owns the Buffers instead of registering them 2016-05-14 08:33:50 +01:00
Maxime Coste
da40828801 Check all buffer are saved in :kill, and add :kill! to avoid that 2016-04-29 21:58:04 +01:00
Maxime Coste
66a40a37cd prompt: zero password memory after running the command to be slightly more secure 2016-04-20 13:31:34 +01:00
Maxime Coste
199ccb4021 Add a -password switch to :prompt to allow for more secure password entering
Fixes #660
2016-04-19 09:51:09 +01:00
Maxime Coste
013519b3cb Remove iterator based regex constructor 2016-04-16 21:41:04 +01:00
Maxime Coste
3eca90f2b1 Only offer directories when completing :cd arguments
Refactor code in file.cc, avoid many double stat when searching
commands

Fixes #646
2016-04-07 22:47:41 +01:00
Maxime Coste
b5a68307ba Use a specific option type completions for insert completion
Fix escaping in jedi.kak as well
2016-04-04 13:42:58 +01:00
Maxime Coste
75e9bbfa43 Uniquify candidates in -shell-candidates mode 2016-03-28 14:16:45 +01:00
Maxime Coste
1bd356473b Use UsedLetters for shell-candidates filtering 2016-03-25 20:38:27 +00:00
Maxime Coste
840b7658fd Add an alternative -shell-candidates shell completion support
-shell-candidates use a shell script that returns all the candidates
and then sort them using Kakoune ranked matches system instead of
delegating the whole completion to the shell script (as shell-completion does)
2016-03-24 14:01:59 +00:00
Maxime Coste
1d646c03f5 Add completion support for alias/unalias commands 2016-03-24 00:05:40 +00:00
Maxime Coste
5bf9243006 User mappings and :exec are always executed in normal mode
Fix #551
2016-03-22 22:54:29 +00:00
Maxime Coste
7ecd65e1af Code cleanups 2016-03-14 13:41:20 +00:00
Maxime Coste
9e15181dc9 Rework container helpers, use pipe syntax and cleanup implementation
use 'container | filter(func) | reverse() | transform(func)' instead
of 'transform(reverse(filter(container), func), func)' to express
container transformations.
2016-03-08 21:35:56 +00:00