From 3df051919736ad68ebfdb294551b9357b61aff7c Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 14 Jan 2012 19:46:03 -0500 Subject: Initial commit --- .vimrc | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .vimrc (limited to '.vimrc') diff --git a/.vimrc b/.vimrc new file mode 100644 index 00000000..8d962cc3 --- /dev/null +++ b/.vimrc @@ -0,0 +1,101 @@ +" Load pathogen +runtime bundle/vim-pathogen/autoload/pathogen.vim +call pathogen#infect() + +" Remap leader to , +noremap \ , +let mapleader = "," + +" General +set backspace=indent,eol,start +set hidden +set backup +set history=50 +set ruler +set showcmd +set incsearch +set ignorecase +set smartcase +set autoindent +set smartindent +set nu +set spell +set cc=80 +set title +set shortmess=atI +set visualbell t_vb= +set cursorline +set smarttab +set hlsearch +set list +set listchars=tab:»·,trail:· + +set laststatus=2 " Always show statusline +set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P + +syntax on +colorscheme Tomorrow-Night + +" Enable mouse in terminals +if has('mouse') + set mouse=a +endif + +" GUI options +set guioptions-=tT " Disable tear-off menus and toolbar +set guifont=Monospace\ 9 +set browsedir=buffer " Open dialog starts in working directory + +" Jump to the last cursor position when opening +autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + +" Default to 2-space indents, 4-character tabs +set expandtab +set shiftwidth=2 +set tabstop=4 +filetype plugin indent on + +" Indentation exceptions +autocmd FileType c setlocal sw=4 +autocmd FileType cpp setlocal sw=4 + +" Better tab-complete when opening +set wildmenu +set wildmode=list:longest +set wildignore=*.o,*.d,*~ + +" Smarter % +runtime macros/matchit.vim + +" Disable visible whitespace in insert mode +autocmd InsertEnter * setlocal nolist +autocmd InsertLeave * setlocal list + +" Custom maps +let g:buffergator_suppress_keymaps=1 + +nnoremap ' ` +nnoremap ` ' + +nmap n :silent :nohlsearch " Clear search highlights +nmap s :set list! " Toggle visible whitespace + +nmap p "+p +nmap P "+P +nmap y "+y +nmap Y "+Y +nmap d "+d +nmap D "+D + +imap " Insert hard tab + +nmap Q gq + +nmap t :NERDTreeToggle +nmap b :BuffergatorToggle + +" Custom commands +command! W :w -- cgit 1.4.1