tpope / vim-speeddating

speeddating.vim: use CTRL-A/CTRL-X to increment dates, times, and more
http://www.vim.org/scripts/script.php?script_id=2120
963 stars 40 forks source link

Visual mode: increment letters of the alphabet and roman numerals clash #19

Open kiryph opened 9 years ago

kiryph commented 9 years ago

Consider I have an alphabetically enumerated list:

a)
b)
c)

I'd like to increment them in visual mode. I get following result:

b)
c)
ci)

How could this be resolved?

I know roman numerals can be disabled by :SpeedDatingFormat! but I would expect a consistent default behaviour of speeddating itself.

tpope commented 9 years ago

In hindsight, I think a better visual mode behavior would be to clobber the second row onward with additional increments of the first, sidestepping this entirely. This already happens when the rows are blank so forcing it to happen all the time is probably tenable. Please do investigate.

chrisbra commented 9 years ago

Note: current Vim do provide functionality for visual mode plus adding the g function

akkartik commented 8 years ago

@chrisbra: I didn't follow your comment. g function? You mean like :g//? I don't see how I'd use that in this situation. Please elaborate?

@tpope: this problem exists even outside of visual mode. Today I hit ctrl-a on this line:

id: 3

I expected:

id: 4

but I got:

dii: 3
chrisbra commented 8 years ago

what i meant is described at :h v_g_CTRL-A