Description
Flutter widget code has lots and lots of commas.
Would it be possible to add shortcuts to the editor that make it easier to move the caret between commas as below:
-
a shortcut key that moves the caret past the nearest comma
This would be very useful when defining properties for widget as often you have to press a few keystrokes to position the caret past a comma (perhaps CTRL+SHIFT+,) -
a shortcut key that inserts a comma at the end of current line and moves the caret to new line.
This would be useful when defining new widgets as children as often after typing in a widget you need to go to the end of the line, insert the comma and then add then add next child.
Similar to CTRL+ENTER (perhaps CTRL+ENTER+,)
Not sure if this suggestion is related to flutter plugin or IntelliJ itself
Version info
[✓] Flutter (Channel master, v0.9.6-pre.35, on Linux, locale en_GB.UTF-8)
FLutter plugin 29.1.3
Activity
pq commentedon Oct 16, 2018
@alexander-doroshko : curious if there are existing IDEA navigation tricks that would help here?
alexander-doroshko commentedon Oct 16, 2018
Regarding 1, IDE doesn't have actions that navigate to the next/previous comma. Some similar actions that come to my mind are:
But neither cares about commas.
Regarding 2. If trailing comma on the current line doesn't cause a syntax error (even if nothing new is printed on the next line) then we might think about using Complete Statement (Ctrl+Shift+Enter) for this. Currently, the action only adds a line break at the end of the current line and jumps to the next line. When it brings more good than bad it might add trailing comma as well.