" Change the global leader to the space bar let mapleader = ' ' " ================== Top row nnoremap q :Files nnoremap e :set nu! nnoremap r :call matchadd('OverLength', '\%101v', 100) nnoremap t :OverCommandLine%s/ nnoremap y :bn nnoremap u w nnoremap i nnoremap o nnoremap p " ================== Middle row nnoremap a :NERDTreeToggle nnoremap d :TagbarToggle nnoremap f :VimFiler nnoremap g :set hlsearch! " Easily jump between lines in all open files nnoremap j :Lines nnoremap k :Buffers " Easily open new files in horizontal and vertical splits nnoremap ; :split w :Files nnoremap ' :vsplit w :Files " ================== Bottom row nnoremap v :Ack! "\b\b" nnoremap n o nnoremap m O " Bind the right beautify function based on what file is open autocmd FileType javascript nnoremap b :call JsBeautify() autocmd FileType json nnoremap b :call JsonBeautify() autocmd FileType jsx nnoremap b :call JsxBeautify() autocmd FileType html nnoremap b :call HtmlBeautify() autocmd FileType css nnoremap b :call CSSBeautify() " Easily enter 'zen mode' with Goyo and Pencil " We have to explicitly set vertsplit again since Goyo resets it for some reason nnoremap 2 :PencilSoft:Goyo:hi vertsplit ctermfg=8 ctermbg=none nnoremap 3 :mksession! ~/.vim_session nnoremap 4 :source ~/.vim_session