aboutsummaryrefslogtreecommitdiff
path: root/env/.config/vis/visrc.lua
diff options
context:
space:
mode:
authoriceyrazor <iceyrazor@mailfence.com>2026-10-23 23:48:32 -0500
committericeyrazor <iceyrazor@mailfence.com>2026-10-23 23:48:32 -0500
commit513ddbd8cee63cd8b09086d343a99123d782c940 (patch)
tree223e8c7d8240d015118b96dccdc221e07a82606e /env/.config/vis/visrc.lua
parent95b3608c70e96f72a01a6115219e3e0496d70785 (diff)
Squashed commit of the following:HEADmain
lessons loop change added tld to newsboat changed mimes manpager is using mktemp now added paste bind. so autoindent dont indent clipboard vis. made file browser not close vis on cancel added telemetry disable line to lua updated README.me removed nitrogen and swaybg. wallpaper is now set with setwll removed cava from backup fixed way alias removed cava shaders
Diffstat (limited to 'env/.config/vis/visrc.lua')
-rw-r--r--env/.config/vis/visrc.lua36
1 files changed, 25 insertions, 11 deletions
diff --git a/env/.config/vis/visrc.lua b/env/.config/vis/visrc.lua
index d1a2e32..3d7f90c 100644
--- a/env/.config/vis/visrc.lua
+++ b/env/.config/vis/visrc.lua
@@ -4,27 +4,41 @@ require('vis')
local leader = ' '
+local function count_windows()
+ local n = 0
+ for _ in vis.windows(vis) do
+ n = n + 1
+ end
+ return n
+end
+
+
vis:map(vis.modes.NORMAL, ' ', '')
vis:map(vis.modes.VISUAL,leader.."y", '"+y"')
-- global configuration options
vis.events.subscribe(vis.events.INIT, function()
- vis:command("set theme caelus")
+ vis:command("set theme caelus")
end)
-- per-window configuration options
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
- vis:command("set tabwidth 4")
- vis:command("set relativenumbers true")
- vis:command("set autoindent true")
- vis:command("set expandtab true")
- vis:command("set ignorecase true")
- vis:map(vis.modes.NORMAL, leader.."pv", function()
- vis:command("open .")
- vis:feedkeys("<C-w>k")
- vis:command("wq!")
- end, "")
+ vis:command("set tabwidth 4")
+ vis:command("set relativenumbers true")
+ vis:command("set autoindent true")
+ vis:command("set expandtab true")
+ vis:command("set ignorecase true")
+ vis:map(vis.modes.NORMAL, leader.."fm", function()
+ local windows = count_windows()
+ vis:command("open .")
+ if count_windows() == windows then
+ return
+ end
+ vis:feedkeys("<C-w>k")
+ vis:command("wq!")
+ end, "")
+ vis:map(vis.modes.NORMAL, leader.."p", '"+p')
end)
vis.ftdetect.filetypes["greyscript"] = { ext = { "%.src$" } }