-*motion.txt* For Vim version 9.1. Last change: 2024 Jul 14
+*motion.txt* For Vim version 9.1. Last change: 2024 Aug 28
VIM REFERENCE MANUAL by Bram Moolenaar
See also 'startofline' option.
:[range]go[to] [count] *:go* *:goto* *go*
-[count]go Go to [count] byte in the buffer. Default [count] is
- one, start of the file. When giving [range], the
- last number in it used as the byte count. End-of-line
- characters are counted depending on the current
- 'fileformat' setting.
+[count]go Go to [count] byte in the buffer. |exclusive| motion.
+ Default [count] is one, start of the file. When
+ giving [range], the last number in it used as the byte
+ count. End-of-line characters are counted depending
+ on the current 'fileformat' setting.
Also see the |line2byte()| function, and the 'o'
option in 'statusline'.
{not available when compiled without the
exe "normal! \<C-E>"
bwipe!
endfunc
+
+" Test for go command
+func Test_normal_go()
+ new
+ call setline(1, ['one two three four'])
+ call cursor(1, 5)
+ norm! dvgo
+ call assert_equal('wo three four', getline(1))
+ norm! ...
+ call assert_equal('three four', getline(1))
+
+ bwipe!
+endfunc
" vim: shiftwidth=2 sts=2 expandtab nofoldenable