Browse Source

adding features

master
lolson 9 years ago
parent
commit
d1982d92ca
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      plugin/makecols.vim

+ 9
- 2
plugin/makecols.vim View File

@ -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 echom "Orientation: " . g:makecols_orientation
if exists(v:count)
let g:makecols_cols = v:count
endif
echom "Number of Columns: " . g:makecols_cols echom "Number of Columns: " . g:makecols_cols
echom "Specified no of Columns: " . v:count
let mode = visualmode() let mode = visualmode()
if (mode !=# "V") if (mode !=# "V")
echo "You must be in linewise visual mode" echo "You must be in linewise visual mode"
@ -81,6 +86,8 @@ endfunction
vnoremap <silent> mc :<C-U>call <SID>makecols()<CR> vnoremap <silent> mc :<C-U>call <SID>makecols()<CR>
vnoremap <silent> mch :<C-U>call <SID>makecols("horz")<CR>
vnoremap <silent> mcv :<C-U>call <SID>makecols("vert")<CR>
if !exists("g:makecols_orientation") || ! g:makecols_orientation if !exists("g:makecols_orientation") || ! g:makecols_orientation
let g:makecols_orientation = "horz" let g:makecols_orientation = "horz"

Loading…
Cancel
Save