aboutsummaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-11vis: add support for different kind of text objectsMarc André Tanner1-3/+10
Up until now text objects would only ever grow/expand if applied multiple times. The new SPLIT type allows text objects which cover a completely different range when applied with a count.
2016-02-10vis: simplify modes implementationMarc André Tanner1-0/+2
Make replace mode a child of insert mode and visual line a child of visual mode. This means any key binding for the former is automatically available in the latter. Also keys can not be unmapped solely from the child modes.
2016-02-07vis: export vis_window_closableMarc André Tanner1-0/+10
2016-01-30Implement "A - "Z registersMarc André Tanner1-1/+8
2016-01-30Implement system clipboard registers "* and "+Marc André Tanner1-1/+2
Both registers are currently treated identically. The actual system integration is performed by two shell scripts vis-copy and vis-paste.
2016-01-30Implement blackhole register "_Marc André Tanner1-0/+1
2016-01-30Cleanup register implementationMarc André Tanner1-2/+3
2016-01-30Improve Lua error reportingMarc André Tanner1-2/+5
Display Lua errors in a dedicated window/file. A typo or missing dependency (e.g. lpeg) in visrc.lua will no longer silently fail without any indication. The Lua integration in view.h is not yet converted.
2016-01-28vis: factor out common code to create internal fileMarc André Tanner1-6/+11
2016-01-28vis: clean up count handlingMarc André Tanner1-9/+15
There are cases where zero can also be a legitimate count.
2016-01-20vis: further improve selection restore codeMarc André Tanner1-0/+6
This is still not 100% correct for all possible cases, but should work for those currently used by vis e.g. the shift left operator.
2016-01-19vis: improve selection restore `gv`Marc André Tanner1-0/+11
2016-01-14vis: use different default register when editing a prompt fileMarc André Tanner1-3/+3
2016-01-14vis: move prompt handling to separate fileMarc André Tanner1-175/+3
2016-01-14vis: more cleanupsMarc André Tanner1-4/+0
2016-01-14vis: s/moves/vis_motions/gMarc André Tanner1-1/+1
2016-01-14vis: s/ops/vis_operators/gMarc André Tanner1-6/+6
2016-01-14vis: move motion releated functions to corresponding fileMarc André Tanner1-90/+0
2016-01-14vis: s/VIS_MODE_LAST/VIS_MODE_INVALID/gMarc André Tanner1-1/+1
2016-01-14vis: move vis_operator(..) to corresponding fileMarc André Tanner1-63/+0
2016-01-14vis: move text object definitions to separate fileMarc André Tanner1-37/+1
2016-01-14vis: inline expand_tabMarc André Tanner1-11/+0
2016-01-14vis: focus correct window when closing promptMarc André Tanner1-21/+29
2016-01-13Implement command/search prompt history as a regular fileMarc André Tanner1-65/+176
2016-01-13ui: make statusbar configurableMarc André Tanner1-1/+1
2016-01-13vis: add infrastructure to support per window key bindingsMarc André Tanner1-10/+22
2016-01-13vis: cleanup key binding definitionsMarc André Tanner1-2/+2
This removes the tree based mode structures and instead merges all keybindings in flat modes which uses some more memory but will allow (per mode) run-time configurable key bindings. Make sure to update/remove config.h.
2016-01-13vis: fix tab expansion if enabledMarc André Tanner1-2/+17
Closes #144
2015-12-26vis: refactor Lua integrationMarc André Tanner1-103/+15
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-12-20vis: fix forceful redraw <C-l>Marc André Tanner1-0/+4
2015-11-28vis: do not switch to normal mode when leaving ? and / promptMarc André Tanner1-1/+1
2015-11-28view: remove ViewEvent infrastructureMarc André Tanner1-14/+2
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-28vis: improve switching to prompt modeMarc André Tanner1-5/+5
A call to vis_prompt_show will now automatically switch to prompt mode. Within the prompt leave/enter handlers the focused window (vis->win) will still point to the document window not the one referring to the prompt. The selection marks '< and '> are now only updated when a visual mode is left.
2015-11-28vis: add cmd argument to VIS_OP_FILTERMarc André Tanner1-5/+19
2015-11-27vis: implement filter operator !Marc André Tanner1-5/+17
It currently works by switching to visual mode and then opening the command prompt with a default range which refers to the currently active selection.
2015-11-27vis: change semantics of operator implementation return valueMarc André Tanner1-3/+3
The return value of operator implementations denoting the new cursor position is interpreted in the following way: - EPOS dispose the cursor - [0, text_size] place the cursor accordingly - otherwise i.e. > text_size keep the cursor position unchanged The newly introduced last case is useful for operators which are called from visual mode, but do not want to change the current selection.
2015-11-23vis: improve replacement of combining charactersMarc André Tanner1-6/+1
2015-11-08Update year numbers in Copyright clauseMarc André Tanner1-1/+1
2015-11-08Remove trailing white space from source filesMarc André Tanner1-4/+4
2015-11-08ui: load syntax theme based on the number of supported colorsMarc André Tanner1-1/+0
The theme to use can be overriden via the $VIS_THEME environment variable. $ VIS_THEME=solarized vis
2015-11-08vis: introduce vis namespace for lua objectsMarc André Tanner1-2/+6
For now the vis table has only one member "lexers".
2015-11-08vis: try to support all lua versions >= 5.1Marc André Tanner1-1/+1
Make lpeg module table explicitly global, which should work with the different module loading semantics.
2015-11-08vis: factor out syntax highlighting codeMarc André Tanner1-0/+3
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: implement :set themeMarc André Tanner1-3/+25
2015-11-08vis: experimental support for lua/lpeg based syntax highlightingMarc André Tanner1-3/+81
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-49/+1
2015-11-08vis: more comments and cleanupsMarc André Tanner1-19/+13
2015-11-07vis: prefix enum VisMotion values with VIS_Marc André Tanner1-30/+30
2015-11-07vis: tweak enum VisTextObject namesMarc André Tanner1-26/+26
2015-11-07vis: prefix enum VisOperator values with VIS_Marc André Tanner1-19/+19