summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-06vis: implement al and il text objectsMarc André Tanner
2015-08-06vis: implement gp and gP add count support to put operationsMarc André Tanner
2015-08-02Add short demo screencast to READMEMarc André Tanner
2015-08-02vis: use file open dialog also for :editMarc André Tanner
2015-08-02Update READMEMarc André Tanner
2015-08-02vis: use I and A instead of CTRL-O for new cursors in visual modeMarc André Tanner
I and A creates a new cursor at start/end of every selected line.
2015-08-02text-motion: make text_bracket_match more robustMarc André Tanner
Brackets which occur inside strings are ignored.
2015-08-02vis: add text objects `af` and `if`Marc André Tanner
They try to match C-like function definitions. The inner variant only contains the function body.
2015-08-02vis: add motions [[, [], ][, ]]Marc André Tanner
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-01text-motion: fix text_find_{next,prev}Marc André Tanner
It is after all a stupid O(n*m) algorithm, hence restart after a failed partial match. Code like this would benefit from a proper test suite ...
2015-08-01vis: support `ae` and `ie` text objectsMarc André Tanner
2015-08-01view: hide API to free main cursorMarc André Tanner
2015-07-31vis: cleanup handling of charwise/linewise motionsMarc André Tanner
Also text objects in visual mode should now work better.
2015-07-28vis: fix one more coverity scan warningMarc André Tanner
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é Tanner
2015-07-28vis: fix join operatorMarc André Tanner
Only skip last line break if range comes from linewise visual mode.
2015-07-28vis: pass cursor to operator implementationsMarc André Tanner
2015-07-28text-util: introduce text_range_equalMarc André Tanner
2015-07-28text-object: introduce utility function text_range_is_linewiseMarc André Tanner
2015-07-28vis: use multiple cursor/selection infrastructureMarc André Tanner
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é Tanner
2015-07-28vis: try to align cursors on the same column with CTRL-AMarc André Tanner
2015-07-28text-motion: introduce text_line_char_{get,set}Marc André Tanner
2015-07-28vis: CTRL+J and CTRL+K creates a new cursor on the line below/aboveMarc André Tanner
2015-07-28vis: ESC in normal mode clears all cursorsMarc André Tanner
2015-07-28vis: add per cursor registersMarc André Tanner
2015-07-28vis: add an operator to create new cursorsMarc André Tanner
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-motion: add functions to iterate over lines of a rangeMarc André Tanner
2015-07-28text-util: add text_range_containsMarc André Tanner
2015-07-28text: move utility functions to separate fileMarc André Tanner
2015-07-28ui: try to fixup unicode display issuesMarc André Tanner
The handling of combining characters needs to be reviewed there are still strange things going on. This only covers up some of the artifacts.
2015-07-26view: use a mark to keep track of the visible areaMarc André Tanner
This should fix "corruptions" caused by wrong offsets when editing the same file in multiple windows.
2015-07-26view: do not set cursor position after resizeMarc André Tanner
The problem is that a cursor movement might cause a redraw which in turn causes the sidebar width to change thus the view to be resized which will override the cursor position.
2015-07-26view: always fill out complete cell matrixMarc André Tanner
2015-07-26vis: add infrastructure to support multiple cursors/selectionsMarc André Tanner
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.
2015-07-26text-object: add new functions to search for wordsMarc André Tanner
2015-07-25text: handle marks set to 0 and text_size(...)Marc André Tanner
2015-07-25text: add text_range_overlapMarc André Tanner
2015-07-24text-motion: introduce text_line_{up,down}Marc André Tanner
2015-07-23text-object: add text_range_linewiseMarc André Tanner
Takes a range and extends both ends to cover the remaining part of the line.
2015-07-22text: introduce text_range_newMarc André Tanner
2015-07-21ui: further separate curses related user interface codeMarc André Tanner
By now ui-curses.[hc] are the only files dealing directly with curses related functions. Integration of a proper mainloop is still pending.
2015-07-20vis: improve insertion of verbatim characters via CTRL-V in insert modeMarc André Tanner
Recognized formats are: CTRL-V nnn decimal value nnn CTRL-V onnn or CTRL-V Onnn octal value nnn CTRL-V xnn or CTRL-V Xnn hex value nn CTRL-V unnnn Unicode codepoint nnnn CTRL-V Unnnnnnnn Unicode codepoint nnnnnnnn Leading zeros can be omitted, any illegal character for the given format will be ignored and terminates the numerical code.
2015-07-19vis: handle file truncation more gracefullyMarc André Tanner
If we use the file / virtual memory system as cache (using mmap(2)) and another process truncates the file we are editing, we have a problem. All we can do is catch the resulting SIGBUS, close the corresponding window and print a warning message. To test this use: $ dd if=/dev/zero of=TEST bs=8M count=1 $ vis TEST :! echo TRUNCATE > TEST
2015-07-19text: move regex related functions to separate fileMarc André Tanner
Eventually this should probably be rewritten to use an iternal regex engine, currently it has unacceptable memory usage, it copies the whole text.
2015-07-19text: slight cleanup, add a few commentsMarc André Tanner
2015-07-11vis: rename struct member to avoid conflict with standard libraryMarc André Tanner
Closes #60
2015-07-10vis: add a file open dialogMarc André Tanner
For this to work make sure you have vis-open and slmenu or dmenu somewhere in $PATH. For now the file dialog is shown for :open, :split and :vsplit when the argument is either . (a dot) or looks like a file pattern. For example :open *.[ch] will show a listing of all C source and header files in the current directory. Use a fuzzy search to make your choice.
2015-07-10vis: fix detection of file changes outside the editorMarc André Tanner
2015-07-10text: upon successfull file save store new modification timeMarc André Tanner