Browse Source

adding features

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

+ 4
- 7
plugin/makecols.vim View File

@ -77,9 +77,9 @@ function! s:convert_selection_vert()
let old_selection = split(selection, ",") let old_selection = split(selection, ",")
let lines = len(old_selection) let lines = len(old_selection)
let rows = lines / g:makecols_cols let rows = lines / g:makecols_cols
echo "Rows " . rows
echom "Rows " . rows
let calc_rows = float2nr(round(rows)) let calc_rows = float2nr(round(rows))
echo "Calc Rows " . calc_rows
echom "Calc Rows " . calc_rows
let @z = "" let @z = ""
" For Loopage Goes here " For Loopage Goes here
@ -105,7 +105,7 @@ endfunction
function! s:replace_selected_text(converted_text) function! s:replace_selected_text(converted_text)
let @z = a:converted_text let @z = a:converted_text
execute "normal! \"zP" execute "normal! \"zP"
echom "Just replaced the selection."
" echom "Just replaced the selection."
let @z = "" let @z = ""
return "" return ""
endfunction endfunction
@ -123,15 +123,12 @@ function! s:makecols(orient, cols) range
else else
let g:makecols_cols = a:cols let g:makecols_cols = a:cols
endif endif
echom "Orientation: " . g:makecols_orientation
echom "Number of Columns: " . g:makecols_cols
echom "Orient: " . g:makecols_orientation . ", No Cols: " . g:makecols_cols
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"
return s:beep() return s:beep()
else
echo "You are in the right mode"
endif endif
let converted_text = s:convert_selection() let converted_text = s:convert_selection()

Loading…
Cancel
Save