diff --git a/bash/aliases.sh b/bash/aliases.sh index ea2fb9c..c1d9779 100644 --- a/bash/aliases.sh +++ b/bash/aliases.sh @@ -3,3 +3,5 @@ alias br="bundle exec rake" alias be="bundle exec" alias nombom="rm -rf tmp/ dist/ node_modules/ bower_components && npm i && bower i" alias g="git" +alias es="ember serve" +alias es!="killall ember && ember serve" diff --git a/users/mitchlloyd/vimrc b/users/mitchlloyd/vimrc new file mode 100644 index 0000000..2db94a7 --- /dev/null +++ b/users/mitchlloyd/vimrc @@ -0,0 +1,46 @@ +" Let comma work as the leader key +:nmap , ; + +" Another way to get to the previous buffer. won't work here +" because after leader is pressed the first time, the second key press +" registers as a ';' due to the mapping above. +noremap ,, :b# + +" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac +nmap mz:m+`z +nmap mz:m-2`z +vmap :m'>+`mzgv`yo`z +vmap :m'<-2`>my` + nmap + vmap + vmap +endif + +" These settings currently conflict with other Pear settings. Uncomment in +" case of emergency. + +" Map Nerd Tree to ctrl-n +"map :NERDTreeToggle + +" Quickly rename and reload a file +"function! RenameFile() +" let old_name = expand('%') +" let new_name = input('New file name: ', expand('%'), 'file') +" if new_name != '' && new_name != old_name +" exec ':saveas ' . new_name +" exec ':silent !rm ' . old_name +" redraw! +" endif +"endfunction +"map r :call RenameFile() + +" Set cursor context to something smaller +"set scrolloff=7 + +" Turn backups off +"set nobackup +"set nowb +"set noswapfile diff --git a/vimrc b/vimrc index 83ee1cb..3343185 100644 --- a/vimrc +++ b/vimrc @@ -52,6 +52,7 @@ Plugin 'SirVer/ultisnips' " see https://github.com/easymotion/vim-easymotion Plugin 'easymotion/vim-easymotion' Plugin 'leafgarland/typescript-vim' +Plugin 'maxbrunsfeld/vim-yankstack' " Hit to expand a snippet, and ctrl-j and -k to move forward and " backward between the tab stops in the snippet @@ -91,6 +92,10 @@ noremap j noremap k noremap l +" Open new split panes to right and bottom, which feels more natural +set splitbelow +set splitright + " prev buffer noremap s :b# @@ -102,7 +107,7 @@ noremap b :CtrlPBuffer " leader-f opens Ag searching let g:ag_prg="ag --vimgrep --ignore ^bower_components --ignore ^node_modules --ignore ^tmp --ignore ^dist" -noremap f :Ag +noremap f :Ag " mappings for fugitive " leader-gs opens git status @@ -213,6 +218,12 @@ set directory+=. " viminfo stores the the state of your previous editing session set viminfo+=n~/.vim/viminfo +" Return to last edit position when opening files +autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + if exists("+undofile") " undofile - This allows you to use undos after exiting and restarting " This, like swap and backups, uses .vim-undo first, then ~/.vim/undo @@ -250,3 +261,27 @@ let g:airline#extensions#branch#enabled = 0 " Enable mouse, option-click for normal clicks set mouse=a + +" Set spell checking for markdown +autocmd BufRead,BufNewFile *.md setlocal spell + +" Don't break word boundaries by hyphen +set isk+=- + +" Disable Ex mode +map Q + +" Update bufferes when a file is changed from the outside +set autoread + +" Set windows to a minimum width when moving into them +set winwidth=79 + +" Configure backspace so that it keeps deleting +set backspace=eol,start,indent + +" Show matching brackets when text indicator is over them +set showmatch + +" Enable settings for special snowflake users +"source ~/.pear/users/mitchlloyd/vimrc