aboutsummaryrefslogtreecommitdiff
path: root/main.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-30vis: implement selection rotationMarc André Tanner1-0/+79
In visual mode + and - will rotate the selection count times to the right or left respectively. If there exists a line containing multiple selections then the rotation happens within each line. Otherwise if each line contains at most one selection the rotation is performed among all existing selections.
2016-03-28vis: Ctrl-{j,k} do not create duplicate cursors, instead advance primary oneMarc André Tanner1-1/+8
2016-03-28vis: support right alignment of selections in visual mode with <S-Tab>Marc André Tanner1-8/+25
2016-03-28vis: support count for {Meta-Ctrl,Ctrl}-{j,k}Marc André Tanner1-23/+26
Create count new cursors on the lines above/below.
2016-03-28vis: fix changing of primary cursor via Ctrl-{u,d}Marc André Tanner1-1/+1
2016-03-28vis: let Meta-Ctrl-{j,k} create new cursorMarc André Tanner1-1/+28
on the line above/below the first/last existing cursor.
2016-03-28vis: align selections with <Tab> in visual modeMarc André Tanner1-2/+5
2016-03-28vis: support column based alignmentMarc André Tanner1-22/+27
That is when multiple cursors are on the same line, the first cursor on every line is aligned, then the second one and so on.
2016-03-28view: change cursor creation API to take an initial positionMarc André Tanner1-11/+11
2016-03-15vis: add support for command register ":Marc André Tanner1-0/+2
2016-03-12vis: overhaul search related code, support "/ registerMarc André Tanner1-0/+2
2016-03-11vis: respect count for <C-d> and <C-u>Marc André Tanner1-10/+13
2016-03-10view: add query function for multiple cursorsMarc André Tanner1-5/+4
2016-03-10vis: let <C-u> and <C-d> in visual mode move to prev/next cursorMarc André Tanner1-0/+36
We do currently not enforce a strict ordering among cursors. Hence these key bindings can move you to an arbitray position. In practice it somewhat works because most of the time cursors are created in "top-down" i.e from the start of the file towards the end.
2016-03-10view: clean up API functions related to primary cursor handlingMarc André Tanner1-5/+5
The currently visible display port is always adjusted in a way that the primary cursor is visible.
2016-02-25vis: use standard registers for macro recordingsMarc André Tanner1-32/+23
Also support upper case register to append to an existing macro.
2016-02-23Make f, F, t, T motion work when replaying a macroMarc André Tanner1-6/+9
2016-02-22remove unused function cmd()Christian Hesse1-7/+0
2016-02-18vis: fix possible undefined zero allocationMarc André Tanner1-1/+1
2016-02-18vis: add insfrastructure to support global key mappingsMarc André Tanner1-0/+3
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-15Add text object to cover lines with same indentation levelMarc André Tanner1-0/+6
By default it is mapped to i<Tab> and a<Tab> however there is currently no difference between the inner and regular version.
2016-02-13vis: in insert mode <S-Tab> aligns all cursors by inserting spacesMarc André Tanner1-0/+42
2016-02-13Convert call sites of text_line_char_{get,set} to text_line_width_{get,set}Marc André Tanner1-1/+1
2016-02-12vis: fix printf format string used in number_increment_decrementMarc André Tanner1-2/+2
The field width specifier '*' expects an int. be fine here since we are expecting a small positive number and the result is
2016-02-12Mark some tables as constMarc André Tanner1-2/+2
This allows them to be placed into the read only ELF section.
2016-02-11vis: implement gn and gN text objectsMarc André Tanner1-0/+12
The behaviour when no match is found is not yet optimal.
2016-02-10vis: implement yank register "0Marc André Tanner1-0/+2
2016-02-10vis: implement gf and <C-w>gf to open filename under cursorMarc André Tanner1-0/+55
Based on a patch by Silvan Jegen.
2016-02-07vis: implement number increment <C-a> and decrement <C-x> functionalityMarc André Tanner1-0/+59
The default key bindings are not changed for now, because <C-a> conflicts with multiple cursor alignment.
2016-01-30Implement "A - "Z registersMarc André Tanner1-0/+2
2016-01-30Implement system clipboard registers "* and "+Marc André Tanner1-0/+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/+2
2016-01-30Cleanup register implementationMarc André Tanner1-3/+3
2016-01-28vis: implement nn%Marc André Tanner1-5/+15
Moves to the given percentage of the file in bytes (not lines). This is useful when dealing with huge files because it is a constant time operation. Performance could still be improved by adapting the display code not to rely on line numbers at all.
2016-01-28vis: clean up count handlingMarc André Tanner1-7/+8
There are cases where zero can also be a legitimate count.
2016-01-27vis: apply insert register <C-r> to all cursorsMarc André Tanner1-5/+2
Note that cursors currently have only one default register.
2016-01-20vis: make <End> in insert/replace mode move to the end of lineMarc André Tanner1-0/+6
The behaviour of <End> vs $ in various modes may still be inconsistent, but at least it can now be configured via key bindings.
2016-01-19vis: fix default command prompt in visual modeMarc André Tanner1-1/+1
2016-01-19vis: improve selection restore `gv`Marc André Tanner1-2/+8
2016-01-18vis: simplify code by using text_bytes_alloc0Marc André Tanner1-4/+1
2016-01-16vis: make o and O work in promptMarc André Tanner1-2/+2
2016-01-13Implement command/search prompt history as a regular fileMarc André Tanner1-37/+7
2016-01-13vis: cleanup key binding definitionsMarc André Tanner1-18/+6
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-06vis: apply <C-v> to all cursors not only primary oneMarc André Tanner1-5/+2
2016-01-06vis: enhance <C-v> to recognize a few special keysMarc André Tanner1-28/+58
Up until now <C-v> in insert/replace mode would only recognize numeric codes in various formats. This commits adds support for a few special keys such as <Enter> or <Tab>.
2015-12-26vis: refactor Lua integrationMarc André Tanner1-1/+12
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-1/+1
2015-11-28vis: add namespace prefix for MARK_SELECTION_{START,END}Marc André Tanner1-2/+2
2015-11-28vis: improve switching to prompt modeMarc André Tanner1-2/+0
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: implement = operator in terms of fmt(1)Marc André Tanner1-0/+6