From e69a88ae881d06fc76c5253055e7f6b787f16277 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Mon, 8 Oct 2018 13:39:26 +0200 Subject: [PATCH] use editorconfig, multiple interactives and dark/light themes in vis --- config/vis/visrc.lua | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/config/vis/visrc.lua b/config/vis/visrc.lua index ddf18dc..47f62b7 100644 --- a/config/vis/visrc.lua +++ b/config/vis/visrc.lua @@ -2,6 +2,7 @@ require('vis') require('plugins/complete-word') require('plugins/myfiletype') +require('editorconfig/editorconfig') vis.events.subscribe(vis.events.INIT, function() -- Your global configuration options @@ -42,8 +43,22 @@ end) vis:map(vis.modes.NORMAL, ";;", "") +interactives = { + ["python"] = "!python -i $vis_filename", + ["haskell"] = "!stack ghci $vis_filepath", + ["lithaskell"] = "!stack ghci $vis_filepath", +} vis:map(vis.modes.NORMAL, ";i", function() - if vis.win.syntax == "python" then - vis:command("!python -i $vis_filename") + local command = interactives[vis.win.syntax] + if command then + vis:command(command) end end) + +vis:map(vis.modes.NORMAL, ";w", function() + vis:command('set theme light-16') +end) + +vis:map(vis.modes.NORMAL, ";b", function() + vis:command('set theme dark-16') +end)