vim-speeddating icon indicating copy to clipboard operation
vim-speeddating copied to clipboard

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

Open kiryph opened this issue 10 years ago • 4 comments

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?

  • no roman numerals incrementing in visual mode
  • same 'type' incrementing when applying to several lines.

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

kiryph avatar Aug 27 '15 06:08 kiryph

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.

tpope avatar Sep 14 '15 21:09 tpope

Note: current Vim do provide <C-A> <C-X> functionality for visual mode plus adding the g<C-A> function

chrisbra avatar Oct 14 '15 08:10 chrisbra

@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

akkartik avatar May 24 '16 23:05 akkartik

what i meant is described at :h v_g_CTRL-A

chrisbra avatar May 25 '16 05:05 chrisbra