Skip to content

Instantly share code, notes, and snippets.

@grapeot
Last active December 11, 2015 08:58
Show Gist options
  • Save grapeot/4576917 to your computer and use it in GitHub Desktop.
Save grapeot/4576917 to your computer and use it in GitHub Desktop.
My .vimrc
" regular settings
syntax on
set si ai nu et
set shiftwidth=4
set tabstop=4
set bs=2
colorscheme wombat
set autochdir autoread autowrite
set incsearch ignorecase smartcase
set nobackup
set bs=indent,eol,start
set nocp
set ek ru sc
" gui related settings
set guifont=consolas:h16
set guioptions-=T
set guioptions-=r
set guioptions-=l
map <F2> :NERDTreeToggle<CR>
" key binding about window movement
set wmh=0
map <c-j> <c-w>j<c-w>_
map <c-k> <c-w>k<c-w>_
map <c-h> <c-w>h
map <c-l> <c-w>l
filetype plugin indent on
au BufRead,BufNewFile *.md set filetype=markdown
" latex-related settings
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'
map Y y$
command W w
command Q q
command WQ wq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment