diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 21:48:56 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 21:48:56 +0200 |
commit | a857f247d9a71b88a4f0dbcfa95e3679e8456e70 (patch) | |
tree | 846ddcd8117be1505a970e3638fc65d0ec954a2e /config/essentials/vis/visrc.lua | |
parent | 75196520b3d6a0e60db1d03a64aaa0655cc4f202 (diff) | |
parent | 6251d6ba1054cd79387f0f88ce25d2f4bc8b78c4 (diff) |
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'config/essentials/vis/visrc.lua')
-rw-r--r-- | config/essentials/vis/visrc.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/essentials/vis/visrc.lua b/config/essentials/vis/visrc.lua index 577712a..b56b6af 100644 --- a/config/essentials/vis/visrc.lua +++ b/config/essentials/vis/visrc.lua @@ -25,7 +25,7 @@ local format = require("format") -- set height to 40% local fzfmru = require("fzf-mru") -fzfmru.fzfmru_path = 'grep "^' .. os.getenv("PWD") .. '" | fzf' +fzfmru.fzfmru_path = 'grep "^' .. io.popen("pwd"):read("*a"):gsub("\n$", "") .. '" | fzf' -- todo: -- c-scope @@ -120,9 +120,9 @@ end) vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused args -- automatically cd in parent dir of file vis:command_register("cdp", function() - if win.file and win.file.path then - local dir = win.file.path:match(".*/") - vis:command("cd " .. dir) + if win and win.file and win.file.path then + -- local dir = win.file.path:match(".*/") + -- vis:info("cd " .. tostring(dir)) end end, "Cd to parent dir of file") |