Visual selection is a common feature in applications, but Vim's visual selection has several benefits.
To cut-and-paste or copy-and-paste:
- Position the cursor at the beginning of the text you want to cut/copy.
- Press v to begin character-based visual selection, or V to select whole lines, or Ctrl-v or Ctrl-q to select a block.
- Move the cursor to the end of the text to be cut/copied. While selecting text, you can perform searches and other advanced movement.
- Press d (delete) to cut, or y (yank) to copy.
- Move the cursor to the desired paste location.
- Press p to paste after the cursor, or P to paste before.
Visual selection (steps 1-3) can be performed using a mouse.
If you want to change the selected text, press c instead of d or y in step 4. In a visual selection, pressing c performs a change by deleting the selected text and entering insert mode so you can type the new text.
출처: http://vim.wikia.com/wiki/Cut/copy_and_paste_using_visual_selection
'<프로그래밍>' 카테고리의 다른 글
git status command (0) | 2018.01.26 |
---|---|
Trace32 wiki (0) | 2016.07.10 |
에러로그까지 저장하자 (0) | 2016.03.23 |
eclipse 테마 변경 (0) | 2016.02.23 |
eclipse 단축키 (0) | 2016.02.16 |