2017-09-24 15 views
0

나는 을 사용하여 단어를 변경하고 ciw을 사용하여 내부 단어를 변경할 수 있음을 알고 있지만 문자 뒤에 단어를 변경하려고합니다.vim에서 인용 한 후에 단어를 변경 하시겠습니까?

예를 들어 내 커서가 첫 번째 따옴표 (')에 지금이

this.option('test'); 

을하고 난 단어 테스트를 변경하고 싶습니다. cw을 누르면 내 커서가있는 첫 번째 인용 부호도 삭제됩니다. 다른 한편으로는 a 모드를 모방하는 명령을 찾고 있는데 (커서가 삽입 된 곳), 제 경우에는 커서 뒤에 단어를 삭제하고 삽입 모드로 놓습니다.

답변

3

cw은 "단어 변경"이 아니며 "다음 단어로 변경"입니다.

작은 따옴표 중 하나에 커서를 놓으면 ci'을 사용하여 "작은 따옴표 사이에서 변경"을 사용할 수 있습니다. 첫 번째 작은 따옴표에 커서를

, 당신은 할 수 :

wciw   move to next word then change inner word 
wcw   move to next word then change to next word 
wct'   move to next word then change until next single quote 
wce   move to next word then change to end of the word 

lciw   move to next character then change inner word 
lcw   move to next character then change to next word 
lct'   move to next character then change until next single quote 
lce   move to next word then change to end of the word 

<Right>ciw move to next character then change inner word 
<Right>cw  move to next character then change to next word 
<Right>ct' move to next character then change until next single quote 
<Right>ce  move to next word then change to end of the word 

:help navigation를 참조하십시오.

+0

수정 및 'ci'명령에 감사드립니다. 이것은 내가 찾고 있었던 바로 그 것이다! – supersan

0

당신이 텍스트 삭제됩니다

ci' 

이를 사용하여 변경할 수 있도록 삽입 모드를 설정 할 수있는 것보다 커서는 (')에있는 경우.

' 안에 변경되었습니다.