Skip to content

Instantly share code, notes, and snippets.

@VincentTam
Last active January 10, 2017 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VincentTam/1b06e24ed55ab2dafcf3 to your computer and use it in GitHub Desktop.
Save VincentTam/1b06e24ed55ab2dafcf3 to your computer and use it in GitHub Desktop.
My VIMRC on USB
set nocompatible
filetype off
let iCanHazVundle=1
let vundle_readme=expand("~/.vim/bundle/vundle/README.md")
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
let iCanHazVundle=0
endif
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Plugin 'gmarik/vundle'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-unimpaired'
Plugin 'vim-latex/vim-latex'
Plugin 'ingo-library'
Plugin 'visualrepeat'
Plugin 'junegunn/vim-easy-align'
Plugin 'kana/vim-textobj-user'
Plugin 'kana/vim-textobj-lastpat'
Plugin 'bronson/vim-visual-star-search'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'loremipsum'
Plugin 'DrawIt'
if iCanHazVundle == 0
echo "Installing Plugins, please ignore key map error messages"
echo ""
:PluginInstall
endif
filetype plugin indent on
" Setting up Vundle - the vim plugin bundler end
set hlsearch
set incsearch
set ignorecase smartcase
set smartindent
set expandtab
set shiftwidth=4 " indent 4 space char
set tabstop=8
set softtabstop=4 " indent 4 space char
set textwidth=70
set encoding=utf-8
set fileformat=unix
set history=200
augroup textCompletion
au!
au Filetype html,markdown,text inoremap <buffer> ( ()<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> (( (
au Filetype html,markdown,text inoremap <buffer> () ()<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> [ []<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> [[ [
au Filetype html,markdown,text inoremap <buffer> [] []<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> { {}<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> {{ {
au Filetype html,markdown,text inoremap <buffer> {} {}<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> '' ''<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> "" ""<++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> < <<Left><Right>><++><Left><Left><Left><Left><Left>
au Filetype html,markdown,text inoremap <buffer> << <
au Filetype markdown inoremap <buffer> `` ``<++><Left><Left><Left><Left><Left>
au Filetype markdown inoremap <buffer> ** **<++><Left><Left><Left><Left><Left>
augroup END
augroup specIndent
au!
au Filetype tex,markdown,css,scss,html,javascript,vim setlocal shiftwidth=2
augroup END
set pastetoggle=<F5>
nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
" LaTeX-Suite settings start
set shellslash
set grepprg=grep\ -nH\ $*
let g:tex_flavor='latex'
let g:Tex_DefaultTargetFormat='pdf'
let g:Tex_CompileRule_pdf='xelatex -interaction=nonstopmode $*'
let g:Tex_MultipleCompileFormats='dvi,pdf'
let g:Tex_ViewRule_pdf = '/c/Program\ Files\ \(x86\)/Adobe/Reader\ 11.0/Reader/AcroRd32.exe'
" Vim-easy-align settings start
" 140201: From the official 1-min guide
" Start interactive EasyAlign in visual mode
vmap <Enter> <Plug>(EasyAlign)
" Start interactive EasyAlign with a Vim movement
nmap <Leader>a <Plug>(EasyAlign)
" Vim-easy-align settings end
" http://superuser.com/a/634327
let &t_ti.="\e[1 q"
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment