Page 1 of 1
How to turn off autocompletion of brackets?
Posted: 21.12.2020 16:05
by IBon
Thank you for a very nice text editor!
I would like to turn off autocompletion of ending brackets in JavaScript ( ) { } [ ] , since I find it annoying and would like to set brackets myself.
Please tell me how to do this?
Best regards
Iwan
Posted: 22.12.2020 06:11
by Shovel
I think you are looking for option "auto_close_brackets"
in Plugins > Options Editor
Check "For Lexer", choose "Javascript" and put empty string in "User" value.
Posted: 22.12.2020 12:30
by IBon
Thank you for the advice.
I tried that but it didn't work
When you write "empty string" do you mean with a RegEx expression perhaps? Like \s{1}?
Posted: 23.12.2020 08:09
by Shovel
IBon wrote:When you write "empty string" do you mean with a RegEx expression perhaps? Like \s{1}?
Press enter on empty field. You will have a "lexer JavaScript.json" file in "cudatext/settings" folder that will look something like this
Just ckecked again, it works for me, maybe try restarting Cudatext.
(A little caveat: it disables bracket auto closing in all lexers
, maybe Alexey will clarify this)
Posted: 23.12.2020 12:13
by IBon
Now it works, thank you so much!
I just didn't know I was supposed to press "enter" afterwards.
Posted: 27.12.2020 10:33
by uvviewsoft_
>(A little caveat: it disables bracket auto closing in all lexers
, maybe Alexey will clarify this)
do you have option in "lexer JavaScript.json" and it disables bracket completion in C++ lexer?
steps to repeat, pls?
Posted: 27.12.2020 11:39
by Shovel
uvviewsoft_ wrote:steps to repeat, pls?
On fresh install:
Added ' "auto_close_brackets": "" ' to 'lexer JavaScript.json'
Restart.
When .c and .js files opened:
* first brackets autoclose in .c (expected)
* then switch to .js - doesn't autoclose (expected)
* switch back to .c - doesn't autoclose (weird)
edit: on version cudatext-linux-gtk2-amd64-1.118.2.0.tar.xz
Posted: 27.12.2020 17:26
by uvviewsoft_
Posted: 27.12.2020 17:51
by uvviewsoft_
it was easy to fix it, will be OK in 1.118.5.
Posted: 27.12.2020 20:44
by uvviewsoft_
made the same fix for almost all autocomplete_* options. they were coded the same way.