aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-26vis: do not repeat insertion while showing promptMarc André Tanner1-1/+2
Previously something like `5ifoo<Escape>:<Escape>` would insert foo into the command prompt.
2017-01-26Merge branch 'standalone' of https://github.com/eworm-de/visMarc André Tanner1-1/+2
2017-01-20test: updateMarc André Tanner1-5/+5
2017-01-20vis: slightly cleanup repeat code, always set dot registerMarc André Tanner4-14/+11
2017-01-20vis: improve new line handling at end of fileMarc André Tanner2-7/+30
<Enter> at the end of the file now inserts two newlines, unless there is already one in place. This ensures that in 'normal' operation the file is always new line terminated (as mandated by POSIX). It also means that there is no problem displaying the right amount of ~ symbols at the end of the file. Unlike in vim the cell beyond the end of the file remains adressable even in normal mode. This means something like the following (starting from an empty file) might be a little confusing: o<Escape><Left>dd Because the starting position is beyond the last newline of the file, nothing will be deleted. For now we prefer to avoid the additional complexity, and difference in behavior between normal and insert mode, needed to fix this slight inconsistency. Fix #294
2017-01-20text: fix EOF handling for text_iterator_byte_nextMarc André Tanner1-1/+1
Handle zero length pieces gracefully. At some point we should write a comprehensive set of unit tests for the iterator API.
2017-01-20standalone: work around borked dependencies in attrChristian Hesse1-1/+2
We already did this change for acl (commit cc551cb0). In attr it shows slightly different symptoms and happens for parallel builds only. The fix is the same.
2017-01-19text-regex: add regex backend based on libtreMarc André Tanner6-4/+179
While memory consumption should be improved, backward searches will still be slow, because they are implemented in terms of repeated forward searches. It needs to be investigated whether the underlying automaton can have its transitions reversed and essentially run backwards, as is the case in sam.
2017-01-19lexer: sync with scintillua changeset 582 rev d70a5ee43d38Marc André Tanner106-119/+131
2017-01-19lexer: update READMEMarc André Tanner1-12/+18
2017-01-19build: more standalone build multilib cleanupMarc André Tanner1-1/+1
2017-01-19vis: make <C-n> in visual mode wrap aroundMarc André Tanner1-6/+13
Strictly speaking we actually not wrap around, but search backwards starting from the first cursor. This is seems more useful when for example renaming a local variable but not starting from its declaration. Close #305
2017-01-19build: try to fix standalone build for multilib systemsMarc André Tanner1-2/+2
2017-01-19standalone: work around borked dependencies in aclChristian Hesse1-1/+2
For any reason acl decides do build getfacl and setfacl on `make [...] install-lib install-dev`, which may fail. Make sure to not fail by installing from libacl and include subdirectories.
2017-01-19vis: simplify count handling for insertionMarc André Tanner3-17/+12
2017-01-19sam: use 'm to reference mark mMarc André Tanner1-3/+3
The manual was already mentioning that. Fix #468
2017-01-19vis: remove <C-o> mapping in insert modeMarc André Tanner2-7/+0
This was never really implemented properly and is not really needed anyway. Close #345
2017-01-19lexer: update C lexer to C11 and add POSIX errno constantsMarc André Tanner1-6/+50
The most apparent change is that NULL is now also highlighted, the themes might need to be tweaked a bit. Based on an initial patch by Christian Hesse. Close #307
2017-01-19build: slightly cleanup make standaloneMarc André Tanner1-10/+8
2017-01-18standalone: build with POSIX ACL supportChristian Hesse1-1/+72
2017-01-18test: updateMarc André Tanner1-15/+5
2017-01-18lexer: add lexer for Parallax Spin languageDavid B. Lamkins2-0/+138
Close #466
2017-01-18vis: fix count handling for appendMarc André Tanner2-8/+17
Fix #371
2017-01-18vis: support count for insertion and replacementMarc André Tanner4-4/+22
Fix #372
2017-01-18vis: unify insert/replace mode enter handlerMarc André Tanner1-18/+4
2017-01-18vis: unify insert/replace mode leave handlerMarc André Tanner1-18/+9
2017-01-18vis: support count for macro replayMarc André Tanner1-1/+4
Fix #448
2017-01-18vis: do not take undo snaphots while replaying a macroMarc André Tanner4-8/+29
The vis_keys_feed function is currently unaffected by this change. It still creates individual undo points. While this is probably undesirable from an API point of view, it keeps the lua based tests that use undo points working.
2017-01-16vis: change key input handling modelMarc André Tanner2-19/+30
Previously if you had a mapping for both `a` and `ab` the latter would in effect be unreachable because the greedy search would always match and then execute the former. With the new behavior we keep reading keys until we have a non ambigious sequence. That is after pressing `a` nothing will happen, if the next key is a `b` we will execute the `ab` mapping otherwise we will perform `a` and whatever the action is for the next key. Close #386
2017-01-16map: add map_leaf utility functionMarc André Tanner2-0/+16
Tests whether the given prefix can be extended to exactly one map element i.e. true iff the prefix map contains exactly one element.
2017-01-16vis: allow macro recording/replay in visual modeMarc André Tanner1-0/+2
Fix #461
2017-01-16vis: fix single letter word text objects at start of fileMarc André Tanner1-2/+2
Fix #464
2017-01-16vis: cleanup regex header inclusionMarc André Tanner5-5/+0
2017-01-16man: remove authors section from tool's man pagesChristian Hesse4-16/+0
2017-01-16man: add man page for vis-complete(1)Christian Hesse2-1/+86
Signed-off-by: Christian Hesse <mail@eworm.de>
2017-01-16make: define EXECUTABLES and install in a loopChristian Hesse2-18/+16
Define EXECUTABLES and install in a loop. Also fix uninstalling man pages.
2017-01-16single: include tools vis-{clipboard,complete,menu,open}Christian Hesse2-2/+2
These are called from vis only. So include them in the archive and set PATH to make vis find them.
2017-01-15vis-lua: pass pending keys to lua key handling functionsMarc André Tanner1-8/+69
2017-01-15view: fix check to prevent duplicate cursor creationMarc André Tanner1-1/+4
Previously repeatedly pressing <Ctrl-j> at the start of the file would keep creating cursors.
2017-01-15vis: show error messages for failed :map/:unmap commandsMarc André Tanner1-7/+19
Close #458
2017-01-15vis: do not crash when given insufficient arguments to :mapMarc André Tanner1-1/+1
Fix #459
2017-01-14sam: do not clobber error value when failing to parse a groupMarc André Tanner1-0/+2
When encountering a parsing error within a { } command group do not set the error cause to unmatched brace.
2017-01-14vis-prompt: make it easier to enter multi line commandsMarc André Tanner2-30/+55
<Enter> now searches for lines starting with command delimiters to find the command boundaries. To actually enter a literal new line use <Ctrl-v><Enter> in insert mode or `o` / `O` in normal mode. Also remove the special <Backspace> mapping, does not seem esential use <Escape> to close the prompt window.
2017-01-14view: enforce invariant that cursor is within selectionMarc André Tanner1-5/+6
A cursor does not necessarily have to be at a selection boundary (e.g. in visual line mode) but it has to be within the selection.
2017-01-14vis-lua: allow mode changes by setting vis.modeMarc André Tanner2-2/+16
2017-01-13test: updateMarc André Tanner1-5/+15
2017-01-13sam: remove s (substitute) command use x (extract) and c (change) insteadMarc André Tanner2-14/+3
They are roughly equivalent, instead of s/pattern/replacement/ to replace the first occurrence of pattern you can specify an address to the change command: /pattern/ c/replacement/ the only difference being that the first command is restricted to the current line. -+x/pattern/ c/replacement/ also restrictes matches to the current line, but performs the substitution on the whole line not only the first match. Currently it is not possible to only replace the n-th match as `s2/pattern/replacement/` would do in sam(1). A possible alternative syntax generalizing this concepts and applying it to the `x` and `g` commands will be investigated in the future. Global substitution as in %s/pattern/replacement/g can be performed using x/pattern/ c/replacement/
2017-01-13sam: allow empty text specifiersMarc André Tanner1-2/+5
Before the i, a, c commands would fail when given an empty text //.
2017-01-13sam: allow input text to refer to search registersMarc André Tanner2-6/+65
& refers to the most recent complete match and \1 - \9 refer to the last sub-expression matches.
2017-01-13vis: introduce registers 0-9 and & to capture search matchesMarc André Tanner4-2/+44
These are currently only updated for `x` and `y` sam commands, whether they should be updated for other search related activities (`/`, `?`, `n`, `N`, `*`, `#` etc.) needs to be investigated.