Created
June 8, 2014 01:35
-
-
Save ken1flan/8de7f0a9fb903e8860d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.bundle')) | |
endif | |
NeoBundle 'gmarik/vundle' | |
" githubリポジトリにあるもの | |
NeoBundle 'tpope/vim-fugitive' | |
NeoBundle 'Lokaltog/vim-easymotion' | |
NeoBundle 'rstacruz/sparkup', {'rtp': 'vim/'} | |
NeoBundle 'tpope/vim-rails.git' | |
NeoBundle 'scrooloose/nerdtree' | |
NeoBundle 'mitechie/pyflakes-pathogen' | |
NeoBundle 'sontek/rope-vim' | |
NeoBundle "Shougo/neocomplcache" | |
NeoBundle 'nathanaelkane/vim-indent-guides' | |
"NeoBundle has('lua') ? 'Shougo/neocomplete' : 'Shougo/neocomplecache' | |
NeoBundle 'Shougo/neocomplecache' | |
" vim-scripts repos | |
NeoBundle 'L9' | |
NeoBundle 'FuzzyFinder' | |
" githubリポジトリ以外 | |
NeoBundle 'git://git.wincent.com/command-t.git' | |
filetype plugin indent on | |
let g:indent_guides_enable_on_vim_startup=1 | |
let g:indent_guides_start_level = 1 | |
let g:indent_guides_guide_size = &tabstop | |
if neobundle#is_installed('neocomplete') | |
" =============== neocomplete | |
"Note: This option must set it in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)! | |
" Disable AutoComplPop. | |
let g:acp_enableAtStartup = 0 | |
" Use neocomplete. | |
let g:neocomplete#enable_at_startup = 1 | |
" Use smartcase. | |
let g:neocomplete#enable_smart_case = 1 | |
" Set minimum syntax keyword length. | |
let g:neocomplete#sources#syntax#min_keyword_length = 3 | |
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*' | |
" Define dictionary. | |
let g:neocomplete#sources#dictionary#dictionaries = { | |
\ 'default' : '', | |
\ 'vimshell' : $HOME.'/.vimshell_hist', | |
\ 'scheme' : $HOME.'/.gosh_completions' | |
\ } | |
" Define keyword. | |
if !exists('g:neocomplete#keyword_patterns') | |
let g:neocomplete#keyword_patterns = {} | |
endif | |
let g:neocomplete#keyword_patterns['default'] = '\h\w*' | |
" Plugin key-mappings. | |
inoremap <expr><C-g> neocomplete#undo_completion() | |
inoremap <expr><C-l> neocomplete#complete_common_string() | |
" Recommended key-mappings. | |
" <CR>: close popup and save indent. | |
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> | |
function! s:my_cr_function() | |
"return neocomplete#close_popup() . "\<CR>" | |
" For no inserting <CR> key. | |
return pumvisible() ? neocomplete#close_popup() : "\<CR>" | |
endfunction | |
" <TAB>: completion. | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
" <C-h>, <BS>: close popup and delete backword char. | |
inoremap <expr><C-h> neocomplete#smart_close_popup()."\<C-h>" | |
inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>" | |
inoremap <expr><C-y> neocomplete#close_popup() | |
inoremap <expr><C-e> neocomplete#cancel_popup() | |
" Close popup by <Space>. | |
"inoremap <expr><Space> pumvisible() ? neocomplete#close_popup() : "\<Space>" | |
" For cursor moving in insert mode(Not recommended) | |
"inoremap <expr><Left> neocomplete#close_popup() . "\<Left>" | |
"inoremap <expr><Right> neocomplete#close_popup() . "\<Right>" | |
"inoremap <expr><Up> neocomplete#close_popup() . "\<Up>" | |
"inoremap <expr><Down> neocomplete#close_popup() . "\<Down>" | |
" Or set this. | |
"let g:neocomplete#enable_cursor_hold_i = 1 | |
" Or set this. | |
"let g:neocomplete#enable_insert_char_pre = 1 | |
" AutoComplPop like behavior. | |
"let g:neocomplete#enable_auto_select = 1 | |
" Shell like behavior(not recommended). | |
"set completeopt+=longest | |
"let g:neocomplete#enable_auto_select = 1 | |
"let g:neocomplete#disable_auto_complete = 1 | |
"inoremap <expr><TAB> pumvisible() ? "\<Down>" : "\<C-x>\<C-u>" | |
" Enable omni completion. | |
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS | |
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags | |
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS | |
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete | |
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags | |
" Enable heavy omni completion. | |
if !exists('g:neocomplete#sources#omni#input_patterns') | |
let g:neocomplete#sources#omni#input_patterns = {} | |
endif | |
"let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\h\w*\|\h\w*::' | |
"let g:neocomplete#sources#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' | |
"let g:neocomplete#sources#omni#input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' | |
" For perlomni.vim setting. | |
" https://github.com/c9s/perlomni.vim | |
let g:neocomplete#sources#omni#input_patterns.perl = '\h\w*->\h\w*\|\h\w*::' | |
" =============== /neocomplete | |
endif | |
if neobundle#is_installed('neocomplcache') | |
let g:neocomplcache_enable_at_startup = 1 | |
let g:neocomplcache_enable_ignore_case = 1 | |
let g:neocomplcache_enable_smart_case = 1 | |
if !exists('g:neocomplcache_keyword_patterns') | |
let g:neocomplcache_keyword_patterns = {} | |
endif | |
let g:neocomplcache_keyword_patterns._ = '\h\w*' | |
let g:neocomplcache_enable_camel_case_completion = 1 | |
let g:neocomplcache_enable_underbar_completion = 1 | |
function! s:my_cr_function() | |
"return neocomplcache#smart_close_popup() . "\<CR>" | |
" For no inserting <CR> key. | |
return pumvisible() ? neocomplcache#close_popup() : "\<CR>" | |
endfunction | |
endif | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<S-TAB>" | |
"markdown | |
NeoBundle 'plasticboy/vim-markdown' | |
NeoBundle 'kannokanno/previm' | |
NeoBundle 'tyru/open-browser.vim' | |
au BufRead,BufNewFile *.md set filetype=markdown |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment