diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-08 09:21:15 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-08 09:21:15 +0100 |
| commit | b33fe9f37d6a9c672650df1c61e897f2582ef563 (patch) | |
| tree | 707ee47470715b46523d02a86d6e4304c0d130bc /lua/visrc.lua | |
| parent | 6d1d45776b231304b0ff41b5e6098f07931ec44e (diff) | |
| download | vis-b33fe9f37d6a9c672650df1c61e897f2582ef563.tar.gz vis-b33fe9f37d6a9c672650df1c61e897f2582ef563.tar.xz | |
vis-lua: expose init event and use it to set default theme
The init event is emitted immediately after `visrc.lua` has been sourced, but
before any other events have occured, in particular the command line arguments
have not yet been processed.
Close #422
Diffstat (limited to 'lua/visrc.lua')
| -rw-r--r-- | lua/visrc.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/visrc.lua b/lua/visrc.lua index 1a304b4..13bd7f7 100644 --- a/lua/visrc.lua +++ b/lua/visrc.lua @@ -3,9 +3,9 @@ require('vis') require('plugins/filetype') require('plugins/textobject-lexer') -vis.events.subscribe(vis.events.START, function() - -- Your global configuration options e.g. - -- vis:command('map! normal j gj') +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")) end) vis.events.subscribe(vis.events.WIN_OPEN, function(win) |
