Skip to content

Commit

Permalink
Use <silent> mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
wellle committed Dec 16, 2015
1 parent d90881b commit 2ddecd2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions plugin/visual-split.vim
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
" normal mode mappings set operator functions
nnoremap <C-W>gr :<C-u>set operatorfunc=<SID>opgr<CR>g@
nnoremap <C-W>gss :<C-u>set operatorfunc=<SID>opgss<CR>g@
nnoremap <C-W>gsa :<C-u>set operatorfunc=<SID>opgsa<CR>g@
nnoremap <C-W>gsb :<C-u>set operatorfunc=<SID>opgsb<CR>g@
" TODO: make these silent?
nnoremap <silent> <C-W>gr :<C-u>set operatorfunc=<SID>opgr<CR>g@
nnoremap <silent> <C-W>gss :<C-u>set operatorfunc=<SID>opgss<CR>g@
nnoremap <silent> <C-W>gsa :<C-u>set operatorfunc=<SID>opgsa<CR>g@
nnoremap <silent> <C-W>gsb :<C-u>set operatorfunc=<SID>opgsb<CR>g@
" operator functions trigger visual mappings
function! s:opgr(type, ...)
Expand All @@ -27,10 +28,10 @@ function! s:op(trigger)
endfunction

" visual mappings execute commands
xnoremap <C-W>gr :VSResize<CR>
xnoremap <C-W>gss :VSSplit<CR>
xnoremap <C-W>gsa :VSSplitAbove<CR>
xnoremap <C-W>gsb :VSSplitBelow<CR>
xnoremap <silent> <C-W>gr :VSResize<CR>
xnoremap <silent> <C-W>gss :VSSplit<CR>
xnoremap <silent> <C-W>gsa :VSSplitAbove<CR>
xnoremap <silent> <C-W>gsb :VSSplitBelow<CR>
" commands call functions
command! -range VSResize call <SID>resize(<line1>, <line2>)
Expand Down

0 comments on commit 2ddecd2

Please sign in to comment.