Skip to content

Commit 37f00d0

Browse files
committed
Add settings for mitchlloyd
1 parent d2d3677 commit 37f00d0

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

bash/aliases.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ alias br="bundle exec rake"
33
alias be="bundle exec"
44
alias nombom="rm -rf tmp/ dist/ node_modules/ bower_components && npm i && bower i"
55
alias g="git"
6+
alias es="ember serve"
7+
alias es!="killall ember && ember serve"

users/mitchlloyd/vimrc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
" Let comma work as the leader key
2+
:nmap , ;
3+
4+
" Another way to get to the previous buffer. <leader><leader> won't work here
5+
" because after leader is pressed the first time, the second key press
6+
" registers as a ';' due to the mapping above.
7+
noremap ,, :b#<CR>
8+
9+
" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
10+
nmap <M-j> mz:m+<cr>`z
11+
nmap <M-k> mz:m-2<cr>`z
12+
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
13+
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
14+
15+
if has("mac") || has("macunix")
16+
nmap <D-j> <M-j>
17+
nmap <D-k> <M-k>
18+
vmap <D-j> <M-j>
19+
vmap <D-k> <M-k>
20+
endif
21+
22+
" These settings currently conflict with other Pear settings. Uncomment in
23+
" case of emergency.
24+
25+
" Map Nerd Tree to ctrl-n
26+
"map <C-n> :NERDTreeToggle<CR>
27+
28+
" Quickly rename and reload a file
29+
"function! RenameFile()
30+
" let old_name = expand('%')
31+
" let new_name = input('New file name: ', expand('%'), 'file')
32+
" if new_name != '' && new_name != old_name
33+
" exec ':saveas ' . new_name
34+
" exec ':silent !rm ' . old_name
35+
" redraw!
36+
" endif
37+
"endfunction
38+
"map <Leader>r :call RenameFile()<cr>
39+
40+
" Set cursor context to something smaller
41+
"set scrolloff=7
42+
43+
" Turn backups off
44+
"set nobackup
45+
"set nowb
46+
"set noswapfile

vimrc

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Plugin 'SirVer/ultisnips'
5252
" see https://github.com/easymotion/vim-easymotion
5353
Plugin 'easymotion/vim-easymotion'
5454
Plugin 'leafgarland/typescript-vim'
55+
Plugin 'maxbrunsfeld/vim-yankstack'
5556

5657
" Hit <tab> to expand a snippet, and ctrl-j and -k to move forward and
5758
" backward between the tab stops in the snippet
@@ -91,6 +92,10 @@ noremap <C-j> <C-W>j
9192
noremap <C-k> <C-W>k
9293
noremap <C-l> <C-W>l
9394
95+
" Open new split panes to right and bottom, which feels more natural
96+
set splitbelow
97+
set splitright
98+
9499
" prev buffer
95100
noremap <leader>s :b#<CR>
96101
@@ -102,7 +107,7 @@ noremap <leader>b :CtrlPBuffer<CR>
102107
103108
" leader-f opens Ag searching
104109
let g:ag_prg="ag --vimgrep --ignore ^bower_components --ignore ^node_modules --ignore ^tmp --ignore ^dist"
105-
noremap <leader>f :Ag
110+
noremap <leader>f :Ag
106111
107112
" mappings for fugitive
108113
" leader-gs opens git status
@@ -213,6 +218,12 @@ set directory+=.
213218
" viminfo stores the the state of your previous editing session
214219
set viminfo+=n~/.vim/viminfo
215220

221+
" Return to last edit position when opening files
222+
autocmd BufReadPost *
223+
\ if line("'\"") > 0 && line("'\"") <= line("$") |
224+
\ exe "normal! g`\"" |
225+
\ endif
226+
216227
if exists("+undofile")
217228
" undofile - This allows you to use undos after exiting and restarting
218229
" This, like swap and backups, uses .vim-undo first, then ~/.vim/undo
@@ -250,3 +261,27 @@ let g:airline#extensions#branch#enabled = 0
250261

251262
" Enable mouse, option-click for normal clicks
252263
set mouse=a
264+
265+
" Set spell checking for markdown
266+
autocmd BufRead,BufNewFile *.md setlocal spell
267+
268+
" Don't break word boundaries by hyphen
269+
set isk+=-
270+
271+
" Disable Ex mode
272+
map Q <Nop>
273+
274+
" Update bufferes when a file is changed from the outside
275+
set autoread
276+
277+
" Set windows to a minimum width when moving into them
278+
set winwidth=79
279+
280+
" Configure backspace so that it keeps deleting
281+
set backspace=eol,start,indent
282+
283+
" Show matching brackets when text indicator is over them
284+
set showmatch
285+
286+
" Enable settings for special snowflake users
287+
"source ~/.pear/users/mitchlloyd/vimrc

0 commit comments

Comments
 (0)