Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
" -----
" -----
set nocompatible
" Setup Vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Manage Plugins
Plugin 'gmarik/Vundle.vim'
Plugin 'myusuf3/numbers.vim'
Plugin 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
Plugin 'mfukar/robotframework-vim'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'sjl/gundo.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'mattn/webapi-vim'
Plugin 'mattn/gist-vim' " Depends on webapi-vim
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/syntastic'
Plugin 'majutsushi/tagbar'
Plugin 'jmcantrell/vim-virtualenv'
" End Setup of Vundle
call vundle#end()
filetype plugin indent on
syntax enable
set guioptions-=r
set guioptions-=m
set guioptions-=L
set guioptions-=T
set number
set colorcolumn=81
set textwidth=80
set visualbell
set list listchars=tab:__,trail:·,extends:>
set columns=81 " Set width of floating window.
set lines=67 " Set height of floating window.
set ch=1 " Set command window to hieght of 1.
" Indentation
set expandtab
set tabstop=4
set shiftwidth=4
set nowrap
set smartindent
set autoindent
set nosmarttab
" Search
set incsearch
set hlsearch
set ignorecase
" Behaviors
set backspace=2 " delete over linebreaks
set whichwrap+=<,>,h,l,[,] " movements over linebreaks
set report=0 " count lines yanked/deleted
let mapleader = ","
set foldmethod=indent " fold based on indent
set nofoldenable " don't fold by default
set foldlevel=1 " only close/open one foldlevel at a time
au BufWinLeave * silent! mkview " save view when closing buffer
au BufWinEnter * silent! loadview " load view when opening buffer
nnoremap ,cd :cd %:p:h<CR>:pwd<CR>
" set working directory to file's path
map <silent> <m-p> :lprevious <CR>
map <silent> <m-n> :lnext <CR>
" Disable Swap Files
set nobackup " do not keep backups after close
set nowritebackup " do not keep a backup while working
set noswapfile " don't keep swp files either
" Store Backup Elsewhere
set backupdir=$HOME/.vim/backup " store backups under ~/.vim/backup
set backupcopy=yes " keep attributes of original file
set backupskip=/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*
set directory=~/.vim/swap,~/tmp,. " keep swp files under ~/.vim/swap
" Powerline
set laststatus=2
set rtp+=/home/drobati/.local/lib/python2.7/site-packages/powerline/bindings/vim
" Style
set t_Co=256 " XTerm 256 color support.
if has('gui_running')
set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14
colorscheme Tomorrow
colorscheme Tomorrow-Night
" -------------------------
" -------------------------
" C++
set tags=./tags;/
" Python
" -----------------------
" -----------------------
" EasyMotion
let g:EasyMotion_do_mapping = 0 " Disable default mappings
nmap s <Plug>(easymotion-bd-w)
nmap t <Plug>(easymotion-t2)
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev)
map <Leader>l <Plug>(easymotion-lineforward)
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
map <Leader>h <Plug>(easymotion-linebackward)
let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
let g:EasyMotion_smartcase = 1 " type `l` and match `l`&`L`
let g:EasyMotion_use_smartsign_us = 1 " type `3` and match `3`&`#`
" Gist
"" sudo apt-get install xclip
let g:gist_clip_command = 'xclip -selection clipboard'
let g:gist_detect_filetype = 1
let g:gist_open_browser_after_post = 1
let g:gist_browser_command = 'firefox %URL%'
let g:gist_show_privates = 1
let g:gist_post_private = 1
" Syntastic
let g:syntastic_check_on_open=1
let g:syntastic_error_symbol='X'
let g:syntastic_warning_symbol='!'
let g:syntastic_auto_loc_list=2
let g:syntastic_loc_list_height=5
" Fugitive
nmap <leader>gs :Gstatus<cr>
" Tagbar
nmap <F8> :TagbarToggle<CR>
" Gundo
nnoremap <F5> :GundoToggle<CR>
" Ultisnips
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="vertical"
let g:ultisnips_python_style="google"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment