visrc.lua (766B)
1 require('vis') 2 3 vis.events.subscribe(vis.events.INIT, function() 4 -- Your global configuration options 5 end) 6 7 vis.events.subscribe(vis.events.WIN_OPEN, function(win) 8 -- Your per window configuration options e.g. 9 vis:command('set number') 10 vis:command('set colorcolumn 80') 11 --vis:command('set relativenumbers') 12 --vis:command('set expandtab') 13 vis:command('set tabwidth 4') 14 vis:command('set escdelay 0') 15 vis:command('set show-eof off') 16 vis:command('set theme my-theme') 17 vis:command('set autoindent on') 18 end) 19 20 -- Strip trailing spaces 21 vis:command_register("sts", function(argv, force, win, selection, range) 22 local lines = win.file.lines 23 for index=1, #lines do 24 lines[index] = lines[index]:gsub("%s+$", "") 25 end 26 return true 27 end, "Strip line trailing spaces")