# VIM 交換兩個單字 ( swap two words )  當我今天要交換所有input跟output 可執行 ``` %s /input/temp/g | %s /output/input/g | %s /temp/output/g ``` 其實就是一般C語言用的swap手法 , 把input先替換成 temp , 再把output換成input , 最後把temp換成output 只是可以把語法串在一行搞定 執行結果  ###### tags: `vim`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up