Maxime Coste
6ff6058ceb
create_buffer_from file return nullptr on file not found instead of throwing
2012-10-16 14:59:39 +02:00
Maxime Coste
0ce6bd9bf5
use ByteCount instead of CharCount when we are really counting bytes
...
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
8de754e2e9
when executing keys, propagate potentially changed editor to calling context
2012-10-10 19:15:43 +02:00
Maxime Coste
dae8f65308
exec concat all its arguments instead of accepting only one
2012-10-10 19:15:09 +02:00
Maxime Coste
081f579ba1
OSX compilation fixes
2012-10-02 10:36:28 +02:00
Maxime Coste
5b6cb500fc
Menus can be placed anywhere on the screen, and takes a style parameter
...
This paves the way for insert mode completion menu using the current
prompt menu system.
2012-09-30 15:18:37 +02:00
Maxime Coste
f230feec7f
Change buffer order based on the last one used
2012-09-28 14:14:49 +02:00
Maxime Coste
77eb86bcdb
Forbid context copy
2012-09-26 14:27:23 +02:00
Maxime Coste
f76323f56e
Move UserInterface out of Client into Context
2012-09-26 14:13:04 +02:00
Maxime Coste
c36ee924eb
cleanup BatchUI
2012-09-25 14:23:50 +02:00
Maxime Coste
a312ce6dc2
extract Client virtual methods to a UserInterface class
2012-09-24 19:24:27 +02:00
Maxime Coste
b3c4912404
Use context.editor() instead of context.window() when a window is not needed
2012-09-24 13:56:39 +02:00
Maxime Coste
a92a6dc7f3
ColorRegistry: permit overriding an alias
2012-09-17 21:01:11 +02:00
Maxime Coste
5cf947f845
Add a ColorRegistry class responsible of color parsing and supporting aliases
...
colalias command permits to define names for color pairs
2012-09-17 19:01:13 +02:00
Maxime Coste
ebae75e96e
fifo: buffer size is 4k instead of 512
2012-09-14 14:29:54 +02:00
Maxime Coste
f6d2533cae
rework fifo handling, use real fifos in {make,grep}.kak, update README
2012-09-12 19:54:46 +02:00
Maxime Coste
7c039585a4
add -file-completion option to def command and document in README
2012-09-12 14:21:42 +02:00
Maxime Coste
62e50c38fa
commands.cc: cleanup
2012-09-11 19:09:55 +02:00
Maxime Coste
82a2bb37e7
Remove runtime command, use shell expansion to source files in rc dir.
...
With the help of a new kak_runtime env var.
2012-09-10 20:10:18 +02:00
Maxime Coste
f9e31856cf
Buffer: Allow inserting at the end when the inserted text ends with an end of line
...
Adapted other code in consequence and added unit tests so that this behavior
is maintained.
2012-09-10 19:26:17 +02:00
Maxime Coste
ae76b7dddc
Add support for shell script parameters
...
Now %sh{ ... } can access positional parameters through
standard shell construct, allowing simple handling of variable
parameters.
def command accepts -shell-params flag to use this facility.
2012-09-09 17:10:53 +02:00
Maxime Coste
16e1c2daf9
simplify menu api
2012-09-05 19:02:06 +02:00
Maxime Coste
b08d8719e6
move input handling, including menu and prompt, to the Client class
2012-09-03 14:22:02 +02:00
Maxime Coste
51e80558d9
Change client menu api to give more control to the caller
2012-08-30 21:53:22 +02:00
Maxime Coste
1ca502d23d
More useable menu implementation on ncurses
2012-08-30 21:14:28 +02:00
Maxime Coste
bbce6b22a3
remove regex.hh, define Regex directly in string.hh
2012-08-29 21:49:36 +02:00
Maxime Coste
8febec0bcf
add_hook: do not construct a regex again and again
2012-08-29 14:15:13 +02:00
Maxime Coste
db98bcc278
Add an -fifo option to the 'edit' command
...
In -fifo mode, the buffer's file is used as a fifo, writes are tracked
and udpated in the buffer. This should be useful for grep and make
commands.
2012-08-29 00:17:37 +02:00
Maxime Coste
217b3d2bce
fix compilation on OSX
2012-07-30 14:12:49 +02:00
Maxime Coste
e4fd839dda
use a strongly typed int CharCount for character counts
2012-08-23 23:56:35 +02:00
Maxime Coste
0d8cce2728
use a strongly typed int LineCount for line counts
2012-08-22 23:33:52 +02:00
Maxime Coste
05098a373a
edit command: when a line is specified ask the window to center it
2012-08-21 20:08:57 +02:00
Maxime Coste
1515566e4b
Allow context with client and non-window editor
2012-08-17 20:18:36 +02:00
Maxime Coste
c1fcc593a1
Store the current client in context
2012-08-15 22:36:45 +02:00
Maxime Coste
b630189ce5
Add a writeall (wa) command
2012-08-14 14:20:18 +02:00
Maxime Coste
808e79a53e
commands: code cleanup
2012-08-11 11:48:54 +02:00
Maxime Coste
691a6328b1
exec_keys: use the context editor, no need for a new one
2012-08-08 19:37:04 +02:00
Maxime Coste
ce99856bfa
Refactor BufferManager
2012-08-08 19:36:40 +02:00
Maxime Coste
8e0f99a03b
write command refuse to write a scratch file when no filename is given
2012-08-07 23:20:53 +02:00
Maxime Coste
207f2f6bb9
edit commands accept a -scratch flag to edit not to be saved file
2012-08-07 23:20:11 +02:00
Maxime Coste
2cac18545e
define_command: remove unused param from parser definition
2012-08-07 14:26:51 +02:00
Maxime Coste
a38a9c3bf2
Commands take a mutable context, main_context is gone !
2012-08-06 22:02:11 +02:00
Maxime Coste
a712dd5bbe
Completions functions take a Context parameter
2012-08-06 21:37:43 +02:00
Maxime Coste
4dc9973288
Registers need a context to return their values
2012-08-05 20:13:41 +02:00
Maxime Coste
0164d78c10
Use a context as parameter to keymap functions
2012-08-05 19:39:37 +02:00
Maxime Coste
2071db3558
Tokens are CommandManager implementation details
...
CommandParameters go back to memoryview<String>
2012-08-01 14:27:34 +02:00
Maxime Coste
36070dd429
CommandManager: rework command parser
...
a new type of strings is supported inspired by the ruby strings.
%<delimiter>content<delimiter>, if opening delimiter is one of
([{<, then closing delimiter is the matching )]}> and balanced
delimiters in the string needs not to be escaped, else the closing
delimiter is the same as the opening one.
shell expansion is available through %sh<delimiter>command<delimiter>
syntax.
Command flags have been removed, as these strings provide proper nesting
support, so now, you can for example do:
def command %{ echo %sh{ ls } }
2012-07-31 14:22:57 +02:00
Maxime Coste
b65f8cc887
CommandParameters is a list of Tokens instead of Strings
...
CommandManager string parsing is less ad-hoc.
2012-07-31 00:06:50 +02:00
Maxime Coste
603cfd3108
do not catch exception in commands, let them propagate
2012-06-30 00:44:14 +02:00
Maxime Coste
7aa533c049
simplify Register interface
2012-06-29 13:25:34 +02:00