Last active
September 6, 2015 05:41
-
-
Save AlskaPark/08bdba6727a91b0842b3 to your computer and use it in GitHub Desktop.
.vimrc
This file contains hidden or 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 encoding=utf8 | |
set nocompatible | |
filetype off | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'nathanaelkane/vim-indent-guides' | |
Plugin 'Shougo/neocomplcache.vim' | |
Plugin 'Shougo/neocomplcache-rsense.vim' | |
Plugin 'vim-ruby/vim-ruby' | |
Plugin 'tpope/vim-rails' | |
" All of your Plugins must be added before the following line | |
call vundle#end() | |
filetype plugin indent on | |
syntax on | |
set autoindent | |
set smartindent | |
set smarttab | |
set cindent | |
set nowrapscan | |
set nobackup | |
set nu | |
set ruler | |
set title | |
set autoread | |
set ai | |
set tabstop=2 | |
set shiftwidth=2 | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
set bg=dark | |
" autocomplete | |
let g:acp_enableAtStartup = 0 | |
let g:neocomplcache_enable_at_startup = 1 | |
let g:neocomplcache_enable_smart_case = 1 | |
let g:neocomplcache_min_syntax_length = 2 | |
let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*' | |
let g:neocomplcache_dictionary_filetype_lists = { | |
\ 'default' : '', | |
\ 'vimshell' : $HOME.'/.vimshell_hist', | |
\ 'scheme' : $HOME.'/.gosh_completions' | |
\ } | |
if !exists('g:neocomplcache_keyword_patterns') | |
let g:neocomplcache_keyword_patterns = {} | |
endif | |
let g:neocomplcache_keyword_patterns['default'] = '\h\w*' | |
inoremap <expr><C-g> neocomplcache#undo_completion() | |
inoremap <expr><C-l> neocomplcache#complete_common_string() | |
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> | |
function! s:my_cr_function() | |
return neocomplcache#smart_close_popup() . "\<CR>" | |
endfunction | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>" | |
inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>" | |
inoremap <expr><C-y> neocomplcache#close_popup() | |
inoremap <expr><C-e> neocomplcache#cancel_popup() | |
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 | |
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete | |
if !exists( 'g:neocomplcache_omni_patterns') | |
let g:neocomplcache_omni_patterns = {} | |
endif | |
let g:neocomplcache_omni_patterns.ruby = '[^. *\t\.\h\w*\|\h\w*::' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment