4 ms·
If it works like Emacs paredit, the default for just hitting `(` would be let y = f()(2, 3) but there should be a different command to do (`alt-(` in paredi
by juki 5y ago
If it works like Emacs paredit, the default for just hitting `(` would be
let y = f()(2, 3)
but there should be a different command to do (`alt-(` in paredit)
let y = f((2, 3))
There should of course also be "slurp" and "barf" commands to add or remove items from the parentheses if you do the wrong thing first (or want to wrap multiple things in the parentheses)
- throwaway4good 5y agoI put the parenthesis one step further to the right - so you would get: let y = f(()2, 3) Which possibly wouldn't parse.
- throwaway4good 5y ago(It possibly wouldn't parse in a language with C-style syntax.)
- juki 5y agoThat would depend on the language. Paredit is mainly made for Lisp where that would be legal (aside from the comma between 2 and 3). In some other languages that could also be allowed for casts.
- DonHopkins 5y agoAnd also "boof" and "crap" commands for moving items in and out of the the other side of the parens.