diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 20:42:43 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 20:42:43 +0200 |
commit | 64d9d82afbe9fcdabc9e4b9c5f02bf12c093645c (patch) | |
tree | d9c2218c51716e77ea62cfe5c662274f49a2f3a2 /config/essentials/vis/visrc.lua | |
parent | d7d9eb0f21770d4467a31d16e2adf7e9c8a21edf (diff) |
checkpoint
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") |