plugin Auto Replace

Plugins for SynWrite and CudaText...
Post Reply
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

plugin Auto Replace

Post by Alexey »

plugin for CudaText.
allows to auto-replace keywords/functions, when they are typed in the wrong case (e.g. "writeln" to "WriteLn"). allows usual word replace too. to use it, you must create one or several snippet collection(s) in .cuda-snips format:
http://wiki.freepascal.org/CudaText#For ... cuda-snips

for ex, to replace words "readln" and "writeln" in lexer Pascal, create file "[CudaText dir]/data/autoreplace/pascal/mysnips.cuda-snips" with contents:

writeln WriteLn
readln ReadLn

word is replaced when user goes off this word: by Space, Tab, symbol chars, punctuation, Home/End, PageUp/PageDown, mouse click.

note that [CudaText dir] on Unix is "~/.cudatext".
note that you need subfolder in the lower case inside "data/autoreplace" folder.
plugin prints in the Console panel, that it actually has found some snippets, e.g. "Auto Replace: for all lexers: found Pascal[5]".
such snippet collections can be distributed as CudaText add-ons.
plugin gives configuration menu item: Options / Settings-plugins / Auto Replace / Config.

authors:
Alexey T. (CudaText)
Khomutov Roman (iRamSoft)
User avatar
kvichans
Posts: 203
Joined: 07.10.2012 05:45

Post by kvichans »

What is difference with Snippet plugin?
CudaText 1.163, TC9.51x32, Win10x64(1920x1080)
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

See above- word is replaced when user goes off this word: by Space, Tab, symbol chars, punctuation, Home/End, PageUp/PageDown, mouse click.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Plugin was updated: not it uses simpler snippets, *.cuda-dic, see history.txt.
Post Reply