Skip to content

Instantly share code, notes, and snippets.

@philcms1
Created June 3, 2016 19:04
Show Gist options
  • Save philcms1/a72ee2093e0e5611c0b966a5a7d34d7e to your computer and use it in GitHub Desktop.
Save philcms1/a72ee2093e0e5611c0b966a5a7d34d7e to your computer and use it in GitHub Desktop.
VIM configuration
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
"My bundles
" Bundle 'scrooloose/nerdtree'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'bling/vim-airline'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'
Plugin 'sjl/gundo.vim'
" Plugin 'nvie/vim-flake8'
" Bundle 'ervandew/supertab'
Plugin 'davidhalter/jedi-vim'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'pangloss/vim-javascript'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'Raimondi/delimitMate'
Plugin 'scrooloose/syntastic'
Plugin 'Valloric/YouCompleteMe'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
let mapleader=","
" Display status line
set laststatus=2
set t_Co=256
syntax on
" set background=dark
" colorscheme distinguished
filetype on
" set statusline=%{fugitive#statusline()}
set noswapfile
set shiftwidth=4
set softtabstop=4
set expandtab
set foldmethod=indent
set foldlevel=99
imap <C-c> <CR><Esc>O
" NERDTree
" nmap <leader>n :NERDTreeToggle<CR>
" let NERDTreeShowHidden=1
" let NERDTreeIgnore = ['.pyc', '.idea']
" CtrlP
nnoremap <leader>t :CtrlP<cr>
nnoremap <leader>b :CtrlPBuffer<cr>
" Fugitive
nmap <leader>gs :Gstatus<CR>
nmap <leader>gw :Gwrite<CR>
nmap <leader>gc :Gcommit<CR>
" Gundo
map <leader>gt :GundoToggle<CR>
" flake8
" autocmd BufWritePost *.py call Flake8()
" Supertab
" let g:SuperTabDefaultCompletionType = "context"
" Jedi
let g:jedi#popup_on_dot = 0
" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" highlighting with *
set hls
" Execute Python
nnoremap <buffer> <F9> :exec '!python' shellescape(@%, 1)<cr>
" Snipmate remapped to C-j
" imap <C-j> <Plug>snipMateNextOrTrigger smap <C-j> <Plug>snipMateNextOrTrigger
" Toggle between paste/nopaste
set pastetoggle=<F10>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment