Programming with a French keyboard (parenthesis, braces, square brackets etc.)

Answered
This isn't specific to WebStorm. I finally found a good workaround on a French keyboard to simplify typing parentheses, braces, and square brackets while coding :
In WebStorm/IDEA I create the following:

File | Settings | Live Templates | + | Live Template :
Context: Everywhere
Expand with: Enter
Abbreviation: $
Description/Template Text: ()
then I duplicate that multiple times for :
Abbreviation: *
Description/Template Text: {}
Abbreviation: =
Description/Template Text: []
Abbreviation: $$
Description/Template Text: (){
$END$
}
Tick: Reformat according to style

That way, with the 3 keys next to the enter key, I get to use my index and middle fingers to quickly get the character pair I'm after.
R.I.P. AltGr + ' then AltGr + = for typing a pair of braces etc.

To simplify arrow functions in JavaScript/TypeScript I came up with:
Abbreviation: =<
Description/Template Text: ($var$) => {
$END$
}
and a duplicate for when I miss the '>' key and accidentally hit the 'w' key
Abbreviation: =w
Description/Template Text: ($var$) => {
$END$
}
 
1
1 comment

Hi David,

Sorry for the poor experience on your part. A task to support national keyboard layouts on IntelliJ platform was created a while ago, and is now work in progress, which is a great thing if it helps avoid convoluted workarounds like the one you had to come up with.

Please vote for IDEA-165950.

0

Please sign in to leave a comment.