aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-03-04test: updateMarc André Tanner1-5/+5
2017-03-04vis: process command line options when reading from stdinMarc André Tanner1-6/+7
Previously the following had no effect: $ echo foo | vis +"set syntax markdown" - Fix #512
2017-03-03travis: fix luarocks invocationMarc André Tanner1-1/+2
It can only install one package at a time.
2017-03-03build: add luacheck make targetMarc André Tanner2-1/+9
2017-03-03travis: try to run busted based test on macOSMarc André Tanner2-6/+6
2017-03-03vis-lua: add vis:exit functionMarc André Tanner2-0/+24
2017-03-02lua: fix luacheck warnings in pluginsMarc André Tanner1-3/+0
2017-03-02vis-lua: fix bogus URL in LDoc commentMarc André Tanner1-1/+1
2017-03-02vis: remove :bdelete commandMarc André Tanner3-24/+0
It does not really fit into the style of the rest of the command language. Eventually we should be able to express this kind of thing using a looping construct based on the `X` and `Y` commands.
2017-03-02lua: use goto label to mimic continue statementMarc André Tanner1-41/+36
This is a Lua 5.2 feature supported by LuaJIT.
2017-03-02lua: let number increment/decrement handle next numberMarc André Tanner1-37/+47
Operate on the next number to the right of the cursor, for now the matches are not restricted to the current line. Based on a patch from Denis Warsow. Close #509
2017-03-01vis-lua: fix invalid LDoc tagMarc André Tanner1-1/+1
2017-03-01lua: return nil for invalid text objectsMarc André Tanner1-2/+2
2017-03-01vis-lua: make cursor.pos return nil if cursor position is invalidMarc André Tanner2-8/+15
It remains to be seen whether that is a good idea, but at least it will reveal possible bugs.
2017-03-01vis-lua: document cursor behaviorMarc André Tanner1-0/+50
2017-02-28view: fix display when inserting text at start of fileMarc André Tanner1-2/+9
Before cebb24b36ac45cc7c6912481cacd29ef9d5c68b9 a mark at the start of the file was treated specially to always return position zero. Since this was no longer the case the following would insert text before the visible area: <PageDown><PageUp><PageUp>ifoo
2017-02-28vis: improve cursor positioning after shift operatorsMarc André Tanner1-11/+17
There are still issues with left shifts starting from characterwise visual mode when the selection boundaries are deleted. For now this is considered a pilot error. Fix #508
2017-02-28lua: reimplement number increment <C-a> and decrement <C-x>Marc André Tanner2-0/+55
Based on a patch by Denis Warsow. Stuff which could probably be improved: - in vim the cursor does not need to be on top of the number, it suffices to be on the same line. - decrementing beyond zero does not work for hexadecimal and octal numbers, vim seems to wrap around in this case. 0x00000000 <C-x> becomes 0xffffffff Close #506
2017-02-28lua: move digraph handling to separate 'plugin'Marc André Tanner3-24/+27
Load a standard plugins directly from vis-std.lua.
2017-02-28vis-lua: correctly treat return value of input event handlerMarc André Tanner1-1/+1
Returning true from the event handler, indicating that the keys were consumed, should now prevent insertion as mentioned in the documentation. vis.events.subscribe(vis.events.INPUT, function(key) if key == ' ' then -- do something fancy here return true end end)
2017-02-28vis-lua: fix wrong return value when setting vis.countMarc André Tanner1-1/+1
2017-02-28Merge branch 'master' of https://github.com/arames/visMarc André Tanner1-0/+5
2017-02-27vis-lua: make vis:win assignableAlexandre Rames1-0/+5
2017-02-27Honor user's umask when saving filesMichael Forney1-2/+2
If the user wants new files to be created as 600, they will have set their umask to 077 in their environment. vis shouldn't restrict this further than the user has configured.
2017-02-27Remove unnecessary umask change in text_save_begin_inplaceMichael Forney1-2/+0
POSIX says that The mkstemp() function shall use the resulting pathname to create the file, and obtain a file descriptor for it, as if by a call to: open(pathname, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR) So this umask change didn't do anything in practice, unless the original umask was more restrictive than 0177.
2017-02-27Fix a couple typosMichael Forney1-1/+1
2017-02-27vis: allow useage of file dialog for :read commandMarc André Tanner2-13/+18
Fix #505
2017-02-27view: reposition cursor after restoring selectionMarc André Tanner1-0/+1
This should fix selection changes after shift operators in visual mode. The problem was that the NOP motion which is executed when switching back into visual-line mode destroys the selection if the cursor is not already placed on a selection boundary. Fix #501
2017-02-25test: updateMarc André Tanner1-11/+5
2017-02-25lexers: sync with scintillua changeset 594 rev 6e29a8d2a783Marc André Tanner26-60/+71
Stuff which was left out / our local changes include: - lexer.lua: different loading mechanism and style handling - ansi_c.lua: for now we keep the separate token definitions with references to the respective standards. This should highlight file names after #include directives. It will also treat simple, non-nested occurrences of #if 0 ... #endif as a comment. - pkgbuild.lua: the arch specific fields have been kept - all scintilla $(style variables) have been replaced
2017-02-25build: try to enable compiler flags to minimize binary sizeMarc André Tanner1-3/+3
2017-02-25vis: tweak handling of end inclusivenessMarc André Tanner1-2/+3
Only extend end of range when the motion did so too. As an example this prevents motions like `$dg_` from deleting the newline which was the starting position.
2017-02-25vis: mark 0, ^, g_ and $ as idempotentMarc André Tanner1-1/+4
2017-02-25vis: fix $ motion for lines containing \rMarc André Tanner1-2/+2
2017-02-25text: add iterator accessor function which translates \r\n to \nMarc André Tanner2-0/+14
2017-02-25vis: make ^ and g_ only skip blank (spaces+tabs) charactersMarc André Tanner1-2/+3
2017-02-25vis: add vis- prefix to pseudo editor keysMarc André Tanner2-166/+166
2017-02-24vis: remove unused struct memberMarc André Tanner2-5/+3
The macro replay code has since been refactored, making this obsolete. There is only ever one input queue from which keys are interpreted.
2017-02-24vis: make help texts optional to produce a smaller binaryMarc André Tanner9-275/+311
$ ./configure --disable-help shrinks the binary by about 20K on a x86_64 system.
2017-02-24vis: fix ^ motion for blank lines terminated by \r\nMarc André Tanner1-1/+1
2017-02-24vis: fix display after newline insertion at the start of viewportMarc André Tanner1-2/+8
Previously the window content would not be scrolled down when inserting a newline exactly at the start of the display area as in the case when a file starts with an empty line and the following is performed: <PageDown><PageUp><PageUp>o
2017-02-23vis: improve handling of \r\n line endingsMarc André Tanner1-6/+21
Change the text_iterator_char_{prev,next} functions to treat them as a single character, meaning cursor motions will skip both bytes at the same time.
2017-02-23view: make sure viewport remains valid when scrolling upMarc André Tanner1-1/+1
In a file with windows style \r\n line endings scrolling up would wrap around to the end of the file.
2017-02-23vis: unify error path of command registration functionsMarc André Tanner1-6/+10
2017-02-23test: updateMarc André Tanner1-5/+11
2017-02-23build: skip configure check for built-in lpeg if lua is not foundMarc André Tanner1-1/+1
$ ./configure --disable-lua will no longer look for liblpeg.
2017-02-23vis: remove `gf` and `<C-w>gf` functionalityMarc André Tanner2-38/+0
This can also be implemented using Lua, if desired.
2017-02-23text-object: remove text_object_numberMarc André Tanner2-25/+0
This was only used by the number increment/decrement action. The same functionality (and more) can be implemented in lua using something like: vis:textobject_new("in", function(win, pos) return win.file:match_at(vis.lexers.integer + vis.lexers.float, pos, 64) end, "Number text object")
2017-02-23vis: remove number increment/decrement functionalityMarc André Tanner2-61/+0
By now we should have the necessary Lua API to implement this as an extension.
2017-02-23vis-lua: use shorter type namesMarc André Tanner2-11/+11