aboutsummaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)AuthorFilesLines
2015-06-30Perform character prev/next movements based on Text not ViewMarc André Tanner1-2/+2
While it is slower, it allows to move to characters which are currently not visible. This will be handy when experimenting with multiple cursors.
2015-06-30Cleanup insert/replace mode input handlingMarc André Tanner1-17/+5
View should only display the file content, but not modify it.
2015-06-28Do not take address of variables which go out of scopeMarc André Tanner1-4/+4
This is a bit of a hack, since now the callers range is modified. The various cmd_* functions should probably take a const Filerange pointer as argument and modify a local Filerange variable if needed.
2015-06-28Mark intentional case statement fall throughMarc André Tanner1-3/+3
2015-06-27Make :earlier and :later accept arguments similar to vimMarc André Tanner1-19/+50
Currently the following arguments are accepted: {count} Go to older text state {count} times. {N}s Go to older text state about {N} seconds before. {N}m Go to older text state about {N} minutes before. {N}h Go to older text state about {N} hours before. {N}d Go to older text state about {N} days before
2015-06-27Hook up :-commands & keybindings for earlier/laterRyan Chipman1-0/+41
2015-05-17Implement :substitute by invoking sed as a filterMarc André Tanner1-2/+5
2015-05-17Implement :r and :r! in terms of filter commandsMarc André Tanner1-25/+20
2015-05-17Filter command :!Marc André Tanner1-0/+216
If no range is given then stdin is passed through which allows interactive usage as in :!ls -1 *.c | slmenu For this to work the command needs to use stderr for its user interface and write any data for vis to stdout.
2015-05-16Let each :-command decide what to do if no range is specifiedMarc André Tanner1-1/+2
2015-05-16Improve parsing of :-command name and parametersSilvan Jegen1-8/+16
2015-05-14In command mode make the '.' range specifier match the current lineMarc André Tanner1-1/+5
2015-05-07Add '--' as end of optionsMatias Linares1-1/+5
Now it works properly, `vis -- -v` edit a file named `-v`. Also added the proper info to the man page.
2015-05-06Use the command name without the Filerange in argvSilvan Jegen1-1/+1
Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
2015-04-29Move redrawing out of operator implementationsMarc André Tanner1-13/+15
Note that currently all windows are redrawn, this could be further optimized to only redraw the affected windows.
2015-04-29Make operators return new cursor positionMarc André Tanner1-36/+41
2015-04-22Cleanup line ending type detection and insertionMarc André Tanner1-2/+11
2015-04-22Fix echo foo | vis -Marc André Tanner1-6/+8
A single '-' indicates read from stdin. Also adjust coding style.
2015-04-22for editor command compare string, not just first characterChristian Hesse1-1/+1
Signed-off-by: Christian Hesse <mail@eworm.de>
2015-04-22make vis print version with command option -vChristian Hesse1-3/+6
The man page states this is possible, so add the code. Signed-off-by: Christian Hesse <mail@eworm.de>
2015-04-22Rename window.[ch] to view.[ch]Marc André Tanner1-1/+1
2015-04-22Yet more renames (EditorWin -> Win)Marc André Tanner1-6/+6
2015-04-22More renames, no functional changesMarc André Tanner1-82/+82
Win -> View, window_* -> view_*
2015-04-22More renaming vis->win->view instead of vis->win->winMarc André Tanner1-47/+47
2015-04-22Better variable naming (VisText -> File)Marc André Tanner1-50/+50
Therefore vis->win->text->data becomes vis->win->file->text.
2015-04-21Make '.' respect countMarc André Tanner1-0/+3
2015-04-21Mark some movements as idempotentMarc André Tanner1-3/+3
2015-04-21Make 'n', 'N', '*', '#' respect countMarc André Tanner1-25/+21
2015-04-21Handle failure of a movement gracefullyMarc André Tanner1-0/+1
This for example fixes movements to unset marks.
2015-04-21Cleanup implementation of movements to marksMarc André Tanner1-8/+10
2015-04-21Further clean up to/till movementsMarc André Tanner1-22/+16
This makes them respect count i.e. something like 3f{char} should work.
2015-04-21Cleanup implmentation of line and column movementsMarc André Tanner1-9/+8
2015-04-21Implement ';' and ','Marc André Tanner1-0/+32
This fixes #45
2015-04-21Clean up to/till movementsMarc André Tanner1-7/+27
2015-04-11Eliminate global running variableMarc André Tanner1-5/+4
2015-04-11Remove global mode stateMarc André Tanner1-30/+28
Once again show mode in window status bar.
2015-04-11Move structs to editor.h remove global action{,_prev}Marc André Tanner1-163/+52
2015-04-11Further ui separation, eliminate global stateMarc André Tanner1-20/+0
2015-04-11Eliminate global state for repetition of last modificationMarc André Tanner1-10/+10
2015-04-11Eliminate global state for :set optionsMarc André Tanner1-7/+5
2015-04-11Lazy initialization of :-commandsMarc André Tanner1-19/+15
2015-04-10Make ":set syntax" without any argument display the currently active oneMarc André Tanner1-2/+12
2015-04-05Remove useless duplication of argument to exec_cmdline_commandMarc André Tanner1-6/+2
2015-04-05Introduce new struct VisTextMarc André Tanner1-55/+54
This adds yet another layer of indirection and stores vi related stuff which is associated with a given text but shared among all windows displaying it (e.g. marks). This will also help if one wants to keep texts arround which aren't currently displayed.
2015-04-04Cleanup :set implementationMarc André Tanner1-27/+33
Unique prefixes of options should now be recognized.
2015-04-04Move more curses related stuff to ui-curses.cMarc André Tanner1-7/+0
2015-04-04Change behaviour of 'cw' and 'cW'Matias Linares1-0/+8
from vim's help: cw cW Special case: When the cursor is in a word, "cw" and "cW" do not include the white space after a word, they only change up to the end of the word. This is because Vim interprets "cw" as change-word, and a word does not include the following white space.
2015-04-04Mark some pointers in struct Action as constMarc André Tanner1-3/+3
2015-04-03Add option to display relative line numbersMarc André Tanner1-0/+6
:set rnu Based on a patch by Sebastian Götte.
2015-04-03Preliminary user interface separationMarc André Tanner1-63/+26
In theory only ui-curses.[hc] should depend on curses, however in practice keyboard input is still handled in vis.c. Furthermore the syntax definitions as well as keyboard bindings and selection code in window.c still depends on some curses constants. There is also a slight regression in that the window status bar does not show the current mode name. This and related global state should be eliminated in the future.