Quellcode durchsuchen

Replace poor implementation with nice plugin

Andrew Swistak vor 8 Jahren
Ursprung
Commit
8647adae7c
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 3 0
      .gitmodules
  2. 1 0
      vim/bundle/vim-sayonara
  3. 1 5
      vimrc

+ 3 - 0
.gitmodules

@@ -123,3 +123,6 @@
 [submodule "vim/bundle/vim-operator-highlight"]
 	path = vim/bundle/vim-operator-highlight
 	url = https://github.com/ajswis/vim-operator-highlight
+[submodule "vim/bundle/vim-sayonara"]
+	path = vim/bundle/vim-sayonara
+	url = https://github.com/mhinz/vim-sayonara

+ 1 - 0
vim/bundle/vim-sayonara

@@ -0,0 +1 @@
+Subproject commit 357135ce127581fab2c0caf45d4b3fec4603aa77

+ 1 - 5
vimrc

@@ -65,8 +65,7 @@ inoremap <C-s> <C-o>:Save<CR>
 vnoremap <C-s> <C-o>:Save<CR>
 
 " CTRL+w to close the current buffer
-nnoremap <silent> <C-w> :bd<CR>
-
+nnoremap <silent> <C-w> :Sayonara<CR>
 nnoremap <silent> <S-w> :hide<CR>
 
 " Buffer magic
@@ -349,9 +348,6 @@ au BufRead,BufNewFile *.go set filetype=go
 au BufRead,BufNewFile *.xsd set filetype=xml
 au BufRead,BufNewFile *.wsdl set filetype=xml
 
-" Close current window or quit vim if no active windows
-autocmd BufDelete * if len(filter(range(1, bufnr('$')), '!empty(bufname(v:val)) && buflisted(v:val)')) == 1 | q | endif
-
 " For auto-aligning Cucumber tables
 inoremap <silent> <Bar>   <Bar><Esc>:call <SID>align()<CR>a
 function! s:align()