Created
April 12, 2015 14:52
-
-
Save siddMahen/3462a7962181e02d7b70 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
set nocompatible | |
set backupdir=~/.vim/backups | |
set undofile | |
set undodir=~/.vim/undo " remember undos across sessions | |
set noswapfile | |
" ---------------------------------------------------------------------------- | |
" Text Formatting | |
" ---------------------------------------------------------------------------- | |
call pathogen#infect() " use pathogen | |
call pathogen#helptags() " call this when installing new plugins | |
syntax on " turn that syntax on | |
set autoindent " automatic indent new lines | |
set nosmartindent " don't be smart about it | |
set nowrap " do not wrap lines | |
set tabstop=4 " a tab is 4 spaces | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab " expand tabs to spaces | |
set smarttab | |
filetype plugin on " enable file specific indenting | |
filetype plugin indent on " indentation on | |
" ---------------------------------------------------------------------------- | |
" Remapping | |
" ---------------------------------------------------------------------------- | |
" lead with , | |
let mapleader = "," | |
let g:mapleader = "," | |
" exit to normal mode and visual mode with ',,' | |
inoremap <Leader><Leader> <ESC> | |
vnoremap <Leader><Leader> <ESC | |
" prevent wierd destructive things that I do sometimes | |
inoremap <C-W> <Nop> | |
inoremap <C-U> <Nop> | |
" easy saving, closing, dehighlighting and stripping | |
nnoremap <Leader>w :w!<CR> | |
nnoremap <Leader>wq :wq<CR> | |
nnoremap <Leader>q :q<CR> | |
nnoremap <Leader>s :FixWhitespace<CR> | |
nnoremap <Leader>h :noh<CR> | |
nnoremap <Leader>spell :set spell!<CR> | |
" quickly reformat pararaph | |
nnoremap <Leader>fft gq | |
vnoremap <Leader>fft gq | |
" faster deletion of text | |
" inoremap <Alt><C> <Backspace> | |
" remap arrow keys to learn vim | |
nnoremap <up> <nop> | |
nnoremap <down> <nop> | |
nnoremap <left> <nop> | |
nnoremap <right> <nop> | |
vnoremap <up> <nop> | |
vnoremap <down> <nop> | |
vnoremap <left> <nop> | |
vnoremap <right> <nop> | |
nnoremap / /\v | |
vnoremap / /\v | |
" faster scrolling | |
nnoremap <Space> <C-D> | |
nnoremap <Backspace> <C-U> | |
" ---------------------------------------------------------------------------- | |
" UI | |
" ---------------------------------------------------------------------------- | |
set showcmd " display incomplete commands | |
set lazyredraw " turn on lazy redraw | |
set background=light " I like my terminal dimmm | |
set number " line numbers | |
set numberwidth=2 " give me a gutter | |
set wildmenu " turn on wild menu | |
set wildmode=list:longest,full | |
set wildchar=<TAB> " set auto complete to <TAB> | |
set ch=1 " command line height | |
set backspace=2 " allow backspacing over everything in insert mode | |
set shortmess=filtIoOA " shorten messages | |
set report=0 " tell us about changes | |
set nostartofline " don't jump to the start of line when scrolling | |
" ---------------------------------------------------------------------------- | |
" Visual Cues | |
" ---------------------------------------------------------------------------- | |
set t_Co=256 " give me all 256 colors | |
set so=10 " 10 line when moving vertically | |
set showmatch " brackets/braces that is | |
set mat=5 " duration to show matching brace (1/10 sec) | |
set incsearch " do incremental searching | |
set laststatus=2 " always show the status line | |
set hlsearch " highlight searches | |
set incsearch " incremental search on | |
set noerrorbells " shut up | |
set novisualbell | |
set gdefault " makes :%s/foo/bar/ -> :%s/foo/bar/g | |
set colorcolumn=80 " show me a marker at the 80 char line | |
set ttyfast " be fast | |
set encoding=utf-8 | |
set spelllang=en_ca " gimme spellcheck! | |
set cursorline " show me a cursor line | |
set relativenumber | |
set foldmethod=manual " lines with the same indentation are folded | |
" together | |
" ---------------------------------------------------------------------------- | |
" Misc. Options | |
" ---------------------------------------------------------------------------- | |
set autowriteall " automatically save files when moving around | |
set title " set the title of the window to the file's title | |
"" Preferred highlights | |
"hi clear SpellBad | |
"hi clear SpellCap | |
"hi clear SpellLocal | |
"hi clear SpellRare | |
"hi clear StatusLine | |
"hi clear StatusLineNC | |
"hi clear ColorColumn | |
"hi clear LineNr | |
"hi clear NonText | |
"hi clear SpecialKey | |
"hi clear CursorLine | |
"hi clear CursorColumn | |
"hi clear Visual | |
"hi clear Normal | |
"hi clear Cursor | |
" | |
"" 52 = DarkRed | |
"" 52 = DarkPink | |
"" | |
" | |
"hi Normal ctermfg=none ctermbg=none cterm=none | |
"hi SpellBad ctermfg=53 ctermbg=none cterm=underline | |
"hi SpellCap ctermfg=53 ctermbg=none cterm=underline | |
"hi SpellLocal ctermfg=53 ctermbg=none cterm=underline | |
"hi SpellRare ctermfg=53 ctermbg=none cterm=underline | |
"hi StatusLine ctermfg=211 ctermbg=0 cterm=none | |
"hi StatusLineNC ctermfg=211 ctermbg=234 cterm=none | |
"hi ColorColumn ctermfg=none ctermbg=234 cterm=none | |
"hi LineNr ctermfg=224 ctermbg=0 cterm=none | |
"hi NonText ctermfg=59 ctermbg=none cterm=none | |
"hi SpecialKey ctermfg=59 ctermbg=none cterm=none | |
"hi CursorLine ctermfg=none ctermbg=234 cterm=none | |
"hi CursorColumn ctermfg=none ctermbg=234 cterm=none | |
"hi Visual ctermfg=0 ctermbg=212 cterm=none | |
"hi Folded ctermfg=none ctermbg=234 cterm=none | |
"hi Search ctermfg=214 ctermbg=none cterm=underline | |
"hi Error ctermfg=124 ctermbg=none cterm=underline | |
"hi Todo ctermfg=214 ctermbg=none cterm=underline | |
" Syntastic and Statusline | |
set statusline=%<%f\ %y%m%r | |
"truncate from the top, file name, file type, modification, RO | |
set statusline+=\ %{fugitive#statusline()} | |
"git information | |
set statusline+=\ %{SyntasticStatuslineFlag()} | |
"syntax information | |
set statusline+=%= | |
"left align the rest | |
set statusline+=Line\ %4.6l | |
"current line number | |
set statusline+=/%-4.6L | |
"file length | |
set statusline+=\ Col\ %-4c | |
let g:syntastic_enable_signs=0 "stops those annoying side things | |
let g:syntastic_quiet_warnings=1 "only show syntax errors | |
augroup file-type-vim | |
autocmd! | |
autocmd FileType vim setlocal foldmethod=marker | |
augroup END | |
augroup file-type-text | |
autocmd! | |
augroup END | |
colorscheme molokai | |
hi clear LineNr | |
hi clear StatusLine | |
hi StatusLine ctermbg=Black |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment