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

Is it possible to implement :wq ?

Open dtabell opened this issue 4 years ago • 2 comments

Before I forget (again) to say this, many thanks for this great plugin!

The commands :w and :q serve, respectively, to write the file and to exit to Jupyter command mode. Is it possible to to have :wq perform the combined action?

dtabell avatar Nov 25 '20 04:11 dtabell

I think this should be possible. You probably would need to add another mapCommand like is done here: https://github.com/axelfahy/jupyterlab-vim/blob/c4e43f940ef4be4c961608b6192412d2f3a33d1f/src/index.ts#L181

ianhi avatar Dec 21 '20 15:12 ianhi

Wouldn't mapCommand() create a normal mode key binding? It seems like ex commands are created with defineEx()? https://github.com/jupyterlab-contrib/jupyterlab-vim/blob/43ffc6e24f7cf279a3e32f9b5b170b5498cee220/src/index.ts#L127-L137.

firai avatar Oct 06 '23 19:10 firai