summaryrefslogtreecommitdiff
path: root/config/essentials/vis
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-25 01:10:02 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-25 01:10:02 +0200
commit44c011c5988077b515204159b6930c69c0475571 (patch)
tree8e441b3c7b8de05f7a92e0bcf61959713bf1edf8 /config/essentials/vis
parent58ba99570d0bdbb41b5c7c8f2a0c53ea9299ea4c (diff)
checkpoint
Diffstat (limited to 'config/essentials/vis')
-rw-r--r--config/essentials/vis/visrc.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/config/essentials/vis/visrc.lua b/config/essentials/vis/visrc.lua
index 78f7cfe..f9242c8 100644
--- a/config/essentials/vis/visrc.lua
+++ b/config/essentials/vis/visrc.lua
@@ -119,10 +119,12 @@ end)
vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused args
-- automatically cd in parent dir of file
- if win.file and win.file.path then
- local dir = win.file.path:match(".*/")
- vis:command("cd " .. dir)
- end
+ vis:command_register("cdp", function()
+ if win.file and win.file.path then
+ local dir = win.file.path:match(".*/")
+ vis:command("cd " .. dir)
+ end
+ end, "Cd to parent dir of file")
win.options.relativenumbers = true