summaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)Author
2016-03-25vis: remove __DATE__ and __TIME__ references to aid with reproducible buildsMarc André Tanner
2016-03-23Remove identically replicated copyright comments from source filesMarc André Tanner
2016-03-15vis: do properly replay ": and "/ registersMarc André Tanner
This makes @: (and @/) work.
2016-03-15vis: slightly cleanup register related codeMarc André Tanner
2016-03-13vis: convert gn and gN text objects to use "/ register contentMarc André Tanner
2016-03-12vis: overhaul search related code, support "/ registerMarc André Tanner
2016-02-25vis: use standard registers for macro recordingsMarc André Tanner
Also support upper case register to append to an existing macro.
2016-02-21Cleanup new line insertion codeMarc André Tanner
2016-02-18Add infrastructure to register custom text object functionsMarc André Tanner
2016-02-18Add infrastructure to add custom motion functionsMarc André Tanner
A motion function can be registered with vis_motion_register(...) the returned id (if non negative) can then be used as an argument to vis_motion(...)
2016-02-18vis: add insfrastructure to support global key mappingsMarc André Tanner
Except for insert/replace mode keys get translated before any key bindings are evaluated. This is useful for non-english/latin keyboard layouts.
2016-02-13Convert call sites of text_line_char_{get,set} to text_line_width_{get,set}Marc André Tanner
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-12Mark some tables as constMarc André Tanner
This allows them to be placed into the read only ELF section.
2016-02-12Improve large file supportMarc André Tanner
Disable absolute line numbers for large files (currently anything bigger than 32MiB). This speeds up moving around with for example nn% since no new lines need to be calculated. Of course movements like :nn will be unaffected. The optimizations can be disabled by explicitly enabling absolute line numbers as in :set number
2016-02-11vis: add support for different kind of text objectsMarc André Tanner
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é 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-02-07vis: export vis_window_closableMarc André Tanner
2016-01-30Implement "A - "Z registersMarc André Tanner
2016-01-30Implement system clipboard registers "* and "+Marc André Tanner
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é Tanner
2016-01-30Cleanup register implementationMarc André Tanner
2016-01-30Improve Lua error reportingMarc André Tanner
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é Tanner
2016-01-28vis: clean up count handlingMarc André Tanner
There are cases where zero can also be a legitimate count.
2016-01-20vis: further improve selection restore codeMarc André Tanner
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é Tanner
2016-01-14vis: use different default register when editing a prompt fileMarc André Tanner
2016-01-14vis: move prompt handling to separate fileMarc André Tanner
2016-01-14vis: more cleanupsMarc André Tanner
2016-01-14vis: s/moves/vis_motions/gMarc André Tanner
2016-01-14vis: s/ops/vis_operators/gMarc André Tanner
2016-01-14vis: move motion releated functions to corresponding fileMarc André Tanner
2016-01-14vis: s/VIS_MODE_LAST/VIS_MODE_INVALID/gMarc André Tanner
2016-01-14vis: move vis_operator(..) to corresponding fileMarc André Tanner
2016-01-14vis: move text object definitions to separate fileMarc André Tanner
2016-01-14vis: inline expand_tabMarc André Tanner
2016-01-14vis: focus correct window when closing promptMarc André Tanner
2016-01-13Implement command/search prompt history as a regular fileMarc André Tanner
2016-01-13ui: make statusbar configurableMarc 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.
2016-01-13vis: fix tab expansion if enabledMarc André Tanner
Closes #144
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.