Please bear with us as we work to restore functionality to dotfiles.org.
set nocompatible
filetype on
filetype plugin on
filetype indent on
" color
syntax on
colorscheme metacosm
set background=dark
set showmatch
" hightlight bad format
highlight BadFormat ctermbg=darkred guibg=darkred
match BadFormat /\s\+$\| \+\t\|\%>80v.\+/
" tabs
set tabstop=8
set shiftwidth=8
set softtabstop=8
set noexpandtab
set smarttab
set textwidth=80
set nowrap
" python specific
autocmd FileType python set expandtab tabstop=4 shiftwidth=4 softtabstop=4
let python_highlight_all=1
" indent
set autoindent
set smartindent
set cindent
" interface
ru mswin.vim
" show the cursor position at all times
set ruler
" show line numbers
set number
" xterm title
set title
" no beeps on error messages
set noerrorbells
" enable mouse usage (all modes) in terminals
set mouse=a
" font
set guifont=Terminus\ 14
" search
set incsearch
set nohlsearch
set ignorecase
set smartcase
set history=1000
" enable backspacing over everything
set backspace=2
set writeany
set autowriteall
" allow movement to another buffer without saving the current one
set hidden
" show an error window when there are errors
cwindow
" use the tab completion menu
set wildmenu
" file ecncoding
set fileencodings=utf-8,cp1251
" git grep
func GitGrep(...)
let save = &grepprg
set grepprg=git\ grep\ -n\ $*
let s = 'grep'
for i in a:000
let s = s . ' ' . i
endfor
exe s
let &grepprg = save
endfun
command -nargs=? G call GitGrep()
func GitGrepWord()
normal! "zyiw
call GitGrep('-w -e ', getreg('z'))
endf
" HOTKEYS
" git greep
nmap :call GitGrepWord()
imap :call GitGrepWord()i
" prev buffer
nmap :bp
imap :bpi
" next buffer
nmap :bn
imap :bni
" make
nmap :make!
imap :make!i
" errors
nmap :copen
imap :copeni
" next
nmap :cn
imap :cni
" prev
nmap :cp
imap :cpi
" file browse
nmap :Ex
imap :Exi