I have a vim config. However, when I paste text
I do "set:paste"
That will allow me to paste text into putty very nicely.
However, my "smart indents" and 'auto tabbing' --which is in my original config..is gone!?
How do I make it so that
set nohlsearch set ai set bg=dark set showmatch highlight SpecialKey ctermfg=DarkGray set listchars=tab:>-,trail:~ set list autocmd BufEnter,BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class set tabstop=4 set shiftwidth=4 set expandtab set autoindent set smartindent syntax on set listchars=tab:>- set listchars+=trail:. set ignorecase set smartcase map :tabr map :tabl map :tabp map :tabn filetype indent on filetype on filetype plugin on
You might want to:
set pastetoggle=<F6>
With this you can change paste status with F6 (you can of course bind it to anything you want.
为2:设置nopaste
如果你可以使用vim的任何图形版本(例如gvim,macvim),那么他们通常会支持复制和粘贴,而不需要:set paste
。
上一篇: Vim Python缩进不起作用?
下一篇: 我有一个vim配置。 但是,当我粘贴文本