aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-11-18Fix date format string in man pagesMichael Forney1-3/+3
%m is the decimal month value, not the day of the month.
2016-11-18Fix date command in man page installationMichael Forney1-3/+3
With a single $, make will try to expand it as a variable.
2016-11-17Add code coverage badge to the READMEMarc André Tanner1-0/+1
2016-11-17test: updateMarc André Tanner1-5/+7
2016-11-17build: cache external source tarballs on Travis CIMarc André Tanner1-0/+7
2016-11-17build: add automated code coverage via Travis CI and codecov.ioMarc André Tanner2-11/+31
2016-11-17bulid: run individual tests directly from .travis.ymlMarc André Tanner1-1/+5
2016-11-16ui: work around libtermkey bug when stdin is /dev/nullMarc André Tanner1-20/+36
Libtermkey tries to write a terminal initialization sequence even when stdin is not a terminal as is the case when running `vis < /dev/null` or within the Travis CI environment. The broken code is in libtermkey's driver-ti.c function `start_driver`: /* There's no point trying to write() to a pipe */ if(fstat(tk->fd, &statbuf) == -1) return 0; if(S_ISFIFO(statbuf.st_mode)) return 1; Instead they should simply be using isatty(3). As a workaround we catch the resulting EBADF failure and try to re-open /dev/tty as stdin. If this fails too (as is the case in the Mac OS X Travis CI runner) create an abstract termkey instance instead. In this state vis will not be able to consume any input and will instead spin with 100% CPU usage in the mainloop. This is solely done to make the Lua tests, which control vis through other means, work within the Travis CI environment.
2016-11-16build: add automated Mac OS X builds via Travis CIMarc André Tanner1-3/+37
2016-11-16vis: treat vis_keys_feed input like a macro replayMarc André Tanner2-1/+9
We need to push keys individually to the input queue such that the state machine can advance and record keys into the operator macro if necessary. Previously feeding the following input: isome text<Escape>. would not work as expected because the complete key stream was pushed to the input queue at the same time during which the operator macro was not yet active. Thus the dot command at the end would have nothing to repeat.
2016-11-16sam: use default shell command for <, >, | and ! when applicapleMarc André Tanner3-3/+12
If the shell command is omitted, the last shell command (of any type) is substituted. The most recently used shell command is stored in a new register currently named `!`.
2016-11-16sam: support an empty regex as an alias for the most recently used oneMarc André Tanner1-3/+2
As in sam if an empty regex // is provided we substitute in the most recently used one. 0/regexp/// Will match the second occurrence in the fie.
2016-11-15test: updateMarc André Tanner1-5/+5
2016-11-15sam: make `:w` and `:wq` honor their given rangeMarc André Tanner1-17/+27
As in visual mode write commands have to be forced with ! if the changes are destructive i.e. only parts of the file are written.
2016-11-15sam: `e`, `q`, `X`, `Y`, `!` and all vi commands should not take addressesMarc André Tanner1-23/+23
2016-11-15sam: reformat command definition block to avoid overly long namesMarc André Tanner1-50/+131
No functional changes.
2016-11-15Fix documentation regarding Lua paths in README and manual pageMarc André Tanner2-5/+6
Wether `/usr/local/share/vis` or `/usr/share/vis` is used depends on how the configure script was invoked. However, both are never used at the same time. This section should be completely reworked at some point.
2016-11-15vis: defer UI initialization and overhaul argument parsingMarc André Tanner5-91/+98
Do not initalize curses UI before it is actually needed. Move vis command line argument parsing logic into main.c. This fixes `vis -v` output and exit status. Fix #351
2016-11-15vis: overhaul and unify event generation codeMarc André Tanner3-29/+95
Add another layer of indirection, move actual event generation code to a dedicated function.
2016-11-15vis: generalize special stdin handlingMarc André Tanner5-8/+21
In preparation to move argument parsing code out of vis.c.
2016-11-15vis: move initial theme loading code to luaMarc André Tanner4-19/+2
2016-11-14vis-lua: add vis.ui.colors denoting the number of available colorsMarc André Tanner4-0/+34
2016-11-14ui: remove unused functionMarc André Tanner2-11/+0
2016-11-13build: do not clutter source tree with AppVeyor configuration fileMarc André Tanner1-0/+0
2016-11-13test: updateMarc André Tanner1-5/+5
2016-11-11lexers/fstab: add systemd-specific mount optionsChristian Hesse1-0/+9
2016-11-11test: adapt tests to changes in the Lua APIMarc André Tanner1-5/+5
2016-11-11vis: cleanup `:set option` argument parsing logicMarc André Tanner1-15/+5
No longer accept "no" prefix for boolean options. Reject too many option values (use proper quoting to specify values containing spaces).
2016-11-11vis: add `:set shell` optionMarc André Tanner3-0/+21
2016-11-11vis: attempt to use the default shell of the user to execute external commandsMarc André Tanner2-2/+12
We first try $SHELL and then fall back to the shell field of the password file entry (/etc/passwd).
2016-11-11sam: fix range for line zeroMarc André Tanner1-0/+2
:0 < echo "Should be inserted at the start of the file" :1 < echo "Should replace the first line"
2016-11-10vis: fix compilation with Lua support disabledMarc André Tanner1-1/+1
2016-11-10vis: change default status bar indication for Windows style line endingsMarc André Tanner2-4/+4
2016-11-10vis-lua: change misnamed attribute values of `file.newlines`Marc André Tanner5-14/+14
Also rename underlying C code.
2016-11-10vis: split `:set show <option>` into separate optionsMarc André Tanner3-36/+34
It was the only command option which needed `=` to assign a value to. This unifies the argument parsing logic and adds the possibility to specify a per-option help text. You might want to adapt your visrc.lua configuration accordingly.
2016-11-10vis: add help texts for :set option valuesMarc André Tanner1-11/+56
2016-11-10vis: make vis_draw actually draw each windowMarc André Tanner1-0/+2
2016-11-10build: add Makefile target for code coverage via gcovMarc André Tanner2-2/+8
2016-11-09README: Fix instructions for lexers and themesKlemens Nanni1-3/+3
2016-11-09Use nicer IRC badge in READMEMarc André Tanner1-1/+1
2016-11-09vis: handle cancelation of `r` commandMarc André Tanner1-0/+3
Do not alter the text if <Escape> is pressed instead of a regular replacement character.
2016-11-09Add another useless badge to the READMEMarc André Tanner1-1/+2
2016-11-09test: update test suiteMarc André Tanner1-5/+5
Includes the new ssam(1) based tests.
2016-11-09build: add automated Cygwin builds using AppVeyorMarc André Tanner1-0/+43
2016-11-09build: make `vis -v` version output more robustMarc André Tanner1-1/+1
The `git describe` command fails in shallow checked out git repositories which do not include the tag information. At least include the git short hash.
2016-11-09vis: improve `r` in normal and replace modeMarc André Tanner2-4/+21
In normal mode `r<key>` was previously implemented as `R<key><Escape>`. However this does not work when the replacement key is `<Enter>` to insert a new line, because in replace mode new lines are not overwritten. The count is now also respected. Also properly support `r` in visual mode where before it was aliased to `c`. Fix #190
2016-11-09vis: perform undo snapshotting more rarerlyMarc André Tanner2-7/+11
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: add replace operator VIS_OP_REPLACEMarc André Tanner2-0/+23
Delete the given range and insert the same number of replacement characters.
2016-11-09vis: unify VIS_OP_{INSERT,REPLACE} implementationMarc André Tanner6-18/+19
They both perform a motion before changing mode.
2016-11-08sam: fix default value handling of +/- addressesMarc André Tanner1-3/+6
We need to distinguish between an explicit given zero and an omitted value which should default to 1. This should fix the following constructs which rounds up/down an existing selection to whole lines -0,+0 and -0+,+0-