Last active
August 29, 2015 14:20
-
-
Save rhblind/b2d93b3526a35cba6336 to your computer and use it in GitHub Desktop.
My .vimrc file
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
" Global settings | |
set hidden | |
set nocompatible | |
filetype off | |
" Vundle settings | |
" See https://github.com/gmarik/Vundle.vim for info. | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' " let Vundle manage Vundle | |
Plugin 'duythinht/inori' " color scheme | |
Plugin 'flazz/vim-colorschemes' " a huge collection of color schemes | |
Plugin 'Raimondi/delimitMate' " enable auto completion for braces | |
Plugin 'tomtom/tcomment_vim' " comments plugin | |
Plugin 'yegappan/mru' " recent history | |
Plugin 'scrooloose/nerdtree' " filesystem tree support | |
Plugin 'tpope/vim-fugitive' " git integration | |
Plugin 'szw/vim-ctrlspace' " workspace support | |
Plugin 'klen/python-mode' " python mode | |
" Plugin 'SirVer/ultisnips' " snippets engine... | |
" Plugin 'honza/vim-snippets' " ... and the actual ultisnips snippets | |
Plugin 'scrooloose/syntastic' " syntax helper | |
Plugin 'powerline/powerline', {'rtp': 'powerline/bindings/vim/'} | |
call vundle#end() | |
" NERDTree settings | |
let NERDTreeIgnore = ['\.pyc$'] | |
" CTRLSpace settings | |
let g:ctrlspace_height = 10 " minimal height | |
let g:ctrlspace_save_workspace_on_exit = 1 " save workspace on exit | |
let g:ctrlspace_save_workspace_on_switch = 1 " save workspace on switch | |
let g:ctrlspace_load_last_workspace_on_start = 1 " load last workspace on start | |
let g:ctrlspace_cache_dir = '~/.vim/.cs_cache/' " ctrlspace cache | |
lef g:ctrlspace_ignored_files += *.pyc | |
" Syntastic settings | |
" set statusline+=%#warningmsg# | |
" set statusline+=%{SyntasticStatuslineFlag()} | |
" set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
" Ultisnips settings | |
" let g:UltiSnipsExpandTrigger="<c-enter>" | |
" let g:UltiSnipsJumpForwardTrigger="<c-n>" | |
" let g:UltiSnipsJumpBackwardTrigger="<c-b>" | |
" let g:UltiSnipsEditSplit="vertical" " split window vertical for :UltiSnipsEdit | |
" Python mode settings | |
let g:pymode_rope = 1 " enable rope (python refactoring) | |
let g:pymode_doc = 1 " enable documentation support | |
let g:pymode_key = 'K' | |
let g:pymode_lint = 1 " enable linting | |
let g:pymode_lint_checker = "[pyflakes,pep8]" | |
let g:pymode_lint_write = 1 " perform lint checking on save | |
let g:pymode_virtualenv = 1 " enable support for virtualenv | |
let g:pymode_breakpoint = 1 " enable breakpoint plugin | |
let g:pymode_breakpoint_bind = '<leader>b' " set breakpoint key binding | |
let g:pymode_syntax = 1 " enable syntax highlighting | |
let g:pymode_syntax_all = 1 | |
let g:pymode_syntax_indent_errors = g:pymode_syntax_all | |
let g:pymode_syntax_space_errors = g:pymode_syntax_all | |
let g:pymode_folding = 0 " don't autofold code | |
" Auto commands | |
augroup vimrc_autocommands | |
autocmd! | |
" open NERDTree if vim is opened with no file | |
" autocmd StdinReadPre * let s:std_in=1 | |
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
" Python stuff | |
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black " highlight characters past column 129 | |
autocmd FileType python match Excess /\%120v.*/ | |
autocmd FileType python set nowrap " never wrap lines in python | |
augroup END | |
" Color and fonts | |
colorscheme molokai | |
syntax enable | |
set guifont=Menlo\ for\ Powerline:h12 " download from https://github.com/abertsch/Menlo-for-Powerline | |
set laststatus=2 " always display the status line | |
" Global settings | |
set mouse=a " enable mouse scrolling | |
set autoindent " enable autoindent | |
set autochdir " automatically change window's cwd to the currently opened file | |
set smartindent " do smart indenting | |
set expandtab " insert spaces instead of tabs | |
set smarttab " when on a <TAB> in front of a line insert `shiftwidth` number of spaces | |
set softtabstop=4 " number of spaces <TAB> counts for in editing operations | |
set tabstop=4 " number of spaces to insert for <TAB> | |
set shiftwidth=4 " number of spaces to use for each autoindent | |
set nowrap " disable line wrapping | |
set showmatch " match braces | |
set matchtime=3 " match braces time | |
set undolevels=100 " undo levels | |
set incsearch " do incremental searching | |
set number " show line numbers | |
set modeline " If 'modeline' is on 'modelines' gives the number of lines that is checked for set commands. | |
set guioptions-=RLrl " hide scrollbars | |
set guioptions-=T " hide toolbar | |
set guioptions-=l " hide left scrollbar | |
set guioptions-=L " hide left scrollbar even if there is a vertical split | |
set guioptions-=r " hide right scrollbar | |
set guioptions-=R " hide right scrollbar even if there is a vertical split | |
set noeb vb t_vb= " disable error bells, visualbells | |
set wildignore+="*.pyc" " ignore patte ignore pattern | |
" More subtle popup colors if running with GUI | |
if has ('gui_running') | |
highlight Pmenu guibg=#cccccc gui=bold | |
endif | |
" Keybindings | |
let mapleader = "," " remap <leader> to ',' | |
nmap <leader>- :TComment<CR>| " map comment action to <leader>+dash | |
nmap <leader>nt :NERDTreeToggle<CR>| " open NERDTree with ',nt' | |
nmap <S-Tab> <<| " decrease indent with <SHIFT-TAB> in normal mode | |
imap <S-Tab> <Esc><<i| " decrease indent with <SHIFT-TAB> in visual mode | |
nmap <leader>l :set list!<CR>| " use <leader>l to toggle display of whitespaces | |
" Move lines up or down using <C-j> or <C-k> | |
nnoremap <C-j> :m .+1<CR>==| " move one line up in normal mode | |
nnoremap <C-k> :m .-2<CR>==| " move one line down in normal mode | |
inoremap <C-j> <ESC>:m .+1<CR>==gi| " move one line up in insert mode | |
inoremap <C-k> <ESC>:m .-2<CR>==gi| " move one line down in insert mode | |
vnoremap <C-j> :m '>+1<CR>gv=gv| " move one line up in visual mode | |
vnoremap <C-k> :m '<-2<CR>gv=gv| " move one line down in visual mode | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment