aboutsummaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)AuthorFilesLines
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.
2015-03-31Do not modify the argument to exec_commandMarc André Tanner1-5/+11
This fixes a segfault when using the ZQ key binding as reported by Silvan Jegen.
2015-03-24Implement 'o' in visual mode: go to other end of selection.Marcel Rodrigues1-0/+16
2015-03-18Cleanup :-command implementationMarc André Tanner1-90/+107
Everything that is a unique prefix should now be allowed for a given command.
2015-02-03Do not lump together replace actionsWolfgang Corcoran-Mathe1-0/+1
Currently, the replace operator in vis gets lumped with following actions in the {un,re}do tree. Using the 'r' key several times then attempting to undo the last replacement undoes the entire series.
2015-01-18Fix coverity issue 12388jvoisin1-1/+2
close(fd) can't have a negative fd parameter
2015-01-16Always close file descriptor after :read commandMarc André Tanner1-2/+1
2015-01-16In vim, "syntax" can be abbreviated as "syn".jvoisin1-1/+1
2015-01-13Cleanup nn| implementationMarc André Tanner1-8/+2
This command does not really do what it advertises because it operates on bytes not columns.
2015-01-13Add new logical linewise movementsMarc André Tanner1-0/+6
The column position is currently not correctly preserved when there are lines with multibyte characters involved spanning multiple screen lines. In general this might still be a bit fragile.
2015-01-13Rename window_line_* functionsMarc André Tanner1-8/+8
2015-01-06Rudimentary change list (accessible via g; and g,)Marc André Tanner1-1/+13
2015-01-06Change :open to create a new window if no argument is givenMarc André Tanner1-6/+2
Use it for the creation of a new window without changing the layout as split and vsplit do. Map it to CTRL+w n.
2015-01-06Add default settings for editor startupMarc André Tanner1-0/+1
2015-01-06Support per file type settingsMarc André Tanner1-10/+49
This adds yet another layer of indirection. exec_cmdline_command should take a const char pointer and not modify its argument.
2015-01-06Fix some compiler warningsMarc André Tanner1-2/+2
2015-01-04no need to allocate len+1 if we're not appending '\0'Matthias Braun1-2/+2
2015-01-04implement rudimentary autoindentMatthias Braun1-4/+28
2015-01-04Support relative line jumps :+nn / :-nnMarc André Tanner1-0/+10
2015-01-04Simplify jump to line :nnnMarc André Tanner1-14/+11
As a side effect this also allows to jump to marks via :'m
2015-01-04Fix openline command on the first lineMichal Bohuslávek1-3/+8
When on the first line, openline command wouldn't move the cursor to the newly created line above the current line.
2015-01-04Make :set option parsing more robustMarc André Tanner1-21/+115
Among other things boolean options can now be prefixed with "no". For example ":set nonu" disables line numbers etc. Based on a patch from Sebastian Götte.
2015-01-03Add the :x(it)? commandMatthias Braun1-0/+11