Maxime Coste
b630189ce5
Add a writeall (wa) command
2012-08-14 14:20:18 +02:00
Maxime Coste
4e34f777b0
Buffer: stronger invariant, a buffer is never empty and all lines finish by '\n'
2012-08-14 14:13:10 +02:00
Maxime Coste
b37f8f470a
use new reg access syntax in rc files
2012-08-11 12:14:17 +02:00
Maxime Coste
0a976cd309
CommandManager: support %reg{<reg>} and %opt{<option>} syntax
2012-08-11 12:13:48 +02:00
Maxime Coste
808e79a53e
commands: code cleanup
2012-08-11 11:48:54 +02:00
Maxime Coste
759319ca44
Buffer: move back Modification as an implementation detail
...
* Filters now only works on insertion and take directly the
iterator and content
* use Buffer::insert and Buffer::erase to modify a buffer
2012-08-10 19:12:43 +02:00
Maxime Coste
44621bff11
detect byte order mark in buffers, and write back
2012-08-10 18:48:21 +02:00
Maxime Coste
7d3675fe33
make.kak: quote echo parameter in errjump
2012-08-10 18:47:54 +02:00
Maxime Coste
20655f9290
ShellManager: fix option regex, allow caps
2012-08-10 18:47:18 +02:00
Maxime Coste
d81a100a85
support crlf line ending when reading and writing buffers
2012-08-10 14:24:13 +02:00
Maxime Coste
54b599c1a7
Buffer: fix corner case in insert
2012-08-10 14:22:57 +02:00
Maxime Coste
c7fc2a9317
Buffer: add reset_undo_data method
2012-08-10 14:21:32 +02:00
Maxime Coste
e5c46d7c45
Window,Buffer: add const overload for {option,hook}_manager
2012-08-10 14:21:01 +02:00
Maxime Coste
a30b3e1343
highlight_range: handle empty ranges
2012-08-10 14:20:15 +02:00
Maxime Coste
f59dd77f60
add rc/asciidoc.kak for asciidoc highlighting
2012-08-08 19:38:27 +02:00
Maxime Coste
1eb2b8321b
make.kak: errjump also display the error description in the status line
2012-08-08 19:37:32 +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
b29b75aa81
Regex Highlighter: highlight 10 lines above and below displayed range
...
and some code cleanup
2012-08-08 19:02:36 +02:00
Maxime Coste
1ede3f6b13
BufferIterator: use default operator=
2012-08-08 18:51:30 +02:00
Maxime Coste
939dc0fa8e
Makefile: use -MMD to generate deps instead of using separate steps
2012-08-08 13:39:31 +02:00
Maxime Coste
e7153aacef
rc/{grep,make}.kak: use a scratch buffer to store results
2012-08-07 23:29:12 +02:00
Maxime Coste
78b0c2f7f5
kakrc: fix string highlighting
2012-08-07 23:26:40 +02:00
Maxime Coste
25a1a9c159
Fix do_pipe
2012-08-07 23:25:54 +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
dd05d6c6f5
BufferIterator: fix operator+
2012-08-07 23:18:37 +02:00
Maxime Coste
b0ed0e37b7
add rc/grep.kak which provides a grep and gjump command
2012-08-07 14:29:33 +02:00
Maxime Coste
a88da08767
add rc/make.kak which provides make and errjump commands
2012-08-07 13:52:49 +02:00
Maxime Coste
6a660f7e8f
ncurses: refresh at the end of print_status so that the status is immediately visible
2012-08-07 14:21:26 +02:00
Maxime Coste
2cac18545e
define_command: remove unused param from parser definition
2012-08-07 14:26:51 +02:00
Maxime Coste
718f62b6a3
support line and column in command line parameters
2012-08-07 14:00:47 +02:00
Maxime Coste
b3c293a9da
cpp.kak: also try to detect cpp files using the file tool
2012-08-07 13:51:51 +02:00
Maxime Coste
4bfe46a882
kakrc: tweak highlighting
2012-08-07 13:51:21 +02:00
Maxime Coste
661c9db925
colorize_regex_factory: transform boost::regex_error in Kakoune::runtime_error
2012-08-07 00:32:21 +02:00
Maxime Coste
c166bc92e3
use new regex highlighter features in rc files
2012-08-07 00:28:55 +02:00
Maxime Coste
02b7786bcd
fix complete_filename
2012-08-07 00:16:51 +02:00
Maxime Coste
b69134c36f
new regex highlighter parameters syntax, support per capture highlight
2012-08-07 00:13:54 +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
39797f87dc
command_manager: cleanup command execution, lazy exec shell commands
2012-08-06 19:29:51 +02:00
Maxime Coste
4dc9973288
Registers need a context to return their values
2012-08-05 20:13:41 +02:00
Maxime Coste
18ca422306
Context: only buffer context are not allowed, an editor is always needed
2012-08-05 20:12:43 +02:00
Maxime Coste
1ce2d3e302
cleanup keymap definition
2012-08-05 19:53:39 +02:00
Maxime Coste
0164d78c10
Use a context as parameter to keymap functions
2012-08-05 19:39:37 +02:00
Maxime Coste
12e2ce0f3c
Context: store an editor instead of a window
2012-08-05 18:23:37 +02:00
Maxime Coste
2cc01d3407
move SafeCountable functionality to Editor from Window
2012-08-05 18:23:09 +02:00
Maxime Coste
d91070f5b7
Context: add a numeric_param property
2012-08-05 16:46:10 +02:00
Maxime Coste
9fcb89c8fc
Window: tolerate invisible cursor when it is the end of the buffer
2012-08-02 07:04:42 +02:00
Maxime Coste
23f72851e4
Buffer: fix insert at end of buffer
2012-08-02 07:04:04 +02:00
Maxime Coste
407782a742
command_manager.cc: use anonymous namespace
2012-08-02 06:41:55 +02:00
Maxime Coste
2d2ac98511
fix global.kak, eval command no longer exists
2012-08-02 06:41:08 +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
ac2676cbcf
ShellManager: catch all exception once we are in child process
2012-07-31 14:21:25 +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
a3cb9bfc5e
editor.cc: remove unused id_not_unique
2012-07-30 13:39:38 +02:00
Maxime Coste
6bd67c01cc
refactor insertion and insertion replay functions
2012-07-27 10:22:33 +02:00
Maxime Coste
0e9b0c8b3a
insert_char: remove 'ctrl-r %' handling, already provided by dynamic register
2012-07-25 14:29:51 +02:00
Maxime Coste
af203b2b94
diff.kak: recognize patch files
2012-07-25 14:14:25 +02:00
Maxime Coste
6fc0432e9f
add inline keyword in cpp highlighting
2012-07-20 13:36:06 +02:00
Maxime Coste
435797e34f
global: quote tag pattern
2012-07-18 19:03:20 +02:00
Maxime Coste
399b9b6235
optimize regex highlighter's regex
2012-07-18 19:02:41 +02:00
Maxime Coste
4908b2c3ef
Fix end_it computation in Buffer::insert, avoid clamping in iterator_at
2012-07-18 14:12:41 +02:00
Maxime Coste
c915e18950
Move selection to last modification position in editor::{undo,redo}
2012-07-16 21:53:00 +02:00
Maxime Coste
31c0931dff
Go back to a generic BufferChangeListener interface for selection update
2012-07-16 21:51:37 +02:00
Maxime Coste
fe988868e5
IncrementalInserter preserves selections
2012-07-16 21:21:56 +02:00
Maxime Coste
5a671db12c
Correct multi select unit test
2012-07-16 21:14:52 +02:00
Maxime Coste
1d5180e782
Window: handle horizontal scrolling correctly
...
Window::scroll_to_keep_cursor_visible_ifn now highlights the cursor
line in order to find its real display position (for example if the
number_lines highlighter is present it may modify the position).
2012-07-15 01:48:50 +02:00
Maxime Coste
6e072d1a61
ncurses: fix first ~ line drawing
2012-07-12 23:59:02 +02:00
Maxime Coste
03d8efc249
DisplayBuffer: add range and compute_range methods
2012-07-12 23:51:13 +02:00
Maxime Coste
b1a087485c
DisplayBuffer rewrite, a DisplayBuffer is now a list of DisplayLines
...
Code is now greatly simplified using this architecture, and
DisplayAtoms no longer know their DisplayCoords and can be in any
order.
2012-07-12 23:19:10 +02:00
Maxime Coste
2830825c56
BufferIterator: allow invalid iterator in operator=
2012-07-12 23:11:16 +02:00
Maxime Coste
71fcc123bc
Window: remove iterator_at and line_and_column_at methods
2012-07-12 14:28:58 +02:00
Maxime Coste
06dd3f8aad
Add Editor::replace(memoryview) and bind alt-P to replace paste
2012-07-11 14:15:27 +02:00
Maxime Coste
5cbded8221
make display buffers and highlighters handle better longer than display lines
...
still work in progress, I think the whole display system will in fact need
a rewrite.
2012-07-03 23:23:07 +02:00
Maxime Coste
d092afead9
make DisplayBuffer::atom_containing easier to understand
2012-07-03 21:12:05 +02:00
Maxime Coste
d7e1cab116
DisplayAtom: support empty replacement
2012-07-03 19:13:16 +02:00
Maxime Coste
603cfd3108
do not catch exception in commands, let them propagate
2012-06-30 00:44:14 +02:00
Maxime Coste
f11d44246c
add safe_ptr::operator=(safe_ptr&&) and safe_ptr::reset(T*)
2012-06-30 00:33:36 +02:00
Maxime Coste
dfbda951d3
support static and dynamic registers, add '%' (filename) and '.' (selection) registers
2012-06-29 18:37:17 +02:00
Maxime Coste
5b2ef1da6a
IncrementalInsertor::insert takes a memoryview<String> rather than a Register
2012-06-29 18:35:48 +02:00
Maxime Coste
7aa533c049
simplify Register interface
2012-06-29 13:25:34 +02:00
Maxime Coste
49e1d91804
Buffer: pass by value instead of by reference when object will be copied anyway
...
Let copy elision and move semantics kick in
2012-06-29 13:19:29 +02:00
Maxime Coste
36e4dacdf5
Fix BufferIterator::on_erase and tweak Buffer
2012-06-28 14:26:01 +02:00
Maxime Coste
9b6b6b6b17
Rename UI to Client
2012-06-28 14:11:43 +02:00
Maxime Coste
286462a2f6
Add Context::option_manager()
...
it returns the more specific option manager available
(window -> buffer -> global)
2012-06-28 14:01:37 +02:00
Maxime Coste
9c78453cb7
Context references buffer and window with a safe_ptr
2012-06-28 13:46:14 +02:00
Maxime Coste
4dfc910195
BufferManager use safe_ptr to reference the Buffers
2012-06-28 13:45:42 +02:00
Maxime Coste
1289268174
Add SafeCountable and safe_ptr classes
...
safe_ptr is a smart pointer which manage a safe count in pointed
objects. SafeCountable provides the interface needed for safe_ptr
and assert the safe count is zero in destructor.
This permits to have pointers that guarantees their pointed object is
alive.
2012-06-28 13:42:55 +02:00
Maxime Coste
e7e9b8a6cd
add rc/diff.kak and load in kakrc
2012-06-27 14:29:12 +02:00
Maxime Coste
70bd18e1f2
add kak_opt_.* environement variable retriever to access options from shell.
2012-06-27 14:28:43 +02:00
Maxime Coste
ecb3a737a9
Tweak String class, and cleanup usages
...
remove String::clear, add operator=(String&&) add str_to_int(const String&)
to replace atoi.
2012-06-27 14:26:29 +02:00
Maxime Coste
7fb49b183e
ShellManager environment variable use a regex instead of an exact match
...
when a kakoune releated env var used in a shell command, the ShellManager
tries to match it with given regex and the first that matches calls its
value retriever.
For this to be useful, EnvVarRetrievers now also take the variable
name in its parameters.
2012-06-25 19:40:18 +02:00
Maxime Coste
cffb895797
remove ugly id_to_str param in idvaluemap and str_to_str
2012-06-25 19:11:13 +02:00
Maxime Coste
ccec35f88c
code cleanups in buffer
2012-06-25 19:05:32 +02:00
Maxime Coste
d1c4a655b9
git.kak: use filetype option
2012-06-15 14:24:57 +02:00
Maxime Coste
11e8d07797
cleanup kakrc.kak
2012-06-14 21:52:47 +00:00
Maxime Coste
c8fdbc2a60
support buffer as a hook target
2012-06-14 20:51:01 +00:00
Maxime Coste
0e8add34ae
delete buffer deletes the current buffer when no params given
2012-06-14 18:05:42 +00:00