summaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)Author
2015-12-26vis: refactor Lua integrationMarc André Tanner
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é Tanner
2015-11-28vis: do not switch to normal mode when leaving ? and / promptMarc André Tanner
2015-11-28view: remove ViewEvent infrastructureMarc André Tanner
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é Tanner
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é Tanner
2015-11-27vis: implement filter operator !Marc André Tanner
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é Tanner
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é Tanner
2015-11-08Update year numbers in Copyright clauseMarc André Tanner
2015-11-08Remove trailing white space from source filesMarc André Tanner
2015-11-08ui: load syntax theme based on the number of supported colorsMarc André Tanner
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é Tanner
For now the vis table has only one member "lexers".
2015-11-08vis: try to support all lua versions >= 5.1Marc André Tanner
Make lpeg module table explicitly global, which should work with the different module loading semantics.
2015-11-08vis: factor out syntax highlighting codeMarc André Tanner
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é Tanner
2015-11-08vis: experimental support for lua/lpeg based syntax highlightingMarc André Tanner
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é Tanner
2015-11-08vis: more comments and cleanupsMarc André Tanner
2015-11-07vis: prefix enum VisMotion values with VIS_Marc André Tanner
2015-11-07vis: tweak enum VisTextObject namesMarc André Tanner
2015-11-07vis: prefix enum VisOperator values with VIS_Marc André Tanner
2015-11-07vis: API documentation and cleanupMarc André Tanner
2015-11-07vis: introduce vis_cancel APIMarc André Tanner
2015-11-07vis: move modes into separate fileMarc André Tanner
2015-11-07vis: move operators to separate fileMarc André Tanner
2015-11-07vis: move motions to separate fileMarc André Tanner
2015-11-07vis: move :-commands into their own fileMarc André Tanner
2015-11-06vis: fix cursor position after charwise pasteMarc André Tanner
p and P should leave the cursor on the last inserted character to ease repetition. Closes #92
2015-11-06vis: do something reasonable upon visual repeatMarc André Tanner
We do currently deliberately not support visual repeat. However when there exist multiple cursors, repeating an operator, which acted on a previous visual selection, should not collapse the cursors.
2015-11-06vis: fix operators to correctly handle multiple selectionsMarc André Tanner
Operators must not switch modes, they might be called multiple times (once for every cursor/selection). Closes #91. The concrete problem was that op_change for the first cursor switched to insert mode, which cleared all the remaining selections. Hence the other cursors had nothing to operate on. Reverts parts of d395687b.
2015-11-03vis: add vis_keys_inject to place keys into the input queueMarc André Tanner
This function can only be used from within key handlers. The position argument has to point to a valid key from within the same input buffer after which the new input will be inserted.
2015-11-02vis: free input_queue at exitVirgile Andreani
2015-11-02vis: let keys entered via API affect macro recordingMarc André Tanner
2015-11-02vis: make append (a and A) commands repeatableMarc André Tanner
2015-11-02vis: improve count handling for dot commandMarc André Tanner
2015-11-02vis: improve dot commandMarc André Tanner
Use an implicit macro to make changes in insert/replace mode repeatable.
2015-10-27vis: make Vis an opaque type, hide implementaton detailsMarc André Tanner
2015-10-27vis: introduce vis_macro_recording APIMarc André Tanner
2015-10-27vis: introduce vis_prompt_enter APIMarc André Tanner
This is a really bad API/abtraction but at least it allows us to hide some implementation details.
2015-10-27vis: clean up tab/newline insertion codeMarc André Tanner
2015-10-27vis: introduce pseudo operators for putMarc André Tanner
In principle put is not really an operator, however it still should be repeatable and respect count.
2015-10-26vis: introduce explicit operators for cursor creationMarc André Tanner
2015-10-26vis: introduce explicit operators for case changesMarc André Tanner
2015-10-26vis: move key handling functions to main.cMarc André Tanner
2015-10-26vis: merge editor.c into vis.cMarc André Tanner
2015-10-25vis: introduce vis_key_next APIMarc André Tanner
2015-10-25vis: introduce vis_register_{get,set} APIMarc André Tanner
2015-10-25vis: introduce vis_count_{get,set} APIMarc André Tanner
2015-10-25vis: introduce vis_motion_type APIMarc André Tanner