Skip to content

Commit

Permalink
vim-patch:fd4e47e: runtime(doc): clarify the effect of 'startofline' …
Browse files Browse the repository at this point in the history
…option (neovim#30701)

fixes: vim/vim#15794

vim/vim@fd4e47e

Co-authored-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
zeertzjq and chrisbra authored Oct 6, 2024
1 parent 27f3750 commit d0dc292
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion runtime/doc/motion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ When doubling the operator it operates on a line. When using a count, before
or after the first character, that many lines are operated upon. Thus `3dd`
deletes three lines. A count before and after the first character is
multiplied, thus `2y3y` yanks six lines.

*operator-resulting-pos*
After applying the operator the cursor is mostly left at the start of the text
that was operated upon. For example, "yfe" doesn't move the cursor, but "yFe"
moves the cursor leftwards to the "e" where the yank started.
The 'startofline' option applies only to the "d", "<<", "==" and ">>" linewise
operations.

*linewise* *charwise* *characterwise*
The operator either affects whole lines, or the characters between the start
Expand Down
3 changes: 2 additions & 1 deletion runtime/doc/options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6016,7 +6016,8 @@ A jump table for the options with a short description can be found at |Q_op|.
non-blank of the line. When off the cursor is kept in the same column
(if possible). This applies to the commands:
- CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", "gg"
- "d", "<<" and ">>" with a linewise operator
- "d", "<<", "==" and ">>" with a linewise operator
(|operator-resulting-pos|)
- "%" with a count
- buffer changing commands (CTRL-^, :bnext, :bNext, etc.)
- Ex commands that only have a line number, e.g., ":25" or ":+".
Expand Down
3 changes: 2 additions & 1 deletion runtime/lua/vim/_meta/options.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/nvim/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8075,7 +8075,8 @@ return {
non-blank of the line. When off the cursor is kept in the same column
(if possible). This applies to the commands:
- CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", "gg"
- "d", "<<" and ">>" with a linewise operator
- "d", "<<", "==" and ">>" with a linewise operator
(|operator-resulting-pos|)
- "%" with a count
- buffer changing commands (CTRL-^, :bnext, :bNext, etc.)
- Ex commands that only have a line number, e.g., ":25" or ":+".
Expand Down

0 comments on commit d0dc292

Please sign in to comment.