" Change the global leader to the space bar let mapleader = ' ' " ================== Top row 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 a :Files nnoremap d :TagbarToggle nnoremap f :Files nnoremap g :set hlsearch! " Easily jump between lines in all open files nnoremap j :Buffers nnoremap k :Lines " This is the same as f, but I haven't figured out which " letter I like using better yet nnoremap l :Files " 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