aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2013-07-28 14:51:36 +0800
committerLAN-TW <lantw44@gmail.com>2013-07-28 14:51:36 +0800
commitc2f14734f7a0696e6db908e877d16458b6bed128 (patch)
treecf3fe8ea32fa7b9a4c8a79b8fc177e78b4b6300a /vimrc
parentddd97930b8ea1cd105ddc1218ceb8237191cc573 (diff)
downloadconfigfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar
configfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar.gz
configfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar.bz2
configfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar.lz
configfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar.xz
configfile-c2f14734f7a0696e6db908e877d16458b6bed128.tar.zst
configfile-c2f14734f7a0696e6db908e877d16458b6bed128.zip
bash_include: 自動下載設定檔 | vimrc: neocomplete 外掛、GTK+ 語法標記vimrc-20130728bash_include-20130728
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc25
1 files changed, 24 insertions, 1 deletions
diff --git a/vimrc b/vimrc
index 83357bf..7882112 100644
--- a/vimrc
+++ b/vimrc
@@ -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")