Hacker News new | ask | show | jobs
by umanwizard 1015 days ago
From a colleague; I haven’t tested it:

    --Remap for dealing with word wrap
    vim.keymap.set({ 'n', 'v' }, 'k', "v:count == 0 ? 'gk' : 'k'", { noremap = true, expr = true, silent = true })
    vim.keymap.set({ 'n', 'v' }, 'j', "v:count == 0 ? 'gj' : 'j'", { noremap = true, expr = true, silent = true })
1 comments

what is this? I dont recognize that language
It's Lua. Presumably they're using Neovim.
Ah, my bad. Not a heavy vim user so I didn’t realize this was neovim-specific.
vimscript
No, it's not.
mea culpa