Last active
September 4, 2019 05:18
-
-
Save kaykurokawa/c4d82b443ae2a047a04e8a2e73de252c to your computer and use it in GitHub Desktop.
.vimrc
This file contains 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
" .vimrc file (must be named _vimrc) | |
"pathogen | |
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! | |
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