How do I jump to the next section or function definition in Vim?
]]
The ]] motion jumps forward to the next line that starts with { in the first column, which is typically the beginning of a C-style function or section.
]]
The ]] motion jumps forward to the next line that starts with { in the first column, which is typically the beginning of a C-style function or section.
s{char}{char} (vim-sneak)
vim-sneak provides a motion that lets you jump to any location specified by two characters.
qa f,ldt,F(p q
This macro swaps two comma-separated arguments inside parentheses by cutting the second argument and placing it before the first.
ce
The ce command changes from the cursor position to the end of the current word.
(
The ( motion moves the cursor backward to the start of the current or previous sentence.
]] and [[
The ]] and [[ motions jump between sections, traditionally defined as lines starting with { in the first column.
gj
The gj command moves the cursor down by one display line rather than one physical line.
{count}|
The command moves the cursor to a specific screen column on the current line.
[{
The [{ command moves backward to the nearest unmatched {.
])
The ]) command moves forward to the next unmatched ).
{count}%
When used with a count, the % command jumps to the line at that percentage of the file.
]m
The ]m command jumps to the start of the next method in Java-style code.
M
The M command moves the cursor to the line in the middle of the current window.
L
The L command moves the cursor to the last line visible in the current window.
}
The } motion moves the cursor forward to the next blank line, effectively jumping to the next paragraph.
)
The ) motion moves the cursor to the beginning of the next sentence.
:<line-number>
When you know the exact line number you want to navigate to, the colon command is the quickest way to get there.
{
The { motion moves the cursor backward to the previous blank line, jumping to the beginning of the current or previous paragraph.
ge
The ge motion moves the cursor backward to the end of the previous word.
<C-o> and <C-i>
Vim maintains a jump list of positions you have visited.