summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-03travis: fix luarocks invocationMarc André Tanner
It can only install one package at a time.
2017-03-03build: add luacheck make targetMarc André Tanner
2017-03-03travis: try to run busted based test on macOSMarc André Tanner
2017-03-03test/lua: add infrastructure for busted based unit testsMarc André Tanner
2017-03-03vis-lua: add vis:exit functionMarc André Tanner
2017-03-02lua: fix luacheck warnings in pluginsMarc André Tanner
2017-03-02vis-lua: fix bogus URL in LDoc commentMarc André Tanner
2017-03-02vis: remove :bdelete commandMarc André Tanner
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é Tanner
This is a Lua 5.2 feature supported by LuaJIT.
2017-03-02lua: let number increment/decrement handle next numberMarc André Tanner
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é Tanner
2017-03-01lua: return nil for invalid text objectsMarc André Tanner
2017-03-01vis-lua: make cursor.pos return nil if cursor position is invalidMarc André Tanner
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é Tanner
2017-03-01test/lua: do not load visrc but only vis.luaMarc André Tanner
Since vis.lua now loads a standard set of plugins, we do not need to include the visrc.lua file which might contain user specific changes.
2017-02-28view: fix display when inserting text at start of fileMarc André Tanner
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é Tanner
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é Tanner
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é Tanner
Load a standard plugins directly from vis-std.lua.
2017-02-28vis-lua: correctly treat return value of input event handlerMarc André Tanner
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é Tanner
2017-02-28Merge branch 'master' of https://github.com/arames/visMarc André Tanner
2017-02-27vis-lua: make vis:win assignableAlexandre Rames
2017-02-27Honor user's umask when saving filesMichael Forney
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 Forney
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 Forney
2017-02-27vis: allow useage of file dialog for :read commandMarc André Tanner
Fix #505
2017-02-27view: reposition cursor after restoring selectionMarc André Tanner
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-26test/vis: added tests for w, W, e, E, ge, gEErlend Fagerheim
2017-02-25test: updateMarc André Tanner
2017-02-25test/vis: update tests for new pseudo key namingMarc André Tanner
2017-02-25test/vis: cleanup motion testsMarc André Tanner
2017-02-25lexers: sync with scintillua changeset 594 rev 6e29a8d2a783Marc André Tanner
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é Tanner
2017-02-25vis: tweak handling of end inclusivenessMarc André Tanner
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é Tanner
2017-02-25vis: fix $ motion for lines containing \rMarc André Tanner
2017-02-25text: add iterator accessor function which translates \r\n to \nMarc André Tanner
2017-02-25vis: make ^ and g_ only skip blank (spaces+tabs) charactersMarc André Tanner
2017-02-25vis: add vis- prefix to pseudo editor keysMarc André Tanner
2017-02-24test/vis: added a few motion testsErlend Fagerheim
2017-02-24vis: remove unused struct memberMarc André Tanner
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é Tanner
$ ./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é Tanner
2017-02-24vis: fix display after newline insertion at the start of viewportMarc André Tanner
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é Tanner
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é Tanner
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é Tanner
2017-02-23test: updateMarc André Tanner
2017-02-23test: fix travis macOS test failuresMarc André Tanner
The vim version installed on the Travis macOS VMs does not seem to correctly handle ; when already on a matching position. Move the affected test to test/vis. Also fix white space related issues in sed invocation.