@@ -52,6 +52,7 @@ Plugin 'SirVer/ultisnips'
5252" see https://github.com/easymotion/vim-easymotion
5353Plugin ' easymotion/vim-easymotion'
5454Plugin ' 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
9192noremap <C-k> <C-W> k
9293noremap <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
95100noremap <leader> s :b#<CR>
96101
@@ -102,7 +107,7 @@ noremap <leader>b :CtrlPBuffer<CR>
102107
103108" leader-f opens Ag searching
104109let 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
214219set 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+
216227if 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
252263set 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