Skip to content

Instantly share code, notes, and snippets.



Last active Sep 4, 2019
What would you like to do?
" .vimrc file (must be named _vimrc)
execute pathogen#infect()
set ts=4 shiftwidth=4 "tab wdith set to 2 or 4
set expandtab
"colorscheme evening
syntax on
filetype on
autocmd FileType javascript setlocal ts=2 sw=2
" set column markers at 80 and 100 lines
autocmd BufWinEnter * highlight ColorColumn ctermbg=red
autocmd BufWinEnter * :call matchadd('ColorColumn', '\%81v', 100)
autocmd BufWinEnter * :call matchadd('ColorColumn', '\%101v', 100)
" high light when searching
set incsearch
"ignore case when searching except when upper case is specified
set ignorecase
set smartcase
"auto indent
set ai
"autocmd vimenter * Tagbar
autocmd vimenter * NERDTree
autocmd vimenter * wincmd w
let NERDTreeWinSize=26
let tagbar_width=26
"map window move to alt-up/down
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
"Pressing K will prepare to vimgrep the word in current folder
nnoremap K :vimgrep "<C-R><C-W>" *
" this opens small window when doing grep/vimgrep
augroup qf
autocmd QuickFixCmdPost [^l]* cwindow
autocmd QuickFixCmdPost l* cwindow
autocmd VimEnter * cwindow
augroup END
" needed for tmux colors
set background=dark
" nerdtree doesn't render on crouton without this
set encoding=utf-8
" highlight trailing whitespace
autocmd BufWinEnter * highlight ExtraWhitespace ctermbg=red guibg=red
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd FileType python map <buffer> <F7> :call flake8#Flake8()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment