Anyone aware of a way to run gF programmatically (i.e. lua) but with a different value instead of what’s under the curser?

  • sixdripb@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    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:

    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.