" Section Mappings {{{ " remap esc inoremap jk " markdown to html nmap md :%!markdown --html4tags " remove extra whitespace nmap :%s/\s\+$ " wipout buffer nmap b :bw " shortcut to save nmap , :w " disable Ex mode noremap Q " set paste toggle set pastetoggle= " toggle paste mode map v :set paste! " edit ~/.config/nvim/init.vim map ev :e! ~/.config/nvim/init.vim " edit gitconfig map eg :e! ~/.gitconfig " clear highlighted search noremap :set hlsearch! hlsearch? " activate spell-checking alternatives nmap ;s :set invspell spelllang=en " toggle invisible characters set invlist set listchars=tab:?\ ,eol:¬,trail:·,extends:?,precedes:? highlight SpecialKey ctermbg=none " make the highlighting of tabs less annoying set showbreak=? nmap l :set list! " Textmate style indentation vmap [ ] >gv nmap [ << nmap ] >> " switch between current and last buffer nmap . " enable . command in visual mode vnoremap . :normal . map :call WinMove('h') map :call WinMove('j') map :call WinMove('k') map :call WinMove('l') map wc :wincmd q " toggle cursor line nnoremap i :set cursorline! " scroll the viewport faster nnoremap 3 nnoremap 3 " moving up and down work as you would expect nnoremap j gj nnoremap k gk nnoremap ^ g^ nnoremap $ g$ " search for word under the cursor nnoremap / "fyiw :/f " inoremap =Smart_TabComplete() map r :call RunCustomCommand() " map s :call SetCustomCommand() let g:silent_custom_command = 0 " helpers for dealing with other people's code nmap \t :set ts=4 sts=4 sw=4 noet nmap \s :set ts=4 sts=4 sw=4 et nmap w :setf textile :Goyo " }}}