diff options
author | LAN-TW <lantw44@gmail.com> | 2013-07-28 14:51:36 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-07-28 14:51:36 +0800 |
commit | c2f14734f7a0696e6db908e877d16458b6bed128 (patch) | |
tree | cf3fe8ea32fa7b9a4c8a79b8fc177e78b4b6300a /vimrc | |
parent | ddd97930b8ea1cd105ddc1218ceb8237191cc573 (diff) | |
download | configfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar.gz configfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar.zst configfile-c2f14734f7a0696e6db908e877d16458b6bed128.zip |
bash_include: 自動下載設定檔 | vimrc: neocomplete 外掛、GTK+ 語法標記vimrc-20130728bash_include-20130728
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -5,6 +5,7 @@ let $CFLAGS="-Wall -pipe -g" let $LDFLAGS="" let g:quick_fix_window_on = 0 let g:plugins_enabled = 0 +let g:use_neocomplete = 0 set bs=2 set ls=2 set ts=4 @@ -45,6 +46,13 @@ function! ToggleQuickFixWindow() endif endfunction +function! LoadGtkSyntaxFiles() + for i in ['atk', 'atspi', 'cairo', 'clutter', 'dbusglib', 'evince', 'gdkpixbuf', 'gimp', 'glib', 'gnomedesktop', 'gobjectintrospection', 'gstreamer', 'gtk2', 'gtk3', 'gtkglext', 'gtksourceview', 'jsonglib', 'libgsf', 'libnotify', 'librsvg', 'libsoup', 'libunique', 'libwnck', 'pango', 'poppler', 'vte', 'xlib' ] + execute 'runtime! syntax/' . i . '.vim' + execute 'let ' . i . '_deprecated_errors = 1' + endfor +endfunction + map <F1> :set foldmethod=syntax map <F2> :call ToggleQuickFixWindow()<CR> map <F3> :cp<CR> @@ -90,11 +98,26 @@ if g:plugins_enabled call vundle#rc() Bundle 'gmarik/vundle' Bundle 'Lokaltog/powerline' - Bundle 'Valloric/YouCompleteMe' Bundle 'majutsushi/tagbar' Bundle 'scrooloose/nerdtree' Bundle 'othree/html5.vim' Bundle 'tkztmk/vim-vala' + Bundle 'gtk-vim-syntax' + if g:use_neocomplete + Bundle 'Shougo/neocomplete.vim' + Bundle 'Shougo/vimproc' + Bundle 'Shougo/context_filetype.vim' + let g:neocomplete#enable_at_startup = 1 + let g:neocomplete#enable_auto_select = 1 + let g:neocomplete#enable_insert_char_pre = 1 + let g:neocomplete#enable_fuzzy_completion = 1 + let g:neocomplete#max_list = 10 + let g:neocomplete#data_directory = "~/tmp/neocomplete" + else + Bundle 'Valloric/YouCompleteMe' + endif + au FileType c call LoadGtkSyntaxFiles() + au FileType cpp call LoadGtkSyntaxFiles() endif if has("cscope") |