Skip to content

Instantly share code, notes, and snippets.

@jeebak
jeebak / visrc.lua
Last active September 27, 2021 06:36
Example $HOME/.config/vis/visrc.lua for the vis editor, with a simple "Plug()" (plugin manager) implementation
-- load standard vis module, providing parts of the Lua API
require('vis')
function FilterRange(file, range, pos, filter)
-- Based on: http://martanne.github.io/vis/doc/#Vis:operator_new
local status, out, err = vis:pipe(file, range, filter)
if not status then
vis:info(err)
else
file:delete(range)