Diff for vimconfig/vim/plugin/increment.vim between version 1.1 and 1.2
| version 1.1, 2002/03/21 20:36:15 |
version 1.2, 2002/03/23 17:09:56 |
| Line 86 function! IncrementColumn(pad, ...) |
|
| Line 86 function! IncrementColumn(pad, ...) |
|
| let c2 = col("'>") |
let c2 = col("'>") |
| let c1v = virtcol("'<") |
let c1v = virtcol("'<") |
| let c2v = virtcol("'>") |
let c2v = virtcol("'>") |
| |
if c1 + c2 + c1v + c2v == 0 " little trick to test, if there is c1 = c2 = c1v = c2v = 0 |
| |
echo "No column choosen. Please use Ctrl-V or V to select area." |
| |
return |
| |
endif |
| let clen = c2v - c1v |
let clen = c2v - c1v |
| if c1 > c2 |
if c1 > c2 |
| let temp = c1 |
let temp = c1 |
| Line 103 function! IncrementColumn(pad, ...) |
|
| Line 107 function! IncrementColumn(pad, ...) |
|
| |
|
| exe r1 |
exe r1 |
| |
|
| exe "let presNum = ".strpart(getline('.'), c1-1, clen+1) |
let presNum = 1 |
| |
silent! exe "let presNum = ".strpart(getline('.'), c1-1, clen+1) |
| |
|
| let lastnum = presNum + incr*(r2-r1) |
let lastnum = presNum + incr*(r2-r1) |
| " a simple way to find the number of digits in a number (including decimal |
" a simple way to find the number of digits in a number (including decimal |
| Line 111 function! IncrementColumn(pad, ...) |
|
| Line 116 function! IncrementColumn(pad, ...) |
|
| let maxstrlen = strlen("".lastnum) |
let maxstrlen = strlen("".lastnum) |
| |
|
| let r = r1 |
let r = r1 |
| exe 'normal '.c1v.'|' |
silent! exe 'normal '.c1v.'|' |
| while (r <= r2) |
while (r <= r2) |
| let cnow = col(".") |
let cnow = col(".") |
| let linebef = strpart(getline('.'), 0, cnow-1) |
let linebef = strpart(getline('.'), 0, cnow-1) |
Platon Group <platon@platon.org> http://platon.org/
|
|