문제

I do a vimdiff on 2 files. Now if I want to wrap 2 files then I need to apply :set wrap 2 times to each file separately.

Is there any way I can apply set wrap to both of them simultaneously without running same command twice?

도움이 되었습니까?

해결책

windo does exactly what you want:

:windo set wrap

If you have multiple tabs, there is an equivalent tabdo to handle that case.

:tabdo set wrap

다른 팁

Found this solution using bash alias. I could not find a way to use .vimrc to set wrap for vimdiff.

alias vimdiff='vimdiff -c"windo set wrap" $*'

Credit to: http://www.nieko.net/data/bashrc

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top