diff --git a/.bashrc b/.bashrc index 0f94613..f12bbac 100644 --- a/.bashrc +++ b/.bashrc @@ -44,6 +44,8 @@ Darwin) ;; esac +alias tree="tree -C -I vendor" + if [ -f "$HOME/.localrc" ]; then source "$HOME/.localrc" fi diff --git a/.vimrc b/.vimrc index d980be9..4425e1c 100644 --- a/.vimrc +++ b/.vimrc @@ -65,7 +65,7 @@ set nobackup " disable temporary files. set nowritebackup set noswapfile set updatetime=750 " wait 750ms after typing for updates. default is 4000 -set hidden " hide buffers instead of closing them +" set hidden " hide buffers instead of closing them set visualbell " don't beep set noerrorbells " don't beep @@ -106,6 +106,7 @@ endif if has("autocmd") filetype plugin indent on " Enable file type detection. +:q " Put these in an autocmd group, so that we can delete them easily. augroup vimrcEx @@ -135,7 +136,7 @@ if has("autocmd") " causes VIM to enter the directory of the file being edited to simplify " finding related files. - autocmd BufEnter * cd %:p:h + autocmd BufEnter * silent! lcd %:p:h " add proper coloring for my .localrc file au BufNewFile,BufRead .localrc call SetFileTypeSH("bash") @@ -153,19 +154,19 @@ if has("multi_byte") endif " Shortcut to show invisible characters -nmap l :set list! +nnoremap l :set list! """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " tab navigation helpers """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " ctrl-k to go to the next tab -map :tabn +noremap :tabn " ctrl-j to go to the previous tab -map :tabp +noremap :tabp " ctrl-n to open a new tab with the current file -map :tabnew % +noremap :tabnew % -nmap n :set nu! +nnoremap n :set nu! " press escape twice to clear highlight search nnoremap :nohlsearch @@ -179,10 +180,10 @@ let g:SuperTabClosePreviewOnPopupClose = 1 let g:go_fmt_fail_silently = 1 " move by visual lines when mapping instead of physical lines -noremap k gk -noremap j gj -noremap 0 g0 -noremap $ g$ +noremap k gk +noremap j gj +noremap 0 g0 +noremap $ g$ let g:ctrlp_map = '' let g:ctrlp_cmd = 'CtrlP' @@ -207,4 +208,11 @@ let g:rooter_targets = '/' " new command mode command: w!! " allows you to sudo write the file you're currently editing without closing " (and thus losing) your changes. -cmap w!! w !sudo tee % >/dev/null +cnoremap w!! w !sudo tee % >/dev/null + +" leader ev to edit your vim rc +nnoremap ev :vsplit $MYVIMRC + +nnoremap sv :source $MYVIMRC + +iabbrev @@ @jordanorelli