红联Linux门户
Linux帮助

防止VIM粘贴数据时断行

发布时间:2011-11-17 11:42:37来源:华军资讯作者:linux使用者

  在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甚至更大就行了。