From d1982d92ca157658c57d5662a99ff6e24b6e0383 Mon Sep 17 00:00:00 2001 From: lolson Date: Fri, 10 Jul 2015 15:38:07 -0500 Subject: [PATCH] adding features --- plugin/makecols.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugin/makecols.vim b/plugin/makecols.vim index b362bbe..3c53160 100644 --- a/plugin/makecols.vim +++ b/plugin/makecols.vim @@ -62,10 +62,15 @@ endfunction -function! s:makecols() range +function! s:makecols(orient) range + if exists(a:orient) + let g:makecols_orientation = a:orient + endif echom "Orientation: " . g:makecols_orientation + if exists(v:count) + let g:makecols_cols = v:count + endif echom "Number of Columns: " . g:makecols_cols - echom "Specified no of Columns: " . v:count let mode = visualmode() if (mode !=# "V") echo "You must be in linewise visual mode" @@ -81,6 +86,8 @@ endfunction vnoremap mc :call makecols() +vnoremap mch :call makecols("horz") +vnoremap mcv :call makecols("vert") if !exists("g:makecols_orientation") || ! g:makecols_orientation let g:makecols_orientation = "horz"