Skip to content

Instantly share code, notes, and snippets.

@volgar1x
Created August 28, 2013 16:31
Show Gist options
  • Save volgar1x/6368066 to your computer and use it in GitHub Desktop.
Save volgar1x/6368066 to your computer and use it in GitHub Desktop.
"GistID:6368066
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-fugitive'
Bundle 'Valloric/YouCompleteMe'
Bundle 'Blackrush/vim-gocode'
Bundle 'dgryski/vim-godef'
Bundle 'scrooloose/nerdtree'
Bundle 'jistr/vim-nerdtree-tabs'
Bundle 'scrooloose/syntastic'
Bundle 'altercation/vim-colors-solarized'
Bundle 'railscasts'
Bundle 'baskerville/bubblegum'
Bundle 'nanotech/jellybeans.vim'
Bundle 'jiangmiao/auto-pairs'
Bundle 'groovy.vim'
Bundle 'tfnico/vim-gradle'
Bundle 'derekwyatt/vim-scala'
Bundle 'SirVer/ultisnips'
Bundle 'kien/ctrlp.vim'
Bundle 'bling/vim-airline'
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
Bundle 'mattn/emmet-vim'
Bundle 'TwitVim'
Bundle 'majutsushi/tagbar'
Bundle 'airblade/vim-gitgutter'
Bundle 'mattn/emmet-vim'
Bundle 'jaxbot/github-issues.vim'
Bundle 'mbbill/undotree'
Bundle 'godlygeek/tabular'
set background=dark
colorscheme jellybeans
let g:airline_theme='jellybeans'
let g:airline_powerline_fonts=1
if has("gui_running")
set guifont=Inconsolata\ for\ Powerline\ 11
set guioptions-=m " disable menu bar
set guioptions-=T " disable tool bar
set guioptions-=rL " disable scrollbars
endif
set backspace=2 "enable backspace
filetype plugin indent on " required!
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
let g:ycm_autoclose_preview_window_after_completion=0
let g:nerdtree_tabs_open_on_console_startup=1
let g:NERDTreeShowBookmarks=1
let g:NERDTreeChDirMode=2 " change CWD whenever the tree root is changed
let g:NERDTreeMouseMode=2 " need only one click to open directory by double click to open file
let g:NERDTreeWinSize=35 " default 31
let g:godef_split=2 " golang GoToDef in a new tab
let g:syntastic_enable_signs=1
let g:airline#extensions#syntastic#enabled=1
let g:airline#extensions#tagbar#enabled=1
let g:airline#extensions#branch#enabled=1
let g:airline#extensions#whitespace#enabled=0
let g:AutoPairsFlyMode=1
let g:UltiSnipsExpandTrigger="<c-y>"
let g:UltiSnipsJumpForwardTrigger="<c-y>"
let g:UltiSnipsJumpBackwardTrigger="<c-u>"
let g:gist_detect_filetype=1
let g:gist_open_browser_after_post=1
let g:gist_browser_command='firefox %URL%'
let g:gist_update_on_write=2
let g:twitvim_enable_python=1
let g:twitvim_browser_cmd='firefox'
" autocmd BufEnter * nested :call tagbar#autoopen(0) " auto open tagbar in each tab
let g:tagbar_width=31 " default 40
let g:tagbar_autofocus=1
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
" toggle tagbar window
nnoremap <silent> <F9> :TagbarToggle<CR>
" delete current line
nmap <C-k> dd
imap <C-k> <Esc><C-k>i
" duplicate current line
nmap <C-d> yyp<CR><Up>
imap <C-d> <Esc><C-d>i
" previous tab Alt+Left
nmap <M-Left> :tabp<CR>
imap <M-Left> <Esc><A-Left>i
" next tab Alt+Right
nmap <M-Right> :tabn<CR>
imap <M-Right> <Esc><A-Right>i
" paste
nmap <C-V> "+gP
imap <C-V> <Esc><C-V>i<Right>
" Go to left window (ie go to NERDTree window)
nmap <C-Left> :wincmd h<CR>
imap <C-Left> <Esc><C-Left>
nmap <C-Right> :wincmd l<CR>
imap <C-Right> <Esc><C-Right>i
" Enable CtrlP in insert mode
imap <C-P> <Esc><C-P>
" go to definition
nmap <C-n> gd
imap <C-n> <Esc><C-n>i
" move current line one line upwards
nmap <M-Up> :m .-2<CR>
imap <M-Up> <Esc><M-Up>i
" move current line one line downwards
nmap <M-Down> :m .+1<CR>
imap <M-Down> <Esc><M-Down>i
" new tab
nmap <C-n> :tabnew<CR>
imap <C-n> <Esc><C-n>i
" close tab
nmap <C-w> :tabclose<CR>
imap <C-w> <Esc><C-w>i
" enable syntax highlighting
syntax on
" display line numbers
set nu
" enable mouse usage
set mouse=a
" reduce latency when switching from insert to normal mode
set ttimeoutlen=50
" set tab size to 4 spaces
set tabstop=4
set shiftwidth=4
set softtabstop=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment