目前分類:vi (9)
- Jul 09 Wed 2014 15:55
Copy all to clipboard
- Aug 23 Thu 2012 17:12
vi cut / copy / paste commands
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 |
- Aug 23 Thu 2012 11:29
vi : delete/move using marker
- Aug 21 Tue 2012 12:22
vi 如何複製部分a檔案內容至b檔案 (copy part of file a to file b)
Linux command:
cp a tmp.txt
vi tmp.txt
vi command:
(cursor at 1 line before begining of where we want to copy) d1G
(cursor at 1 line after end of where we want to copy) dG
:x
Now tmp.txt contains only the part we want.
Linux command:
vi b
(cursor at where we want to paste) :r tmp.txt
有點笨的作法, 但google了一下, 我只會這個....
- Aug 21 Tue 2012 11:18
vi 的顯示行數與隱藏行數
- Aug 14 Tue 2012 14:51
vi/vim delete commands
- Jul 30 Mon 2012 12:01
vi 如何全部取代 (search and replace all)