From cf8590b8ef7a82a4477b18d4565c915f213937e4 Mon Sep 17 00:00:00 2001 From: yushyin Date: Sat, 5 Sep 2015 02:52:22 +0200 Subject: Vim: Set several neobundle hooks for plugins --- vim/plugrc/clang_complete.rc.vim | 5 +++++ vim/plugrc/vimfiler.rc.vim | 6 ++++++ vim/vimrc | 18 ++++++++---------- 3 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 vim/plugrc/clang_complete.rc.vim create mode 100644 vim/plugrc/vimfiler.rc.vim diff --git a/vim/plugrc/clang_complete.rc.vim b/vim/plugrc/clang_complete.rc.vim new file mode 100644 index 0000000..ef25e8d --- /dev/null +++ b/vim/plugrc/clang_complete.rc.vim @@ -0,0 +1,5 @@ +let g:clang_auto_select = 1 +let g:clang_snippets = 1 +let g:clang_snippets_engine = 'ultisnips' +let g:clang_complete_macros = 1 +let g:clang_complete_patterns = 1 diff --git a/vim/plugrc/vimfiler.rc.vim b/vim/plugrc/vimfiler.rc.vim new file mode 100644 index 0000000..3c80c47 --- /dev/null +++ b/vim/plugrc/vimfiler.rc.vim @@ -0,0 +1,6 @@ +let g:vimfiler_as_default_explorer = 1 +let g:vimfiler_tree_indentation = 1 +let g:vimfiler_tree_opened_icon = "▼" +let g:vimfiler_tree_closed_icon = "▷" +let g:vimfiler_readonly_file_icon = "⭤" +let g:vimfiler_marked_file_icon = '✓' diff --git a/vim/vimrc b/vim/vimrc index 57eb988..70ad18d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -20,14 +20,15 @@ let s:bundle_dir = $XDG_DATA_HOME . '/vim/bundle' let s:neobundle_dir = s:bundle_dir . '/neobundle.vim' let s:neobundle_repo = 'https://github.com/Shougo/neobundle.vim' let s:neobundle_toml = $XDG_CONFIG_HOME . '/vim/neobundle.toml' -let s:neobundle_plugrc = $XDG_CONFIG_HOME . '/vim/plugrc' +let s:plugrc = $XDG_CONFIG_HOME . '/vim/plugrc' let g:neobundle#cache_file = $XDG_CACHE_HOME . '/vim/neobundlecache' let &runtimepath.=','.s:neobundle_dir + try call neobundle#begin(s:bundle_dir) -catch /E117/ " neobundle not installed +catch /E117:/ " neobundle not installed execute "!mkdir -p " . s:neobundle_dir - execute "!git clone " s:neobundle_repo . " " . s:neobundle_dir + execute "!git clone " . s:neobundle_repo . " " . s:neobundle_dir call neobundle#begin(s:bundle_dir) call neobundle#load_toml(s:neobundle_toml, {}) NeoBundleInstall @@ -50,11 +51,12 @@ if neobundle#tap('unite.vim') nnoremap r :UniteResume \ -no-start-insert \ -force-redraw - let neobundle#hooks.on_source = s:neobundle_plugrc . '/unite.rc.vim' + let neobundle#hooks.on_source = s:plugrc . '/unite.rc.vim' call neobundle#untap() endif if neobundle#tap('vimfiler.vim') - let g:vimfiler_as_default_explorer = 1 + let neobundle#hooks.on_source = s:plugrc . '/vimfiler.rc.vim' + call neobundle#untap() endif if neobundle#tap('ultisnips') let g:UltiSnipsForwardTrigger = "" @@ -62,11 +64,7 @@ if neobundle#tap('ultisnips') call neobundle#untap() endif if neobundle#tap('clang_complete') - let g:clang_auto_select = 1 - let g:clang_snippets = 1 - let g:clang_snippets_engine = 'ultisnips' - let g:clang_complete_macros = 1 - let g:clang_complete_patterns = 1 + let neobundle#hooks.on_source = s:plugrc . '/clang_complete.rc.vim' call neobundle#untap() endif if neobundle#tap('syntastic') -- cgit v1.2.3-24-g4f1b