" randomuser's vimrc " sacred nnoremaps {{{ nnoremap ; : nnoremap : ; " }}} " misc settings {{{ let mapleader=" " set nocompatible wildmenu path+=** syntax enable filetype plugin on if has('nvim') nmap s ;source ~/.config/nvim/init.vim else nmap s ;source ~/.vimrc endif " }}} " displays {{{ set number set numberwidth=3 set statusline=%#PmenuSel#%y%m\ %.20f%<%=b%02n:l%03l:c%03c " }}} " netrw {{{ let g:netrw_banner=0 let g:netrw_liststyle=3 let g:netrw_winsize=15 let g:netrw_browse_split=1 nmap oe :Vexplore " }}} " file opening {{{ nmap ob ;edit ~/.bashrc if has('nvim') nmap ov ;edit ~/.config/nvim/init.vim else nmap ov ;edit ~/.vimrc endif nmap ow ;edit ~/.config/vimb/config nmap os ;edit ~/.config/vimb/style.css nmap oz ;edit ~/.config/zathura/zathurarc nmap ot ;edit ~/.config/bspwm/bspwmrc nmap ok ;edit ~/.config/sxhkd/sxhkdrc " helpfiles nmap he ;help " }}} " file execution {{{ " makefiles {{{ nmap mm ;!make nmap mc ;!make clean nmap mf ;!make "%" nmap mi ;!make install " }}} " shell script {{{ nmap ss ;!sh "%" nmap sb ;!bash "%" nmap sz ;!zsh "%" " }}} " }}} " tab & fold settings {{{ " hacky exemption thing " make sure to not populate this too much let exemptions = ["gophermap", "Makefile"] let tmp = 0 for exemption in exemptions " does this match the current file name if expand("%:t") != exemption let tmp = tmp + 1 endif endfor " does the file match? if tmp != 0 set expandtab set tabstop=2 set shiftwidth=2 retab endif set list set listchars=eol:`,tab:>-,trail:~,extends:<,precedes:> set foldmethod=marker " }}} " buffers & tabs {{{ nmap bn ;bn nmap bp ;bp nmap bc ;clo nmap tn ;tabnext nmap tp ;tabprev nmap t1 ;tabfirst nmap tc ;tabc nmap tt ;tabnew " }}} " information {{{ nmap iw ;!curl -s http://wttr.in/?0qT nmap id ;!date nmap se ;setlocal spell spelllang=en_us nmap sd ;setlocal nospell " }}}