1. 系统剪贴板内容复制到vim, SHIT+Insert
2. 代码format: gg+=
3. 把文字块拷到新文件中
Select the text you wish to save, in either line visual or block visual mode, and
:w new.txt
That's what you type, but you won't actually see exactly what's above. When you press :
, you'll go to the command line which will automatically get filled in with selection information. It'll look something like this:
:'<,'>
Just carry on typing the rest (w new.txt
) to get
:'<,'>w new.txt
...and press enter.
--持续更新