aboutsummaryrefslogtreecommitdiff
path: root/view.h
AgeCommit message (Collapse)AuthorFilesLines
2016-01-13view: introduce view_selection_getMarc André Tanner1-0/+2
It returns the range covered by the selection of the primary cursor.
2016-01-13Add -pedantic to debug CFLAGS and fix resulting warningsMarc André Tanner1-1/+5
2015-12-26vis: refactor Lua integrationMarc André Tanner1-1/+1
Lua support can now be disabled at compile time using: $ make CONFIG_LUA=0 This commit also adds an initial Lua API and provides a few default hooks. We now also require Lua >= 5.2 due to the uservalue constructs. In principle the same functionality could be implemented using function environments from Lua 5.1.
2015-11-28view: remove ViewEvent infrastructureMarc André Tanner1-6/+1
The only used event handler was used to update the '< and '> marks which is now taken care of by the leave handler of the visual modes.
2015-11-28view: remove special treatment of tabs in cell matrixMarc André Tanner1-1/+0
2015-11-27vis: improve cursor alignment command <C-a>Marc André Tanner1-0/+4
2015-11-23view: fix cell placement of combining charactersMarc André Tanner1-2/+3
They now belong to the cell holding the corresponding regular (i.e. non-combining) character. This also means that at least in theory a cell could hold arbitrary amounts of data, in practice it is limited to 16 bytes.
2015-11-08Remove trailing white space from source filesMarc André Tanner1-1/+1
2015-11-08Delete now obsolete syntax.hMarc André Tanner1-1/+0
2015-11-08vis: implement :set colorcolumnMarc André Tanner1-0/+2
2015-11-08vis: factor out syntax highlighting codeMarc André Tanner1-0/+1
The view_draw function renders the text into the cells array and resyncs the cursor position. The syntax highlighting is applied in view_update, which also instructs the ui to update.
2015-11-08vis: experimental support for lua/lpeg based syntax highlightingMarc André Tanner1-1/+2
The lua based lexers are searched in the following order: $VIS_PATH/lexers $HOME/.vis/lexers /usr/share/vis/lexers followed by the standard lua package.path
2015-11-08vis: remove regex based syntax highlightingMarc André Tanner1-2/+2
2015-10-14view: cleanup whitespace replacement symbol handlingMarc André Tanner1-2/+0
2015-10-14view: cleanup option handlingMarc André Tanner1-0/+3
2015-08-06vis: implement gv to restore last selectionMarc André Tanner1-0/+2
2015-08-01view: hide API to free main cursorMarc André Tanner1-2/+0
2015-07-31vis: cleanup handling of charwise/linewise motionsMarc André Tanner1-0/+2
Also text objects in visual mode should now work better.
2015-07-28vis: use multiple cursor/selection infrastructureMarc André Tanner1-1/+4
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: ESC in normal mode clears all cursorsMarc André Tanner1-0/+2
2015-07-28vis: add per cursor registersMarc André Tanner1-0/+3
2015-07-26view: always fill out complete cell matrixMarc André Tanner1-0/+1
2015-07-26vis: add infrastructure to support multiple cursors/selectionsMarc André Tanner1-35/+69
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-21ui: further separate curses related user interface codeMarc André Tanner1-1/+2
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-03Add :show command to display special symbols for whitespacesMarc André Tanner1-0/+2
Enable/disable by setting to 0/1 respectively: :set show spaces=0 tabs=0 newlines=1
2015-06-30Perform character prev/next movements based on Text not ViewMarc André Tanner1-2/+0
While it is slower, it allows to move to characters which are currently not visible. This will be handy when experimenting with multiple cursors.
2015-06-30Cleanup insert/replace mode input handlingMarc André Tanner1-6/+12
View should only display the file content, but not modify it.
2015-04-23Update header include guard to match file nameMarc André Tanner1-2/+2
2015-04-22Rename window.[ch] to view.[ch]Marc André Tanner1-0/+115