Lua config for multi-line jumps? #81
Answered
by
saberzero1
LexiAgneboGudmunds
asked this question in
Q&A
|
The most useful part IMO with relative line numbers is being able to jump to any visible line using numbered jumps, for example going to rel. line number The problem is that in Obsidian, since the lines wrap around, it is common to nnoremap Does anyone know if it is possible, with the plugins current functionality, to configure init.lua so that |
Answered by
saberzero1
Jul 22, 2026
Replies: 1 comment 1 reply
|
The following pattern is supported in vim.keymap.set('n', 'j', function()
if vim.v.count == 0 then
return 'gj'
else
return vim.v.count1 .. 'j'
end
end, { expr = true, silent = true })
vim.keymap.set('n', 'k', function()
if vim.v.count == 0 then
return 'gk'
else
return vim.v.count1 .. 'k'
end
end, { expr = true, silent = true }) |
1 reply
Answer selected by
saberzero1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following pattern is supported in
0.79.0and later: