naomi icon indicating copy to clipboard operation
naomi copied to clipboard

JSX symbols `>` and `/` break multiple cursors & selections

Open neaumusic opened this issue 5 years ago • 4 comments

Is it possible to disable auto-close autocompletion?

  1. I usually don't want to auto-close JSX tags.

  2. any auto-close breaks multiple cursor editing, and turns into a single cursor at the first index.

neaumusic avatar Apr 26 '19 19:04 neaumusic

This behavior is rather disruptive; I didn't realize it was coming from Naomi. Please do either disable it by default or at least document a way to disable it in settings.

coreyward avatar May 01 '19 15:05 coreyward

This also breaks search (triggered by /) in Vim mode. I think some additional "contexts" need to be added to this keybinding:

https://github.com/borela/naomi/blob/a1034a85cfc8e924e1e9a181765549fb890956a8/Default.sublime-keymap#L353-L378

The additional contexts are:

// to fix the <hr/>> issue above:
{ "key": "following_text", "operator": "not_regex_contains", "operand": ">" }, 

// to fix the multi-cursor issue:
{ "key": "num_selections", "operator": "equal", "operand": 1 },

// to fix the Vim mode issue
{ "key": "setting.command_mode", "operand": false },

Note: I haven't personally tested these, so they may not be exactly right, but I believe this is the gist of it.

markalfred avatar Jun 05 '19 23:06 markalfred

Can I get a pointer on where to fix this? I can give it a stab.

AlexKvazos avatar Feb 20 '20 10:02 AlexKvazos

@AlexKvazos my comment above outlines what I think are the correct fixes, but I haven't fully tested them myself.

markalfred avatar Feb 23 '20 14:02 markalfred