Skip to content

Instantly share code, notes, and snippets.

@aisensiy
Last active October 10, 2015 04:58
Show Gist options
  • Select an option

  • Save aisensiy/3637505 to your computer and use it in GitHub Desktop.

Select an option

Save aisensiy/3637505 to your computer and use it in GitHub Desktop.
vim config file
set nocompatible
filetype on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'honza/vim-snippets'
Bundle 'Shougo/neocomplcache'
"Bundle 'Shougo/neosnippet'
Bundle 'garbas/vim-snipmate'
" colortheme
Bundle 'nanotech/jellybeans.vim'
Bundle 'sickill/vim-monokai'
Bundle "daylerees/colour-schemes", { "rtp": "vim-themes/" }
Bundle "jaromero/vim-monokai-refined"
Bundle 'bling/vim-airline'
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
"Bundle "garbas/vim-snipmate"
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
let g:gist_detect_filetype = 1
let g:gist_open_browser_after_post = 1
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
Bundle 'kien/ctrlp.vim'
Bundle 'tpope/vim-surround'
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'tpope/vim-rails.git'
Bundle 'tpope/vim-endwise.git'
Bundle "pangloss/vim-javascript"
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
" "Bundle 'snipMate'
Bundle 'AutoClose'
Bundle 'godlygeek/tabular'
Bundle 'indenthtml.vim'
Bundle 'html5.vim'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'mattn/emmet-vim'
Bundle 'vim-coffee-script'
Bundle 'matchit.zip'
Bundle 'maksimr/vim-jsbeautify'
Bundle 'cakebaker/scss-syntax.vim'
Bundle 'myusuf3/numbers.vim'
filetype plugin indent on
filetype plugin on
set ofu=syntaxcomplete#Complete
set nu
set incsearch
set hlsearch
syntax on
set autoindent
set shiftwidth=2
set expandtab
set tabstop=2
set softtabstop=2
set cursorline cursorcolumn
" syntastic
let g:syntastic_check_on_open=1
set isk+=-
set list
set listchars=trail:.
autocmd bufwritepre * :%s/\s\+$//e
let g:gist_use_password_in_gitconfig = 1
let g:gist_detect_filetype = 1
nmap <F2> :NERDTreeToggle<CR>
nnoremap <F1> :NumbersToggle<CR>
set pastetoggle=<F3>
imap jj <Esc>
nmap { :tabp<CR>
nmap } :tabn<CR>
au BufNewFile,BufRead *.coffee set filetype=coffee
au BufNewFile,BufRead *.hbs set filetype=html
au BufNewFile,BufRead *.erb set filetype=html.eruby.erb
au BufNewFile,BufRead *.json set filetype=javascript
au BufNewFile,BufRead *.scss set filetype=scss.css
au BufNewFile,BufRead *.feature setl sw=2 sts=2 ts=2
au BufNewFile,BufRead *.js setl sw=2 sts=2 ts=2
au BufNewFile,BufRead *.less setl sw=2 sts=2 ts=2
au BufNewFile,BufRead *.css setl sw=2 sts=2 ts=2
au BufNewFile,BufRead *.html setl sw=2 sts=2 ts=2
au FileType ruby setl sw=2 sts=2 ts=2
"colorscheme jellybeans
"colorscheme Monokai
colorscheme Monokai-Refined
map <c-f> :call JsBeautify()<cr>
inoremap <A-l> <Right>
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
inoremap <Up> <Nop>
inoremap <Down> <Nop>
inoremap <Left> <Nop>
inoremap <Right> <Nop>
set completeopt=menuone,menu,longest,preview
runtime macros/matchit.vim
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
let g:EasyMotion_leader_key = '\'
"Note: This option must set it in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)!
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplcache.
let g:neocomplcache_enable_at_startup = 1
" Use smartcase.
let g:neocomplcache_enable_smart_case = 1
" Set minimum syntax keyword length.
let g:neocomplcache_min_syntax_length = 3
let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
" Enable heavy features.
" Use camel case completion.
"let g:neocomplcache_enable_camel_case_completion = 1
" Use underbar completion.
"let g:neocomplcache_enable_underbar_completion = 1
" Define dictionary.
let g:neocomplcache_dictionary_filetype_lists = {
\ 'default' : '',
\ 'vimshell' : $HOME.'/.vimshell_hist',
\ 'scheme' : $HOME.'/.gosh_completions'
\ }
" Define keyword.
if !exists('g:neocomplcache_keyword_patterns')
let g:neocomplcache_keyword_patterns = {}
endif
let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
" 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:neocomplcache_omni_patterns')
let g:neocomplcache_omni_patterns = {}
endif
let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)'
let g:neocomplcache_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'
" For perlomni.vim setting.
" https://github.com/c9s/perlomni.vim
let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::'
" Plugin key-mappings.
""imap <C-k> <Plug>(neosnippet_expand_or_jump)
""smap <C-k> <Plug>(neosnippet_expand_or_jump)
""xmap <C-k> <Plug>(neosnippet_expand_target)
""
""" SuperTab like snippets behavior.
""imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
""\ "\<Plug>(neosnippet_expand_or_jump)"
""\: pumvisible() ? "\<C-n>" : "\<TAB>"
""smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
""\ "\<Plug>(neosnippet_expand_or_jump)"
""\: "\<TAB>"
""
""" For snippet_complete marker.
""if has('conceal')
"" set conceallevel=2 concealcursor=i
""endif
""
""" Enable snipMate compatibility feature.
""let g:neosnippet#enable_snipmate_compatibility = 1
""
""" Tell Neosnippet about the other snippets
""let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment