" My barebones vimrc without any Vundle dependencies. " " I'm attempting to optimize the following: " - Minimize dependencies " - Maximize ergonomics " - Maximize Tmux compatibility " - Minimize shadowing of existing Vim KBDs " " Warning: This is currently unstable as it is a work-in-progress. " " Author: William Carroll " Use as the leader key. let mapleader = " " nnoremap ev :tabnew:edit ~/.vimrc nnoremap sv :source ~/.vimrc nnoremap w :w nnoremap h :help " increment,decrement numbers nnoremap + " TODO: Restore with better KBD " nnoremap - " Visit the CWD nnoremap - :e . " Turn line numbers on. set number " Prevent lines from wrapping set nowrap " Easily create vertical, horizontal window splits. nnoremap sh :vsplit nnoremap sj :split:wincmd j nnoremap sk :split nnoremap sl :vsplit:wincmd l " Move across window splits. " TODO: Change to . nnoremap :wincmd h nnoremap :wincmd j nnoremap :wincmd k nnoremap :wincmd l " TODO: Support these. " nnoremap :q " nnoremap :wincmd h " nnoremap :wincmd j " nnoremap :wincmd k " nnoremap :wincmd l " Use instead of G to support: " 20 - to jump to line 20 " d20 - to delete from the current line until line 20 " 20 - to select from the current line until line 20 nnoremap G onoremap G vnoremap G " Easily change modes on keyboards that don't have CapsLock mapped to inoremap jk " CRUD tabs. nnoremap :tabnext nnoremap :tabprevious nnoremap :tabnew:edit . nnoremap :tabclose " TODO: Re-enable these once are supported. " nnoremap :+tabmove " nnoremap :-tabmove " Use H,L to goto beggining,end of a line. " Swaps the keys to ensure original functionality of H,L are preserved. nnoremap H ^ nnoremap L $ nnoremap ^ H nnoremap $ L " Use H,L in visual mode too vnoremap H ^ vnoremap L $ vnoremap ^ H vnoremap $ L " Emacs hybrid mode " TODO: model this after tpope's rsi.vim (Readline-style insertion) cnoremap cnoremap inoremap ^ inoremap $ inoremap h inoremap l " Indenting " The following three settings are based on option 2 of `:help tabstop` set tabstop=4 set shiftwidth=4 set expandtab set autoindent