我在vim撤消方面遇到了很多麻煩。我在〜/ .vimrc中設置了'nofofile',並附上了我工作目錄的屏幕截圖,這讓所有.un〜文件都變得非常煩人。這裏謝謝你的幫助!哪裏可以找到vim撤消設置以及如何關閉它們?
下面是我的.vimrc
set nocompatible
exec pathogen#infect()
filetype plugin indent on
filetype plugin on
"syntax enable
syntax on
set background=light
set noundofile
let g:solarized_termtrans = 1
colorscheme solarized
set number
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
vnoremap < <gv
vnoremap > >gv
set runtimepath^=~/.vim/bundle/ctrlp.vim
autocmd FileType ruby set ft=ruby.rails
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2
set nobackup " no backup files
set nowritebackup " only in case you don't want a backup file while editing
set noswapfile " no swap files
set clipboard=unnamed " use Mac clipboard for yank/paste/etc.
" expand %% to file dir
cnoremap %% <C-R>=expand('%:h').'/'<cr>
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set smarttab " insert tabs on the start of a line according to
" shiftwidth, not tabstop
set ts=2 sts=2 sw=2 expandtab "set two spaces by default
autocmd Filetype javascript setlocal et ts=2 sts=2 sw=2
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd Filetype html setlocal et ts=2 sts=2 sw=2
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd Filetype css setlocal et ts=2 sts=2 sw=2
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
au BufRead,BufNewFile *.hamlc set ft=haml
" Vim-pasta Settings
let g:pasta_disabled_filetypes = ['python', 'coffee', 'yaml']
" Indent Guide Settings
autocmd FileType html,css,ruby,eruby,javascript,php,xml,haml call indent_guides#enable()
set mouse=a
imap <C-l> <Space>=><Space>
"Make hashrocket with control-l
nmap <silent> <Leader>q :NERDTreeToggle<CR>
'當'undofile'關閉時,撤消文件不會被刪除.'你可以手動刪除這些un〜文件,並測試它們是否仍然由vim生成。 – Kent
您不需要'filetype plugin on',因爲它已經由上面的行完成了。 – romainl
我有點困惑,爲什麼只要用簡單的'ls'命令就可以看到這些文件。 Unix系統通常隱藏名稱以'。'開頭的文件,至少使用默認設置。 – Ben