You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say my cursor is over ~/.config/init.lua or "core.keymaps". I already have tried:
vim.keymap.set("n", "<cr>", function()
local path = vim.fn.expand("<cfile>")
local ok, result = pcall(vim.cmd, 'gf ' .. path)
if not ok then
return "<cr>"
end
-- If 'gf' succeeded, return an empty string to prevent further actions
return "gf"
end, { expr = true })
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say my cursor is over ~/.config/init.lua or "core.keymaps". I already have tried:
But for not avail
Beta Was this translation helpful? Give feedback.
All reactions