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

Can dot (.) operator be preserved across cells?

Open dtabell opened this issue 4 years ago • 5 comments

When I make a change in one cell, I can then repeat that change elsewhere in the same cell with everyone's favorite magic vim command, .. This does not work across cell boundaries. Is there any way to fix this?

Yes, one might mush all the cells together, make the changes , and then un-mush the cells, but that's so non-vim.

dtabell avatar Nov 23 '20 22:11 dtabell

I don't think there's an easy way for the extension to do this as jlab makes each cell a separate codemirror editor instance.

ianhi avatar Dec 21 '20 15:12 ianhi

This would be super useful if it ever becomes technically feasible in the future!

joelostblom avatar Oct 01 '23 20:10 joelostblom

This works by default in jlab4!

But remains a won't/can't fix for jlab3.

If i'm wrong and somehow fooled myself into thinking this works please feel free to re-open

ianhi avatar Oct 02 '23 20:10 ianhi

@ianhi Hmm, it doesn't seem to work for me in jlab 4.05. More precisely. It seem to kind of work sometimes, and it maybe dependent on if a cell already exists (and maybe also if it is in insert mode?) by the time the repeat operation is performed. An example of something that does not work is to write a word in an existing cell, create a new cell, and then press . for the same word to be repeated in the new cell. Does that work for you @ianhi ?

joelostblom avatar Oct 06 '23 20:10 joelostblom

ahh indeed it doesn't seem to translate properly to new cells. I wonder if theres any way we can pull some of the state of when a new cell gets created, I guess it doesn't have access to the same history

ianhi avatar Oct 06 '23 21:10 ianhi