aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/vis-std.lua2
-rw-r--r--lua/vis.lua2
-rw-r--r--lua/visrc.lua6
3 files changed, 5 insertions, 5 deletions
diff --git a/lua/vis-std.lua b/lua/vis-std.lua
index a46896a..831f64b 100644
--- a/lua/vis-std.lua
+++ b/lua/vis-std.lua
@@ -115,5 +115,3 @@ vis.events.subscribe(vis.events.WIN_STATUS, function(win)
local right = ' ' .. table.concat(right_parts, " « ") .. ' '
win:status(left, right);
end)
-
-vis:command("set theme ".. (vis.ui.colors <= 16 and "default-16" or "default-256"))
diff --git a/lua/vis.lua b/lua/vis.lua
index c5ab47e..be46b79 100644
--- a/lua/vis.lua
+++ b/lua/vis.lua
@@ -88,6 +88,7 @@ local events = {
FILE_OPEN = "Event::FILE_OPEN", -- see @{file_open}
FILE_SAVE_POST = "Event::FILE_SAVE_POST", -- see @{file_save_post}
FILE_SAVE_PRE = "Event::FILE_SAVE_PRE", -- see @{file_save_pre}
+ INIT = "Event::INIT", -- see @{init}
QUIT = "Event::QUIT", -- see @{quit}
START = "Event::START", -- see @{start}
THEME_CHANGE = "Event::THEME_CHANGE", -- see @{theme_change}
@@ -102,6 +103,7 @@ events.file_close = function(...) events.emit(events.FILE_CLOSE, ...) end
events.file_open = function(...) events.emit(events.FILE_OPEN, ...) end
events.file_save_post = function(...) events.emit(events.FILE_SAVE_POST, ...) end
events.file_save_pre = function(...) return events.emit(events.FILE_SAVE_PRE, ...) end
+events.init = function(...) events.emit(events.INIT, ...) end
events.quit = function(...) events.emit(events.QUIT, ...) end
events.start = function(...) events.emit(events.START, ...) end
events.theme_change = function(...) events.emit(events.THEME_CHANGE, ...) end
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)