Created
May 7, 2016 15:02
-
-
Save ambuc/b9d04e1f803a1b141f0215287d9cc9fc to your computer and use it in GitHub Desktop.
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
" CUSTOM .VIMRC by JAMES BUCKLAND | |
" james.adam.buckland@gmail.com | |
" created June 01 2014 | |
" :so % | |
" | |
"PLUGINS | |
call pathogen#infect() " enable pathogen extention handler | |
filetype plugin indent on " idk, something to do with plugins | |
set laststatus=2 " i'll be honest, i have no idea what this does. but it makes | |
" | |
" | |
" SYNTAX HIGHLIGHTING | |
syntax on " syntax highlighting | |
" | |
" | |
" LINE NUMBERS AND ORIENTATION | |
set number | |
" set relativenumber " line numbers become relative to cursor position | |
set scrolloff=999 " keeps the cursor in the middle of the screen | |
noremap zz :let &scrolloff=999-&scrolloff<CR> | |
"the above line toggles the vertical alignment | |
" | |
" | |
" CURSOR LINE HIGHLIGHTING | |
set cursorline | |
hi CursorLine cterm=NONE ctermbg=237 | |
"ctermfg=white | |
"set cursorcolumn | |
"hi CursorColumn cterm=NONE ctermbg=237 | |
"ctermfg=white | |
" | |
" | |
" TABS AND SPACES | |
set expandtab "tab becomes two spaces | |
set shiftwidth=2 " >>, << operations shift by 2 spaces | |
set softtabstop=2 " <Tab> shifts by 2 spaces | |
set tabstop=2 " a column is 2 spaces | |
" set expandtab " all tabs become spaces | |
" | |
" | |
" INDENTATION | |
set autoindent | |
set smartindent | |
" | |
" | |
"MISCELLANEOUS | |
map <space> viw | |
iabbrev @@ james.adam.buckland@gmail.com | |
set matchpairs+=<:> " match with % between <> pairs | |
set incsearch " enable incremental search | |
nnoremap ; : | |
" highlight OverLength ctermbg=darkred ctermfg=white guibg=#592929 | |
" match OverLength /\%81v.\+/ | |
set mouse=a "enable mouse | |
set autoread " reloads files on change | |
" | |
" | |
"COLOR | |
"let g:zenburn_high_Contrast=1 | |
colorscheme monokai-chris "monokai coloring | |
"colorscheme vydark "monokai coloring | |
" | |
" | |
"" AUGROUPS | |
augroup jade_compile | |
au! | |
autocmd BufWritePost *.jade :!jade --pretty % | |
augroup end | |
augroup coffeescript_compile | |
au! | |
autocmd BufWritePost *.coffee :!coffee --compile % | |
augroup end | |
augroup latex_compile | |
au! | |
autocmd BufWritePost *.tex :!pdflatex % | |
augroup end | |
" | |
" | |
"" TAB STUFF | |
set t_ut= | |
set showtabline=2 "show tab bar on top even if there is just one | |
set tabpagemax=25 "allow up to 25 tabs | |
cabbrev help tab help | |
set wildmenu " show autocomplete info in some places | |
set wildmode=list:longest,full " when autocompleting, first show all matches then cycle thru them | |
set showcmd "show partial commands as they are being typed | |
set hlsearch incsearch "search as you type and highlight matches | |
set ignorecase smartcase "search handles case sensitivity well | |
" | |
" | |
" UNDO | |
" Save and load undo history in a file | |
set undofile | |
set undodir=$HOME/.vim/undo | |
set undolevels=100 | |
set undoreload=1000 | |
" | |
" | |
"" LATEX | |
" 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 single file. This will confuse Latex-Suite. Set your grep | |
" program to always generate a file-name. | |
set grepprg=grep\ -nH\ $* | |
" optional: This enables automatic indentation as you type. | |
filetype indent on | |
" 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' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment