Vim复制,剪切和粘贴命令和操作

Vim provides different shortcuts for copy, cut and paste operations. These commands are one of the most used and problematic commands because of vim command or shortcut based work style.

Vim为复制,剪切和粘贴操作提供了不同的快捷方式。 由于vim命令或基于快捷方式的工作风格,这些命令是最常用和问题最多的命令之一。

复制当前行 (Copy Current Line)

We can copy current line with the yy command which is named yank. But the cursor should be located in the line we want to copy.

我们可以使用名为yank的yy命令复制当前行。 但是光标应位于我们要复制的行中。

yy

复制行 (Copy Lines)

We will again use yy command in order to copy multiple lines. But in this situation we should specify the range or line counts. We will provide the line count we want to copy between y‘s . In this example we will copy 5 lines from current cursor.

我们将再次使用yy命令以复制多行。 但是在这种情况下,我们应该指定范围或行数。 我们将提供要在y之间复制的行数。 在此示例中,我们将从当前光标复制5行。

y5y

复制字词 (Copy Word)

We can copy the next word where cursor locates with yw command. Words are separated with spaces.

我们可以使用yw命令将下一个单词复制到光标所在的位置。 单词用空格分隔。

yw

切断电流线 (Cut Current Line)

We can use dd command in order to cut current line. dd command is actually used to delete line but  a

你可能感兴趣的:(css,etl,vim,etcd,linux)