diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2016-12-08 17:11:57 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2016-12-08 17:16:18 +0100 |
| commit | 82963173a6b07039b084e918f72057312974a3ba (patch) | |
| tree | ca1a2f93a5d66b7ef7012019c0975edcdad38493 /config/vis/visrc.lua | |
| parent | 5adce3bcbd24d2e240a27a07e9ce7e863b126dde (diff) | |
| download | dotfiles-82963173a6b07039b084e918f72057312974a3ba.tar.gz dotfiles-82963173a6b07039b084e918f72057312974a3ba.zip | |
add vis config
Diffstat (limited to 'config/vis/visrc.lua')
| -rw-r--r-- | config/vis/visrc.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/config/vis/visrc.lua b/config/vis/visrc.lua new file mode 100644 index 0000000..e558e58 --- /dev/null +++ b/config/vis/visrc.lua @@ -0,0 +1,29 @@ +-- load standard vis module, providing parts of the Lua API +require('vis') +require('plugins/filetype') +require('plugins/textobject-lexer') +require('plugins/vis-cursors/cursors').cursors_path = string.format('%s/vis/cursors', os.getenv('XDG_DATA_HOME') or os.getenv('HOME').."/.local/share") + +vis.events.subscribe(vis.events.INIT, function() + -- Your global configuration options + --vis:command("set theme ".. (vis.ui.colors <= 16 and "default-16" or "default-256")) + vis:command("set theme default") +end) + +vis.events.subscribe(vis.events.WIN_OPEN, function(win) + vis:command('set number') + vis:command('set tabwidth 4') + vis:command('set autoindent') + vis:command('set colorcolumn 80') + vis:command('set show-tabs') +end) + +--vis.events.subscribe(vis.events.FILE_SAVE_PRE, function(file) + ---- purge trailing whitespace + --local i = 1 + --while i <= #file.lines do + --file.lines[i] = file.lines[i]:match("(.-)%s*$") + --i = i + 1 + --end + --return true +--end) |
