Auto casing?

ilengyel
Posts: 4
Joined: 17.04.2018 06:59

Auto casing?

Post by ilengyel »

Is it possible to auto case certain keywords? For example, if you type

Code: Select all

for 
the lexer or editor changes the text to

Code: Select all

FOR
User avatar
kvichans
Posts: 203
Joined: 07.10.2012 05:45

Post by kvichans »

Why you tell only about "case"?
Autoreplaces are better. In CudaText see "snippets"
CudaText 1.163, TC9.51x32, Win10x64(1920x1080)
ilengyel
Posts: 4
Joined: 17.04.2018 06:59

Post by ilengyel »

Thanks, this will be good for common keywords. I was hoping to also use this for a set of well known identifiers, but I would like to avoid to create a snippet for each (counted in the 100s). Maybe there is a way to have a function list/intellisense for these and any others deemed to be function identifiers?
ilengyel
Posts: 4
Joined: 17.04.2018 06:59

Post by ilengyel »

To answer my own question, I have discovered the SynWrite help which has a topic on Auto-completion and "Auto-Correction of Id Case"... I will see if this applies to cudatext too.
User avatar
kvichans
Posts: 203
Joined: 07.10.2012 05:45

Post by kvichans »

Your wish is good. But i still think replacements are better then only cases.
Need will append to snippet plugin simple list

Code: Select all

word1 replacement1
word2 replacement2
...
After then you will can write a file

Code: Select all

for FOR
in IN
...
and will be able to write "for", click Tab and see "FOR".
Is it solve you problem?
CudaText 1.163, TC9.51x32, Win10x64(1920x1080)
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

It's solved via Snippets plugin now. plugin supports .cuda-snips files [in folder data/snippets] in format shown above.
But user needs to press Tab after snip name.
W/o pressing Tab not solved.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

@topic starter
Pls make snippet file in .cuda-snips format
It's described here http://wiki.freepascal.org/CudaText#For ... ppet_files

Later will be plugin Auto Replace, which will use same snippets for autoreplace w/o tab-key.

Can you help with other snippets for other lexers?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

No feedback, so postponed making the plugin, not easy.
ilengyel
Posts: 4
Joined: 17.04.2018 06:59

Post by ilengyel »

Sorry with late reply, I ended up going with SynWrite since the function hint, parameter list and autocasing gave the full experience I wanted. The only improvement to that I could see is adding support for individual parameter hints as the function args is typed out.
captbill
Posts: 8
Joined: 04.12.2015 16:17

Post by captbill »

Hi Alexey,
I would also be interested in this feature. Oberon and Lola-2 have case-sensitive keywords.
Locked