概要: 在vim编辑文件中,如果想粘贴较大长度的一行字符串时,经常会出现自动折行的情况,其实很简单,只需修改 /etc/vimrc,修改一个选项: if has("autocmd") " In text files, always limit the width of text to 78 characters " autocmd BufRead *.txt set tw=78 autocmd BufRead *.txt set tw=200 看到上面的注释了吧,把tw从78改成200甚至更大就行了。
防止VIM粘贴数据时断行,标签:电脑技巧大全,电脑技术,http://www.laixuea.com在vim编辑文件中,如果想粘贴较大长度的一行字符串时,经常会出现自动折行的情况,其实很简单,只需修改 /etc/vimrc,修改一个选项:
if has("autocmd")
" In text files, always limit the width of text to 78 characters
" autocmd BufRead *.txt set tw=78
autocmd BufRead *.txt set tw=200
看到上面的注释了吧,把tw从78改成200甚至更大就行了。