[20200107]vim的特殊功能g命令.txt
--//今天我要使用vim定位一个sql语句某行在整个sql语句偏移位置(与开始位置),这个命令不大常用。
--//我仅仅记忆理命令使用g开头,我查询文档发现:
g CTRL-G Prints the current position of the cursor in five
ways: Column, Line, Word, Character and Byte. If the
number of Characters and Bytes is the same then the
Character position is omitted.
If there are characters in the line that take more
than one position on the screen (
character), both the "real" column and the screen
column are shown, separated with a dash.
See also 'ruler' option. {not in Vi}
--//这样移到到定位的位置,在输入g ctrl-g ,在提示行显示如下。
Col 15 of 201; Line 21 of 21; Word 135 of 160; Char 1427 of 1615; Byte 1429 of 1617
--//这样可以知道偏移在1429处。
--//开头是g的命令还有许多特殊功能,比如ga看ascii码等等。