aboutsummaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-15vis: preserve ui options when splitting windowsMarc André Tanner1-2/+8
Closes #72
2015-10-14vis: introduce special keys which allow mappings to editor actionsMarc André Tanner1-1/+32
Key bindings in vis are always recursive, hence mapping ~ to ~l will cause an infinite loop. Instead vis supports special editor "keys" which map to internal editor functions. As an example one can thus map ~ to <vis-operator-case-swap>l or even <vis-operator-case-swap><cursor-char-next> Furthermore this makes it possible to completely unmap core editor features such as operators, the corresponding funtionality is still available via its corresponding special key.
2015-10-14view: cleanup whitespace replacement symbol handlingMarc André Tanner1-5/+5
2015-10-14view: cleanup option handlingMarc André Tanner1-6/+20
2015-10-14ui: refactor syntax style definitionsMarc André Tanner1-1/+1
Styles can now be specified as strings which will make them easier to specify from outside the editor. The following style attributes can be given in a comma separated list: bold italics underlined fore:color back:color where color is either a hex value of the form #aabbcc or one of the predefined colors: black red green yellow blue magenta cyan white
2015-10-11vis: properly ignore tab at command promptMarc André Tanner1-0/+6
Closes #77
2015-10-05vis: add rudimentary :help commandMarc André Tanner1-0/+35
2015-10-05vis: fix key alias implementationMarc André Tanner1-0/+1
2015-10-05vis: introduce keyboard actionsMarc André Tanner1-47/+9
This adds another level of indirection by defining keyboard actions which will likely eventually be used by a :map command.
2015-10-05vis: add rudimentary support for key aliasesMarc André Tanner1-4/+9
This will eventually be exposed via a :map style command.
2015-10-05vis: cleanup keyboard handling implementationMarc André Tanner1-24/+29
2015-10-05vis: convert mark handling to new input handling codeMarc André Tanner1-12/+37
2015-10-05vis: convert insertion of register from insert modeMarc André Tanner1-4/+7
2015-10-05vis: convert register specification to new input handling codeMarc André Tanner1-2/+10
2015-10-05vis: convert macro recording / replay to new input handling codeMarc André Tanner1-16/+19
2015-10-05vis: convert insert verbatim to new input handling codeMarc André Tanner1-18/+19
2015-10-05vis: convert to/till movements to new input handlingMarc André Tanner1-7/+5
2015-10-05vis: adapt r (replace) to new input handlingMarc André Tanner1-6/+7
2015-10-05vis: change key binding function prototypesMarc André Tanner1-189/+252
The idea is to work more like a finite state machine. Every function gets an additional argument keys which holds the already read keyboard input. The return value of the functions should point to the first not consumed key. A return value of NULL indicates that more input is needed. The function will be called again from the editor core when more input is available. These changes are mostly mechanical and in many cases not optimal, they will be cleaned up in further commits.
2015-10-05vis: rework input handling using libtermkeyMarc André Tanner1-83/+95
Key bindings are now specified as symbolic key strings, this will eventually allow run time configurable key mappings. This introduces a bulid time dependency on libtermkey which can be found at: http://www.leonerd.org.uk/code/libtermkey/
2015-08-09vis: fix :edit! commandMarc André Tanner1-2/+3
It now correctly re-edits the file (i.e reloads it from disk).
2015-08-09vis: fix repeated use of file open dialogMarc André Tanner1-1/+1
2015-08-09vis: cancelling wildcard open causes crashDavid B. Lamkins1-1/+1
Closes #65
2015-08-08text: rename some functions to improve consistencyMarc André Tanner1-4/+4
2015-08-08text: introduce helper function text_delete_rangeMarc André Tanner1-5/+4
2015-08-07vis: limit to/till movements to current lineMarc André Tanner1-2/+2
2015-08-06vis: implement gv to restore last selectionMarc André Tanner1-0/+8
2015-08-06vis: implement al and il text objectsMarc André Tanner1-0/+4
2015-08-06vis: implement gp and gP add count support to put operationsMarc André Tanner1-13/+42
2015-08-02vis: use file open dialog also for :editMarc André Tanner1-1/+1
2015-08-02vis: use I and A instead of CTRL-O for new cursors in visual modeMarc André Tanner1-2/+16
I and A creates a new cursor at start/end of every selected line.
2015-08-02vis: add text objects `af` and `if`Marc André Tanner1-0/+4
They try to match C-like function definitions. The inner variant only contains the function body.
2015-08-02vis: add motions [[, [], ][, ]]Marc André Tanner1-0/+8
They behave not like in vim, but instead try to find the start/end of C-like function definitions. The first character stands for the direction [ for backwards, ] for forwards. The second character denotes the start [ or end ] respectively.
2015-08-01vis: support `ae` and `ie` text objectsMarc André Tanner1-0/+4
2015-08-01view: hide API to free main cursorMarc André Tanner1-1/+1
2015-07-31vis: cleanup handling of charwise/linewise motionsMarc André Tanner1-80/+55
Also text objects in visual mode should now work better.
2015-07-28vis: fix one more coverity scan warningMarc André Tanner1-2/+2
With the current code this will never cause a NULL dereference since it is checked at the call site. However it makes sense to check it anyway.
2015-07-28vis: fix bugs uncovered by coverity scanMarc André Tanner1-2/+4
2015-07-28vis: fix join operatorMarc André Tanner1-6/+9
Only skip last line break if range comes from linewise visual mode.
2015-07-28vis: pass cursor to operator implementationsMarc André Tanner1-0/+1
2015-07-28text-object: introduce utility function text_range_is_linewiseMarc André Tanner1-1/+1
2015-07-28vis: use multiple cursor/selection infrastructureMarc André Tanner1-0/+61
This commits introduces the following keybindings, in normal mode: CTRL-N select word the cursor is currently over, switch to visual mode CTRL-P remove least recently added cursor ESC if a selection is active, clear it. Otherwise dispose all but the primary cursor. In visual mode: CTRL-N create new cursor and select next word matching current selection CTRL-X clear (skip) current selection, but select next matching word CTRL-P remove least recently added cursor
2015-07-28vis: do not move cursor in multicursor mode after undo/redoMarc André Tanner1-2/+6
2015-07-28vis: try to align cursors on the same column with CTRL-AMarc André Tanner1-0/+19
2015-07-28vis: CTRL+J and CTRL+K creates a new cursor on the line below/aboveMarc André Tanner1-0/+15
2015-07-28vis: ESC in normal mode clears all cursorsMarc André Tanner1-3/+12
2015-07-28vis: add per cursor registersMarc André Tanner1-2/+8
2015-07-28vis: add an operator to create new cursorsMarc André Tanner1-0/+15
The operator creates a new cursor at the start of every line covered by the given range. It is currently only available as CTRL+O in visual mode.
2015-07-28text: move utility functions to separate fileMarc André Tanner1-0/+1
2015-07-26vis: add infrastructure to support multiple cursors/selectionsMarc André Tanner1-111/+106
This cleans up the existing selection handling code and adds the necessary bits to eventually support multiple cursors/selections. The cursor position is kept track of using marks, which means retrieving the cursor position is no longer a constant time operation. Furthermore the terminal cursor is no longer used, instead the whole window is redrawn after every cursor movement.