Cut copy paste in vim

可能因为我刚入门 linux 吧,有些方面我还是认为它不太友好。比如在 ssh 状态使用 vim 作文本编辑器应该是绝佳的选择,我不指责它的编辑性能,倒是愣让人看不明白。难道它就非得用晦涩的文字写 manual?

我无奈转向 google,一下子就找到了常人通俗易懂的语言,归纳如下:

Cut 的等效快捷键
dd delete current line
D delete from cursor to end of line
d$ delete from cursor to end of line
d0 delete from cursor to beginning of line
dw delete from cursor to end of current word
db delete from cursor to beginning of current word

Copy 的等效快捷键
Y or yy copy (yank) one line
2Y copy two lines
10Y copy 10 lines
yG copy all lines to the end of the file
yw copy text from the current cursor position to the end of the word
y$ copy text from the current cursor position to the end of the line

Paste 的等效快捷键
P paste above the current cursor position
p paste below the current cursor position

Related Posts

Leave a comment

Your email address will not be published. Required fields are marked *