728x90
Vim - Cheat Sheet By Vimgolf
Error : Simple, Practical, and Common
*temp var1 0
*temp var2 "hi"
*temp var3 -1
*temp var4 42
*temp var5 "asdf"
*temp var6 0
Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way."
This challenge is just a simple movement and entering text at a certain place.
How edit to do as follows ?
*temp var1 0
*temp var2 "hi"
*temp var3 -1
*temp var4 42
*temp var5 "asdf"
*temp var6 0
*temp var7 11
Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way."
New text.
This challenge is just a simple movement and entering text at a certain place.
Solution(drag) : #Yp<C-A>l11.GONew te<C-N>.<CR><Esc>ZZZ
Error : I forgot quotes
foo = a
ab
abc
How edit to do as follows ?
foo = "a"
"ab"
"abc"
Solution(drag) : <C-V>GhA"<Esc>$.ZZ
Error : One number per line
- One number per line -
-----------------------
2,3,5,7,
11,13,17,
19,23,29,
How edit to do as follows ?
2
3
5
7
11
13
17
19
23
29
Solution(drag) : 5gJV"=[<C-R><C-A>]<CR>pZZ
Error : Just the middle
Leave only the
numbered lines.
LINE 1
LINE 2
LINE 3
That's all.
Thank you
very much.
How edit to do as follows ?
LINE 1
LINE 2
LINE 3
Solution(drag) : )3:wq!<CR>
'my_lesson > _Vi' 카테고리의 다른 글
Vim Vi문서간 작성 타이밍별 비교법 다중창과 탭 (0) | 2018.09.28 |
---|---|
Vim - vi 바꾸기와 패턴 찾아서 바꾸기 (0) | 2017.12.25 |
Vim - key mapping (0) | 2016.12.22 |
Vim - vimrc sample (0) | 2016.12.21 |
Vim - html 특수문자 치환 vi < replace (0) | 2016.12.19 |
댓글