dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit ebca38128a4fa1c8d797ef0180998506d5e08b61
parent ae6fa59e0b572277611a6b203f4d78a9b6d9b36d
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Tue,  6 Feb 2018 05:38:55 -0500

Vim: Add Split command

Diffstat:
M.vim/vimrc | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/.vim/vimrc b/.vim/vimrc @@ -260,10 +260,12 @@ function! MyHelp(topic) endif endfunction -function! MyBuffer(buffer) +function! MyBuffer(...) let l:splitcmd = MyWinWidth() ? 'vsplit' : 'split' execute l:splitcmd - execute bufnr(a:buffer).'buffer' + if a:0 == 1 + execute bufnr(a:1).'buffer' + endif endfunction " }}} @@ -276,6 +278,7 @@ endif command! -complete=file -nargs=? New call MyNewWindow(<f-args>) command! -complete=help -nargs=1 Help call MyHelp(<f-args>) command! -complete=buffer -nargs=1 Buffer call MyBuffer(<f-args>) +command! Split call MyBuffer() " }}} " Auto-commands {{{