aboutsummaryrefslogtreecommitdiff
path: root/vis-lua.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-22vis: move syntax highlighting to pure Lua codeMarc André Tanner1-2/+32
2016-05-22vis-lua: add window.viewport rangeMarc André Tanner1-0/+7
2016-05-22vis-lua: add bindings for new view style functionsMarc André Tanner1-0/+44
2016-05-22vis-lua: cleanup vis.MODE_* constants handlingMarc André Tanner1-30/+19
2016-05-18vis-lua: fail more silently when visrc.lua can not be loadedMarc André Tanner1-1/+2
This prevents opening a separate window to display a full stack trace and improves usage of a vis binary compiled with lua support on a system without the necessary *.lua files.
2016-05-14vis-lua: add win:map function for window local key mappingsMarc André Tanner1-8/+27
Based on a patch by Josh Wainwright. Close #306
2016-05-13vis: clean up key mapping implementationMarc André Tanner1-15/+1
2016-05-13vis-lua: add more restrictive checks for position argumentsMarc André Tanner1-11/+17
Negative and fractional arguments are rejected.
2016-05-04vis-lua: add new theme_change event hookMarc André Tanner1-17/+9
2016-05-04vis-lua: simplify event callback codeMarc André Tanner1-20/+16
2016-05-04Fixed bug, use $XDG_CONFIG_HOME correctlyAdrian Room1-1/+2
Vis should look for files in `$XDG_CONFIG_HOME/vis`, not just `$XDG_CONFIG_HOME` directly.
2016-05-01vis-lua: let vis:map override existing mappingsMarc André Tanner1-0/+14
It now also unmaps all previously mapped prefixes of the new mapping. See 0ef138085f885d4576a8e53d079e1f00f80799bf and #271.
2016-05-01vis-lua: expose vis:feedkeys APIMarc André Tanner1-0/+10
2016-04-27vis-lua: fix vis.win to always return currently focused windowMarc André Tanner1-1/+1
2016-04-26vis-lua: add file.modified propertyMarc André Tanner1-0/+5
2016-04-23vis: display lua search paths in :help outputMarc André Tanner1-1/+12
2016-04-21vis-lua: allow selection modification by assigning to cursor.selectionMarc André Tanner1-0/+9
2016-04-21vis-lua: implement vis:message(msg)Marc André Tanner1-6/+16
2016-04-21vis-lua: also accept a range as argument for file:delete and file:contentMarc André Tanner1-7/+23
2016-04-21vis-lua: add vis:command_register to map a Lua function to a :-commandMarc André Tanner1-0/+35
The following registers `:foo` as a command which prints a few things to stdout: vis:command_register("foo", function(argv, force, win, cursor, range) for i,arg in ipairs(argv) do print(i..": "..arg) end print("was command forced with ! "..(force and "yes" or "no")) print(win.file.name) print(cursor.pos) print(range ~= nil and ('['..range.start..', '..range.finish..']') or "invalid range") return true; end)
2016-04-21vis-lua: add utility function to push a Filerange onto the Lua stackMarc André Tanner1-11/+15
2016-04-20vis-lua: load files from directory specified with ./configure --sharedir=DIRMarc André Tanner1-4/+6
Close #231
2016-04-20vis-lua: trigger start event after ui has been initializedMarc André Tanner1-1/+8
2016-04-18vis-lua: strip relative paths from package.{path,cpath}Marc André Tanner1-0/+41
Allthough the default paths should take precedence we do not want to execute arbitrary code from the current working directory.
2016-04-18vis-lua: cleanup lua package.path handlingMarc André Tanner1-43/+29
2016-04-16vis-lua: add vis.mode propertyMarc André Tanner1-0/+5
2016-04-16vis-lua: add cursor.selection propertyMarc André Tanner1-0/+16
2016-04-16vis-lua: add window.cursors[] arrayMarc André Tanner1-0/+38
2016-04-16vis-lua: add window.cursors_iterator functionMarc André Tanner1-0/+24
2016-04-16vis-lua: add cursor.number propertyMarc André Tanner1-0/+5
2016-04-15vis-lua: change cursor object implementationMarc André Tanner1-20/+13
2016-04-15vis-lua: add file.size to return file size in bytesMarc André Tanner1-0/+5
2016-04-15vis-lua: add file.newlines to detect type of new linesMarc André Tanner1-0/+16
2016-03-21vis: also lookup Lua support files relative to the binary locationMarc André Tanner1-0/+17
This simplifies deployment of vis on remote systems without root access. The idea is to extract a statically linked binary together with the lexer syntax files into some directory, adjust $PATH to include it and have everything just work. For now this uses /proc/self/exe and thus only works on Linux based systems.
2016-03-12vis-lua: allow to set window.syntax = nilMarc André Tanner1-1/+3
This will load the default lua color theme.
2016-02-18vis-lua: add file:content(pos, len) functionMarc André Tanner1-0/+19
2016-02-18vis-lua: expose vis:textobject_registerMarc André Tanner1-0/+24
2016-02-18vis-lua: expose vis:textobject(id)Marc André Tanner1-0/+8
2016-02-18vis-lua: add vis:motion_register functionMarc André Tanner1-0/+24
It registers a lua function which will be called whenever the motion is used.
2016-02-18vis-lua: expose vis_motion to luaMarc André Tanner1-0/+9
2016-02-18vis-lua: expose mode constants to luaMarc André Tanner1-0/+30
2016-02-18vis-lua: expose win.syntaxMarc André Tanner1-0/+17
2016-02-18vis-lua: expose cursor:to(line, col)Marc André Tanner1-2/+21
2016-02-18vis-lua: promote vis to a real objectMarc André Tanner1-16/+67
That is from now on use vis:method instead of vis.method
2016-02-18vis: add possibility to bind keys to lua functionsMarc André Tanner1-0/+85
2016-01-30Improve Lua error reportingMarc André Tanner1-7/+29
Display Lua errors in a dedicated window/file. A typo or missing dependency (e.g. lpeg) in visrc.lua will no longer silently fail without any indication. The Lua integration in view.h is not yet converted.
2015-12-31vis-lua: implement vis.events.{start,quit} eventsMarc André Tanner1-2/+11
2015-12-31vis-lua: implement window.cursor.{line, col, pos}Marc André Tanner1-0/+57
These are currently read-only properties.
2015-12-31vis-lua: implement vis.lines[..] arrayMarc André Tanner1-14/+90
This allows access to specific lines of a file, array indicies/line numbers are 1 based. Read access is supported for [1, #lines] while assigning to the 0 element will insert a new line at the beginning of the file. Similarly assigning to lines[#lines+1] will add a new line at the end of the file. The returned lines will not contain any line termination characters.
2015-12-31vis-lua: implement vis.open(filename)Marc André Tanner1-0/+12