From 851110035ddb0a1437950194dd64edd4a8839819 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Thu, 19 Sep 2013 14:46:57 +0200 Subject: [PATCH] Add Ctrl-P config + thrift filetype --- .vimrc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.vimrc b/.vimrc index e4e7694..0c67a81 100644 --- a/.vimrc +++ b/.vimrc @@ -79,7 +79,7 @@ nnoremap t :set noexpandtab nnoremap T :set expandtab " Yank the line, comment it, paste it -nmap g yygccp +nmap g yypgcc " When jumping to a given line, center the screen nnoremap G Gzz @@ -124,7 +124,11 @@ nnoremap รง :set guifont=Deja\ Vu\ Sans\ Mono\ 11 " double percentage sign in command mode is expanded " to directory of current file - http://vimcasts.org/e/14 cnoremap %% =expand('%:h').'/' -map p :CtrlP %% + +" Ctrl-P config +let g:ctrlp_working_path_mode = 'ra' " search for files from the nearest ancestor that contains a VCS +let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files'] " list only files versionned within GIT +map p :CtrlP " semantic selection expansion/shrink map + (expand_region_expand) @@ -166,6 +170,7 @@ else au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,.emacs,.sawfishrc,*.pddl setf lisp endif +au BufRead,BufNewFile *.thrift setfiletype thrift " move the current line up or down with the Ctrl-arrow keys nmap :move .+1 @@ -273,5 +278,7 @@ set completeopt=menuone,menu,longest,preview " close the buffer without deleting its window ":runtime bundle/bclose.vim -nmap :bc Kwbd +" nmap :bc Kwbd +" nmap d :b#bd# +" nmap :bc :b#bd#