Home Explore Blog CI



neovim

4th chunk of `runtime/doc/motion.txt`
73600c2eb60b7e86d34b497ef79d48ffe7aecd7df41ce51c0000000100000fa9
 the first character of
			the screen line.  |exclusive| motion.  Differs from
			"0" when a line is wider than the screen.
			When lines don't wrap ('wrap' off): To the leftmost
			character of the current line that is on the screen.
			Differs from "0" when the first character of the line
			is not on the screen.

							*g^*
g^			When lines wrap ('wrap' on): To the first non-blank
			character of the screen line.  |exclusive| motion.
			Differs from "^" when a line is wider than the screen.
			When lines don't wrap ('wrap' off): To the leftmost
			non-blank character of the current line that is on the
			screen.  Differs from "^" when the first non-blank
			character of the line is not on the screen.

							*gm*
gm			Like "g0", but half a screenwidth to the right (or as
			much as possible).

							*gM*
gM			Like "g0", but to halfway the text of the line.
			With a count: to this percentage of text in the line.
			Thus "10gM" is near the start of the text and "90gM"
			is near the end of the text.

							*g$*
g$			When lines wrap ('wrap' on): To the last character of
			the screen line and [count - 1] screen lines downward
			|inclusive|.  Differs from "$" when a line is wider
			than the screen.
			When lines don't wrap ('wrap' off): To the rightmost
			character of the current line that is visible on the
			screen.  Differs from "$" when the last character of
			the line is not on the screen or when a count is used.
			Additionally, vertical movements keep the column,
			instead of going to the end of the line.
			When 'virtualedit' is enabled moves to the end of the
			screen line.

							*g<End>* *g<kEnd>*
g<End>			Like |g$| but to the last non-blank character
			instead of the last character.

							*bar*
|			To screen column [count] in the current line.
			|exclusive| motion.  Ceci n'est pas une pipe.

							*f*
f{char}			To [count]'th occurrence of {char} to the right.  The
			cursor is placed on {char} |inclusive|.
			{char} can be entered as a digraph |digraph-arg|.
			When 'encoding' is set to Unicode, composing
			characters may be used, see |utf-8-char-arg|.
			|:lmap| mappings apply to {char}.  The CTRL-^ command
			in Insert mode can be used to switch this on/off
			|i_CTRL-^|.

							*F*
F{char}			To the [count]'th occurrence of {char} to the left.
			The cursor is placed on {char} |exclusive|.
			{char} can be entered like with the |f| command.

							*t*
t{char}			Till before [count]'th occurrence of {char} to the
			right.  The cursor is placed on the character left of
			{char} |inclusive|.
			{char} can be entered like with the |f| command.

							*T*
T{char}			Till after [count]'th occurrence of {char} to the
			left.  The cursor is placed on the character right of
			{char} |exclusive|.
			{char} can be entered like with the |f| command.

							*;*
;			Repeat latest f, t, F or T [count] times. See |cpo-;|

							*,*
,			Repeat latest f, t, F or T in opposite direction
			[count] times. See also |cpo-;|

==============================================================================
3. Up-down motions					*up-down-motions*

k		or					*k*
<Up>		or					*<Up>* *CTRL-P*
CTRL-P			[count] lines upward |linewise|.

j		or					*j*
<Down>		or					*<Down>*
CTRL-J		or					*CTRL-J*
<NL>		or					*<NL>* *CTRL-N*
CTRL-N			[count] lines downward |linewise|.

gk		or					*gk* *g<Up>*
g<Up>			[count] display lines upward.  |exclusive| motion.
			Differs from 'k' when lines wrap, and when used with
			an operator, because it's not linewise.

gj		or					*gj* *g<Down>*
g<Down>			[count] display lines downward.  |exclusive| motion.
			Differs from 'j' when lines wrap, and when used with
			an operator, because it's not linewise.

							*-*
`-`  <minus>		[count] lines upward, on the first non-blank
			character |linewise|.

`+`		or					*+*
CTRL-M		or					*CTRL-M* *<CR>*
<CR>			[count] lines downward, on the first non-blank
			character |linewise|.

							*_*
_  <underscore>		[count] - 1 lines downward, on the first non-blank

Title: More Left-Right Motions and Up-Down Motions
Summary
This section details additional commands for horizontal cursor movement within a line, including 'g$', 'g<End>', '|', 'f', 'F', 't', 'T', ';', and ','. It explains how these commands function with wrapped lines and when 'virtualedit' is enabled. The section also covers vertical cursor movement commands such as 'k', 'j', 'gk', 'gj', '-', '+', and '_', specifying their behavior as linewise or exclusive motions and how they interact with wrapped lines.