vim 最基本操作
Posted 黑凤梨
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vim 最基本操作相关的知识,希望对你有一定的参考价值。
insert mode: i
save : :w
save and quit: :wq
move cursor: H (left) J(next line) K(last row) L(right)
open a new line: o (below current line) O(above current line)
delete: d
copy: y
paste: p
undo: u
line-connection: J
find and replace: :%s/f/r/g f: texts to find r: texts to replace f /g:optional,means global
open several files: vim file1 file2 ...
switch opened files: :n (to the next one) :N(to the previous one)
insert a whole file to another: :r file2 open file1 and use the command to insert content in file2
以上是关于vim 最基本操作的主要内容,如果未能解决你的问题,请参考以下文章