#TIL #vim :s 명령어에서 현재 커서 단어를 입력하기
2019-08-10
:%s/foo/<c-r><c-w>/g
Replace each occurrence of ‘foo’ with the word under the cursor. <c-r><c-w> means that you press Ctrl-R then Ctrl-W The word under the cursor will be inserted as though you typed it.
*
키와 조합이 좋다. *
키를 눌러 찾은 단어를 :s
명령어에서 쓰고 싶을 때, 주로 사용한다.
참고
- category:
- til 174
- tags:
- vim 16
@ohyecloudy
, ohyecloudy@gmail.com