solidsnail@programming.dev to Neovim@programming.dev · 1 year agorun gF programmatically?message-squaremessage-square1fedilinkarrow-up16arrow-down10file-text
arrow-up16arrow-down1message-squarerun gF programmatically?solidsnail@programming.dev to Neovim@programming.dev · 1 year agomessage-square1fedilinkfile-text
Anyone aware of a way to run gF programmatically (i.e. lua) but with a different value instead of what’s under the curser?
minus-squaresixdripb@lemmy.worldlinkfedilinkarrow-up1·edit-21 year agoseems like lemmy formatting fucks up the code. why cant i post vim.fn.expand("") with angle bracketed text inside the function call quotes? not even as a code block. edit: ok so i found the bug: https://github.com/LemmyNet/lemmy-ui/issues/2067 here is my previous comment using the workaround in the link: lua if vim.fn.filereadable(vim.fn.expand("<cfile>"))==1 then vim.cmd("e +"..vim.fn.input("go to line: ").." <cfile>") else print("file not found") end this command would open the file under the cursor and ask you what line you want to go to.
seems like lemmy formatting fucks up the code.
why cant i post
vim.fn.expand("")
with angle bracketed text inside the function call quotes? not even as a code block.edit: ok so i found the bug: https://github.com/LemmyNet/lemmy-ui/issues/2067
here is my previous comment using the workaround in the link: