]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vim/vimrc
vim: vimrc: prefer fzf over CtrlP
[config/dotfiles.git] / vim / vimrc
index bb7ac1e3f59b81979ab9d9905e5a3530062496e1..86c1e706e8263965107374ae908d8795fbd682eb 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -946,6 +946,16 @@ if has('eval')
     " Only highlight the current placeholder.
     let g:xptemplate_highlight = 'current'
 
+" Fzf settings
+
+    " Use FZF if available
+    if executable('fzf')
+        nmap <C-P> :FZF<CR>
+
+        " Disable CtrlP
+        let g:ctrlp_map = ''
+    endif
+
 " CtrlP settings.
     " Don't manage the working directory (the default setting is too slow for
     " me).
@@ -1072,21 +1082,21 @@ if has('autocmd')
         autocmd FileType vimperator setlocal commentstring=\"%s
 " Use TeX compiler for (La)TeX files.
         autocmd FileType tex compiler tex
+" Go always uses tabs for indentation.
+        autocmd FileType go call <SID>UseTabs()
 
 " FTDETECT AUTO COMMANDS
 
 " Recognize .test as Tcl files.
         autocmd BufRead,BufNewFile *.test set filetype=tcl
+" /etc/network/interfaces
+        autocmd BufRead,BufNewFile /etc/network/interfaces set filetype=interfaces
 
 " OTHER AUTO COMMANDS
 
 " Disable spell checking, displaying of list characters and long lines when
 " viewing documentation.
         autocmd BufReadPost /usr/share/doc/* setlocal nospell nolist | 2match
-
-" Use diff filetype for mercurial patches in patch queue.
-        autocmd BufReadPost */.hg/patches/* set filetype=diff
-
     augroup END
 endif