Skip to content

Commit

Permalink
Add settings for mitchlloyd
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchlloyd committed Mar 2, 2016
1 parent d2d3677 commit 37f00d0
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bash/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
46 changes: 46 additions & 0 deletions users/mitchlloyd/vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
" Let comma work as the leader key
:nmap , ;
" Another way to get to the previous buffer. <leader><leader> 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#<CR>
" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
nmap <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
if has("mac") || has("macunix")
nmap <D-j> <M-j>
nmap <D-k> <M-k>
vmap <D-j> <M-j>
vmap <D-k> <M-k>
endif

" These settings currently conflict with other Pear settings. Uncomment in
" case of emergency.

" Map Nerd Tree to ctrl-n
"map <C-n> :NERDTreeToggle<CR>

" 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 <Leader>r :call RenameFile()<cr>

" Set cursor context to something smaller
"set scrolloff=7

" Turn backups off
"set nobackup
"set nowb
"set noswapfile
37 changes: 36 additions & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <tab> to expand a snippet, and ctrl-j and -k to move forward and
" backward between the tab stops in the snippet
Expand Down Expand Up @@ -91,6 +92,10 @@ noremap <C-j> <C-W>j
noremap <C-k> <C-W>k
noremap <C-l> <C-W>l
" Open new split panes to right and bottom, which feels more natural
set splitbelow
set splitright

" prev buffer
noremap <leader>s :b#<CR>
Expand All @@ -102,7 +107,7 @@ noremap <leader>b :CtrlPBuffer<CR>
" leader-f opens Ag searching
let g:ag_prg="ag --vimgrep --ignore ^bower_components --ignore ^node_modules --ignore ^tmp --ignore ^dist"
noremap <leader>f :Ag
noremap <leader>f :Ag
" mappings for fugitive
" leader-gs opens git status
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 <Nop>
" 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

0 comments on commit 37f00d0

Please sign in to comment.