summaryrefslogtreecommitdiff
path: root/vis-modes.c
AgeCommit message (Collapse)Author
2016-11-09vis: perform undo snapshotting more rarerlyMarc André Tanner
Do not take snapshots after every operation in insert/replace mode. As an example up until now we would take a snapshot after every <Backspace>/<Delete> press, hence when undoing changes each character would be restored individually. The same applies for <C-w> and related actions. From now on we only snaphost when: - transitioning from insert/replace mode to normal mode (but not when switching to operator pending mode) - an operation takes place from normal mode - an idle time expires in normal/replace mode
2016-11-09vis: unify VIS_OP_{INSERT,REPLACE} implementationMarc André Tanner
They both perform a motion before changing mode.
2016-08-24vis: add vis_mode_get functionMarc André Tanner
2016-08-24vis: improve dot (repeat) command implmentationMarc André Tanner
Do not override implicit operator macro in command mode. Fix #334
2016-05-22vis: refactor status line handlingMarc André Tanner
Make window status bar content configurable via Lua.
2016-05-13vis: clean up key mapping implementationMarc André Tanner
2016-04-28vis: reject key mappings for which a prefix is already mappedMarc André Tanner
`<` needs a special treatment because it is used to denote symbolic keys without it the shift left operator would not work.
2016-04-06vis: fix vi filter operators ! and =Marc André Tanner
2016-02-20vis: reject obviously recursive key bindingsMarc André Tanner
This does only detect the simplest cases.
2016-02-12vis: respect window local mappings for child modesMarc André Tanner
Since commit 197ab824206335eab7ceed774ddeccac18fafc09 visual line and replace modes are child modes, hence we also have to consider the window local key bindings of their respective parent modes. For example in replace mode the key lookup chain is now as follows: window local replace mode -> global replace mode -> window local insert mode -> global insert mode This fixes <Enter> behaviour in prompt for replace and visual line modes.
2016-02-10vis: simplify modes implementationMarc André Tanner
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-01-27vis: remove unused struct Mode member 'is_user'Marc André Tanner
2016-01-18vis: do not move cursor when entering visual line modeMarc André Tanner
Switching to character wise visual mode is still different than in vim because we do not distinguish between line wise and charwise selections. Close #149
2016-01-14vis: more cleanupsMarc André Tanner
2016-01-14vis: s/ops/vis_operators/gMarc André Tanner
2016-01-13Implement command/search prompt history as a regular fileMarc André Tanner
2016-01-13vis: add infrastructure to support per window key bindingsMarc André Tanner
2016-01-13vis: cleanup key binding definitionsMarc André Tanner
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.
2015-11-28vis: add namespace prefix for MARK_SELECTION_{START,END}Marc André Tanner
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-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-08vis: reindent config.def.h (no functional changes)Marc André Tanner
2015-11-07vis: shadow default register while in prompt modeMarc André Tanner
Editing operation in prompt mode should not affect the default register.
2015-11-07vis: prefix enum VisMotion values with VIS_Marc 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