Commit Graph

181 Commits

Author SHA1 Message Date
Maxime Coste
fffa405bfd DisplayBuffer: overload atom_containing with a version taking an iterator to search start 2011-10-23 20:26:30 +00:00
Maxime Coste
ad6ee464f4 style tweak 2011-10-19 18:54:20 +00:00
Maxime Coste
712577b88e CommandManager: fix completion of empty tokens 2011-10-19 18:50:28 +00:00
Maxime Coste
d7f934b7ca Buffer: iterator_at prevents getting iterators on end of line 2011-10-19 14:25:13 +00:00
Maxime Coste
7e2f7f6715 IncrementalInserter: fix OpenLineBelow 2011-10-18 14:13:19 +00:00
Maxime Coste
32e01947fa DisplayBuffer: store atoms in a std::list instead of a vector 2011-10-18 13:59:32 +00:00
Maxime Coste
6fd7f97fa7 Window: fix status_line cursor position 2011-10-18 13:49:10 +00:00
Maxime Coste
c7876f0ba3 DisplayBuffer: remove some check_invariant, overhead is too noticeable 2011-10-18 00:56:18 +00:00
Maxime Coste
8cab34d57f Buffer: add support for modification listeners 2011-10-18 00:55:45 +00:00
Maxime Coste
d48a2bd325 BufferIterator: move methods implementation to buffer_iterator.inl.h 2011-10-17 22:05:06 +00:00
Maxime Coste
1c6eef08f1 utils: add contains function 2011-10-17 21:05:22 +00:00
Maxime Coste
316e84f119 Filters: add a show line numbers filter 2011-10-17 19:01:36 +00:00
Maxime Coste
2badb9d708 DisplayAtom: add splittable methode 2011-10-17 19:01:04 +00:00
Maxime Coste
79ee27dae7 DisplayBuffer: deinline insert method and add atom_containing method 2011-10-17 19:00:38 +00:00
Maxime Coste
88e31d8cce DisplayBuffer: allow empty atoms, with begin == end 2011-10-17 18:59:35 +00:00
Maxime Coste
53ce1e016a Buffer: move struct Modification out of class, as BufferModification 2011-10-17 14:12:15 +00:00
Maxime Coste
dc74934e59 DisplayBuffer: refactoring, correct support of replacements
DisplayAtoms now know where they are on the screen and have
line_and_column_at and iterator_at methods.
2011-10-15 04:45:49 +00:00
Maxime Coste
187a99aba2 LineAndColumn: add comparison operators 2011-10-15 04:42:28 +00:00
Maxime Coste
26459abf8a WindowCoord: rename to DisplayCoord and move with DisplayBuffer 2011-10-14 14:29:53 +00:00
Maxime Coste
c5be69a9a9 BufferCoord: allow explicit construction from all LineAndColumns 2011-10-14 14:27:43 +00:00
Maxime Coste
2d54a7818e Window: privatize coordinates conversion methods 2011-10-12 18:54:48 +00:00
Maxime Coste
80e7bac622 Selectors: remove unused move_select 2011-10-12 18:54:04 +00:00
Maxime Coste
be043ffe1e Window: move_cursor_to takes a BufferIterator parameter 2011-10-12 18:53:38 +00:00
Maxime Coste
22bd9f90d5 Filters: add an expand_tabulation filter 2011-10-12 18:52:22 +00:00
Maxime Coste
f802a9f3be Debug: add key integral value in the debug buffer on keystroke 2011-10-10 22:47:19 +00:00
Maxime Coste
219709e472 Completions: move code from main.cc to completion.hh 2011-10-10 22:38:58 +00:00
Maxime Coste
fe0e1c79f0 Window: scroll when inserting, appending, erasing if necessary 2011-10-10 14:28:39 +00:00
Maxime Coste
7e84ca9ae9 gl and gh now go to first or last character of the line
append mode is supported through G key
2011-10-10 14:24:17 +00:00
Maxime Coste
003c5d4e3d remove useless line 2011-10-08 13:23:18 +00:00
Maxime Coste
afd1ae5458 Filters: tweak colorize_cplusplus 2011-10-07 14:28:38 +00:00
Maxime Coste
868a2f8107 ncurses: fix color support 2011-10-07 14:28:13 +00:00
Maxime Coste
10106e8c8e DisplayBuffer: do not store content in atom, begin and end are sufficient 2011-10-07 14:19:58 +00:00
Maxime Coste
a19f4f059d Debug: add a write_debug function
write_debug writes in a Scratch buffer named '*debug*', so that debug
messages are accessibles from within kakoune
2011-10-07 14:16:38 +00:00
Maxime Coste
9db4aa9691 Buffer: add a type property 2011-10-07 14:15:55 +00:00
Maxime Coste
12535e1099 Window: get rid of select_mode 2011-10-07 14:03:25 +00:00
Maxime Coste
ca99a51bca clear selections after a change 2011-10-06 21:13:33 +00:00
Maxime Coste
1e224dc586 whitespace fix 2011-10-06 21:13:16 +00:00
Maxime Coste
571e4772b4 IncrementalInserter: support OpenLineBelow and OpenLineAbove mode 2011-10-06 21:12:55 +00:00
Maxime Coste
cf9f8c93ec Filters: tweak colorize_cplusplus 2011-10-06 21:12:16 +00:00
Maxime Coste
f9be716776 quit: do not quit if modified buffer exists, add q! command 2011-10-05 18:43:47 +00:00
Maxime Coste
cf162ae617 draw_window: add a space for eol, so that selected eol are visible 2011-10-05 14:28:20 +00:00
Maxime Coste
ff730380ed Window: empty_selections -> clear_selections
clear_selections also reset select_mode to Normal,
most editing operations now do a clear_selections.
2011-10-05 14:24:52 +00:00
Maxime Coste
4ce349fa02 Buffer: modification tracking 2011-10-05 14:21:24 +00:00
Maxime Coste
f4743e08bd Filters: tweaks colorize_cplusplus 2011-10-04 19:08:34 +00:00
Maxime Coste
c8cf7bbaa9 Window: add a basic status line 2011-10-04 18:49:41 +00:00
Maxime Coste
4f771b084a escape-key force return to normal mode 2011-10-03 18:41:05 +00:00
Maxime Coste
945426f47a File: fix write_buffer_to_file 2011-10-03 18:40:12 +00:00
Maxime Coste
6a0b570e50 Filters: add a colorize_cplusplus filter and use it by default in Window 2011-10-03 14:30:14 +00:00
Maxime Coste
d99bcd7f2e bind T and F as select_to_reverse non-inclusive and inclusive 2011-10-03 14:29:44 +00:00
Maxime Coste
01ac17ed04 Filters: add a colorize_regex filter 2011-09-30 19:16:23 +00:00
Maxime Coste
36c3bb6ae3 ncurses: quick'n'dirty color support 2011-09-30 19:15:14 +00:00
Maxime Coste
e351acd997 Window: fix blink_void 2011-09-29 14:23:46 +00:00
Maxime Coste
834e2d2fe3 DisplayBuffer: check_invariant method to assert atoms consistency 2011-09-29 09:10:27 +00:00
Maxime Coste
e659ea2dab DisplayBuffer: add a split method to split an atom 2011-09-29 08:55:08 +00:00
Maxime Coste
822fc0f822 Window: add a test filter to make 'void' blink 2011-09-29 08:37:27 +00:00
Maxime Coste
ba2800ddac Window: refactor DisplayBuffer generation 2011-09-28 20:54:11 +00:00
Maxime Coste
7746c78ccc BufferIterator: add operator>{,=} 2011-09-28 20:53:29 +00:00
Maxime Coste
a30b7c1e9f Window: fix scrolling when select_mode == Append 2011-09-28 19:21:49 +00:00
Maxime Coste
e619a81375 IncrementalInserter: Append, Insert or Change mode specified at construction 2011-09-28 19:14:39 +00:00
Maxime Coste
43fb64a913 Window: selection behaviour now depends on a window state
more vi-like behaviour, hit the v key to toggle append selection mode,
this means much more keys become available for mapping, as caps are now
longer reserved to append mode.
2011-09-28 14:23:43 +00:00
Maxime Coste
309b722df9 Window: cursors are now implicit, taken from current selections
Window hence guarantees that there is always at least one selection.
2011-09-27 18:45:22 +00:00
Maxime Coste
610acb3c0e Selectors: add a count argument to select_to 2011-09-27 14:27:48 +00:00
Maxime Coste
01018a5eac Handle paste before and paster after with p and P 2011-09-27 14:15:20 +00:00
Maxime Coste
924a85d14f erase, change: yank current selection before erasing 2011-09-26 08:59:32 +00:00
Maxime Coste
6ff06ca985 DisplayBuffer: cleanup 2011-09-25 23:51:12 +00:00
Maxime Coste
639897517a Word selectors: better handling of line breaks 2011-09-25 23:50:13 +00:00
Maxime Coste
dc54e7f09c % key selects whole buffer 2011-09-24 13:45:25 +00:00
Maxime Coste
0cad8ed34b gh and gl to move to first/last character of line 2011-09-24 13:08:04 +00:00
Maxime Coste
d4933daba0 BufferIterator: fix operator= 2011-09-24 13:06:35 +00:00
Maxime Coste
53c9021857 Search: save last search to '/' register and bind n to repeat last search 2011-09-24 12:48:58 +00:00
Maxime Coste
1f0b06a855 Window: undo group cleanup and fix of append method 2011-09-24 12:39:40 +00:00
Maxime Coste
9b865cea39 Basic support for yanking and pasting 2011-09-23 14:31:57 +00:00
Maxime Coste
838ceb5958 Window: add selection_content method
it returns the content of the last selection, or the character under the
cursor if there are no selections.
2011-09-23 14:31:15 +00:00
Maxime Coste
8f70192875 CommandManager: now a singleton 2011-09-23 14:29:42 +00:00
Maxime Coste
c2cbd69c1a main: using namespace std::placeholders 2011-09-23 14:27:34 +00:00
Maxime Coste
26537d7028 Utils: Singleton template and migration of the BufferManager
Singletons are not autocreating, the application needs to create
exactly one instance (I want to avoid implicit initialization order
hell)
2011-09-23 14:26:53 +00:00
Maxime Coste
52ad372adb Selectors: support inclusive mode in select_to (bound to f key) 2011-09-23 14:06:10 +00:00
Maxime Coste
662ba0c904 Selection: do not use [begin, end) semantics but [first, last]
selections are now defined with inclusive iterators, which means that
Selection(cursor, cursor) is a valid selection of the charateter pointed
by cursor.

On the user interface side, that means that the cursor is now part of
the selection, selectors were adapted to this behavior (and word
selectors are now much more intuitive)
2011-09-23 09:17:19 +00:00
Maxime Coste
5ca901644f Completion: add complete_buffername completer 2011-09-22 18:55:45 +00:00
Maxime Coste
429536d0f4 BufferManager: allow iteration on Buffers with begin/end methods 2011-09-22 18:55:23 +00:00
Maxime Coste
c3faeb6c05 Selectors: add select_to which selects until a given character on current line 2011-09-22 14:35:28 +00:00
Maxime Coste
0f4f201b6d Selectors: fix select_matching 2011-09-22 14:18:26 +00:00
Maxime Coste
03c199420e basic g (go) command, gg/gt goes to first line, gb goes to last 2011-09-22 14:02:07 +00:00
Maxime Coste
a8cac32fe0 Selectors: more vi-like words movements 2011-09-22 14:00:31 +00:00
Maxime Coste
5a46ad49ea Window: add move_cursor_to method 2011-09-22 14:00:04 +00:00
Maxime Coste
3012f69c4d Selection: fix canonicalize 2011-09-22 13:59:07 +00:00
Maxime Coste
948443a077 Buffer: add line_count method 2011-09-22 13:58:35 +00:00
Maxime Coste
2efa120612 o key to open a line after the current one 2011-09-22 09:24:16 +00:00
Maxime Coste
cff69b2556 Selectors: add a basic select_matching selector for <([{]])> pairs 2011-09-21 19:09:49 +00:00
Maxime Coste
3af66276f0 Move selectors function to their own file 2011-09-21 14:37:09 +00:00
Maxime Coste
3c06846aa3 RegexSelector: wrap on top if needed 2011-09-20 12:00:06 +00:00
Maxime Coste
13d14d4ff5 Insert: refactoring using IncrementalInserter 2011-09-19 22:00:29 +00:00
Maxime Coste
9da8fbe630 Window: add a IncrementalInserter class for insert mode 2011-09-19 21:56:29 +00:00
Maxime Coste
2f093d78b5 LineAndColumn: fix operator[+-]= 2011-09-19 21:55:58 +00:00
Maxime Coste
8a4a3e447b Window: fix erase 2011-09-18 20:09:25 +00:00
Maxime Coste
85e2a31b31 Window: code cleanup and more intelligent Selection class 2011-09-17 14:57:35 +00:00
Maxime Coste
0513b4de29 Shift-{H,J,K,L} keys move cursor while selecting. 2011-09-17 14:28:23 +00:00
Maxime Coste
34c9b0d30f LineAndColumn: move to it's own header and add operator[+-]=?
LineAndColumn is now a template so that WindowCoords and BufferCoords
cannot be added together.
2011-09-17 14:13:33 +00:00
Maxime Coste
49fce28dec select_to_next_word{,_end}: words are [a-zA-Z0-9] 2011-09-16 09:20:36 +00:00
Maxime Coste
3afbbefd9b Configure filename completer for edit and write commands 2011-09-16 09:20:01 +00:00