gg"*yG
gg 移動到檔案起點
"*y 從此起點開始 yank to register *
bamil 發表在 痞客邦 留言(0) 人氣(16)
/KEYWORD : search forward to find KEYWORD
n : find next
?KEYWORD : search backward to find KEYWORD
N : find previous
bamil 發表在 痞客邦 留言(0) 人氣(15)
/KEYWORD : search forward to find KEYWORD
n : find next
?KEYWORD : search backward to find KEYWORD
N : find previous
bamil 發表在 痞客邦 留言(0) 人氣(53)
Using markers and buffers
| Command | Description |
|---|
mf |
set marker named ``f'' |
`f |
go to marker ``f'' |
´f |
go to start of line containing marker ``f'' |
"s12yy |
copy 12 lines into buffer ``s'' |
"ty} |
copy text from cursor to end of paragraph into buffer ``t'' |
"ly1G |
copy text from cursor to top of file into buffer ``l'' |
"kd`f |
cut text from cursor up to marker ``f'' into buffer ``k'' |
"kp |
paste buffer ``k'' into text |
bamil 發表在 痞客邦 留言(0) 人氣(35)
ma : set a marker at cursor position
`a : move from here to marker a
'a : move from here to line marked a
bamil 發表在 痞客邦 留言(0) 人氣(16)
Linux command:
cp a tmp.txt
vi tmp.txt
bamil 發表在 痞客邦 留言(0) 人氣(247)
bamil 發表在 痞客邦 留言(0) 人氣(17,951)
http://www.devdaily.com/linux/vi-vim-delete-line-commands-to-end
bamil 發表在 痞客邦 留言(0) 人氣(56)
:g/AAAA/s//BBBB/g
就會將全文中出現的AAAA用BBBB取代.
bamil 發表在 痞客邦 留言(0) 人氣(2,610)