Back to tips
Vim Relative Line Jumping
Jump to lines relative to cursor position with +/- syntax
The go-to-line action now supports relative line jumping, allowing you to jump to lines relative to your current cursor position using Vim/Neovim syntax.
Supported Syntax
When using go-to-line with relative mode enabled:
5→ jump 5 lines down-3orb3→ jump 3 lines up+10orf10→ jump 10 lines forward0→ stay on current line
Both - and b work for backward jumps, + and f for forward jumps.
Setup
Add a keybinding to your keymap.json:
{
"context": "VimControl && !menu",
"bindings": {
"ctrl-j": ["go_to_line::Toggle", {"relative": true}]
}
}How to Use
- Press your configured keybinding (e.g.,
Ctrl-J) - Type the relative line number (
5,-3,b10, etc.) - Press Enter to jump
Why This Matters
Vim familiarity: Matches Vim/Neovim’s relative line jump behavior.
Efficient navigation: Jump to nearby lines without calculating absolute line numbers.
Visual mode friendly: Works with relative line numbers display for quick jumps.
Perfect for Vim users who rely on relative line numbers and want fast vertical navigation.