Commit Graph

447 Commits

Author SHA1 Message Date
Maxime Coste
942e63d836 correctly implement std::hash<String> 2012-05-30 14:20:21 +02:00
Maxime Coste
d7c917c96e include <unistd.h> in order to get read and write 2012-05-30 14:19:53 +02:00
Maxime Coste
6792696ba2 enable global and line numbering in kakrc 2012-05-29 11:35:30 +00:00
Maxime Coste
bffff5c518 Update README 2012-05-29 11:32:29 +00:00
Maxime Coste
2c4bc5582a Alt-Space permits to remove a selection by index 2012-05-29 11:15:43 +00:00
Maxime Coste
3bfd774f49 Restore piping support.
Add a ShellManager::pipe method, which pipes a string into the
command. Not quite satisfied with this interface.
2012-05-29 10:39:03 +00:00
Maxime Coste
84c1cad3d5 tweak cpp highlighting 2012-05-29 09:23:53 +00:00
Maxime Coste
c7ad724aec global.kak: support tag name completion 2012-05-29 05:23:36 +00:00
Maxime Coste
02c89022e4 Correctly set env vars in define_command 2012-05-29 05:43:09 +00:00
Maxime Coste
d599542473 Support -shell-completion option in the def command
-shell-completion takes some shell code as parameter which
should returns a newline separated list of completion candidates.
2012-05-29 05:22:18 +00:00
Maxime Coste
62202a46c1 Add some string helpers and unit tests
functions int_to_str(int) and split(const String&, Character),
plus corresponding unit tests
2012-05-29 05:19:50 +00:00
Maxime Coste
96c440fcaa CommandManager::execute can take an optional EnvVarMap argument which is used for shell evaluation 2012-05-29 05:42:26 +00:00
Maxime Coste
8fedbbf07b ShellManager::eval now takes an additional env_var map 2012-05-29 05:19:27 +00:00
Maxime Coste
e57ddd3bab Factorize some duplicated completer code in register_commands 2012-05-29 03:34:54 +00:00
Maxime Coste
30d9e10ac6 DisplayBuffer optimization, suppressed some paranoid checks 2012-05-29 00:33:55 +00:00
Maxime Coste
6fa40796e7 Fix Window::scroll_to_keep_cursor_visible_ifn 2012-05-29 00:14:05 +00:00
Maxime Coste
7451423ce3 global.kak: the 'tag' command uses 'menu -auto-single' 2012-05-28 23:52:26 +00:00
Maxime Coste
1257d432b4 the 'menu' commands now takes an optional -auto-single option
-auto-single tell the 'menu' command not to prompt when there
is only a single choice, and to automatically execute it's
command.
2012-05-28 23:50:11 +00:00
Maxime Coste
d96427b831 Add a delbuf (db) command which delete an existing buffer 2012-05-28 22:51:12 +00:00
Maxime Coste
393b9b24e2 Unify command parameter parsing with a ParametersParser class 2012-05-25 05:07:37 +00:00
Maxime Coste
05442857e6 add rc/global.kak file which provides the tag command using GNU GLOBAL 2012-05-18 05:23:02 +00:00
Maxime Coste
5f2471c147 add an initial menu command, which presents several choices to users
usage is "menu 'label1' 'command1' 'label2' 'command2' ..."
2012-05-18 05:20:46 +00:00
Maxime Coste
56efb42962 add a selection environement variable to access the last selection content 2012-05-07 06:56:53 +00:00
Maxime Coste
ff86d9781d move commands to commands.{cc,hh} 2012-05-07 03:13:34 +00:00
Maxime Coste
dd7228b098 fix DisplayBuffer::atom_containing when where is before first atom 2012-05-04 06:39:03 +00:00
Maxime Coste
ebe945f344 update README 2012-05-04 04:34:48 +00:00
Maxime Coste
55516af9d7 remove {add,rm}grouphl, go back to a -group arg in {add,rm}hl
more consistency, more shared code
2012-05-04 04:25:09 +00:00
Maxime Coste
7158aa00b7 use ShellManager in do_pipe 2012-05-03 07:33:13 +00:00
Maxime Coste
0c596a9d64 Add a ShellManager which handles executing shell commands
ShellManager provides shell commands with environement variable
to retrieve some internal values in the shell parameters.
2012-05-03 07:25:13 +00:00
Maxime Coste
2a291e6868 add an eval command which send it's arguments to the command evaluator 2012-05-03 07:24:27 +00:00
Maxime Coste
b8fe942dbb Implement our own String class in preparation to encoding support. 2012-04-14 01:23:20 +00:00
Maxime Coste
9337938403 replace std::string references with String 2012-04-14 01:17:09 +00:00
Maxime Coste
af5c528f04 use std::upper_bound in DisplayBuffer::atom_containing to run in O(log n) 2012-04-05 02:00:34 +00:00
Maxime Coste
e4b872abd2 remove ModificationListener and use a list of iterators to update instead
This permits to fix a bug in BufferIterator::upgrade, replaced by
BufferIterator::on_insert and BufferIterator::on_erase. ModificationListener
was only used to updating iterators anyway.
2012-04-04 13:56:19 +00:00
Maxime Coste
6cedff8fb2 fix some corner cases in Buffer modification 2012-04-04 12:25:42 +00:00
Maxime Coste
46c65fea10 Option name completion support 2012-04-03 18:25:27 +00:00
Maxime Coste
1d106fd31e add set{g,global,b,buffer,w,window} command to allow changing options 2012-04-03 14:04:02 +00:00
Maxime Coste
873c853f7c gdb: do not catch throw, but break when constructing an assert_failed exception 2012-04-03 13:42:20 +00:00
Maxime Coste
f3dd65fbf1 add an OptionManager class and use it to manage tabstops
OptionManager map names to options, and may delegate option resolution
to it's parent if it does not contains the asked for option. That way
Buffers can override global options, and Windows can override Buffer
options.
2012-04-03 13:39:20 +00:00
Maxime Coste
c8447658c0 fix tab insertion 2012-04-03 13:38:01 +00:00
Maxime Coste
30bc1bad8f WindowHighlighterFactory class which passes the Window to the higlighter function 2012-04-03 13:22:07 +00:00
Maxime Coste
d1cc86d95d fix error message in HighlighterGroup 2012-04-03 13:08:13 +00:00
Maxime Coste
9444c84b1c rename HooksManager to HookManager 2012-04-03 12:01:01 +00:00
Maxime Coste
2cd318e50d fix BufferIterator::update when removing an end of line 2012-04-01 15:40:25 +00:00
Maxime Coste
7f425c4467 add an editor unit test 2012-04-01 15:39:53 +00:00
Maxime Coste
07e1fcf67b specialize BufferIterator::operator-- 2012-03-31 15:21:14 +00:00
Maxime Coste
f63320b19e update TODO 2012-03-30 12:54:14 +00:00
Maxime Coste
45e362d213 specialize BufferIterator::operator++ to speed up Kakoune 2012-03-30 12:01:18 +00:00
Maxime Coste
2e7cd2233c add a Line::length method 2012-03-30 12:00:40 +00:00
Maxime Coste
0ba7c7286d Store buffer content in a list of lines
Instead of a big std::string, buffer now store it's content in a
list of lines. In order to achieve O(log(n)) random access, lines
contains both their content and their offset since the start of
the file, making binary search usable.

BufferIterator now have a LineAndColumn coordinate into the buffer
instead of an offset so that access is still O(1).
2012-03-30 11:37:18 +00:00