Cudatext: Autocomplete in HTML: suggest recently used listbox items first

Created on 2 Jul 2021  路  13Comments  路  Source: Alexey-T/CudaText

from @eltonfabricio10
I know it can be a difficult implementation...

  • Display last used attribute in HTML first on autocompletion

For example: When you type the attr 'class' in a div, then in the next tag show the attr 'class' first.
ST4 does that:

s

the last tag name is also shown first:
s2

enhancement

Most helpful comment

but is missing for JavaScript.

See here: https://wiki.freepascal.org/CudaText#IntelliSense

I made the beta 1.136.1.4 ,
http://www.uvviewsoft.com/c/

  • add: auto-completion in HTML: recently chosen items are shown on top

Pls test.
@halfbrained @Miroslavmatas

All 13 comments

Thanks @Alexey-T

Another suggestion:

  • When you press the TAB key it shows the words corresponding to the typed letter (ST4)
    Words: from the current document or from opened documents

In this case it is only for lexer html that the plugin "Complete From Text" does not work.

ksnip_20210702-224926
ksnip_20210702-224952

'Complete from text' works in all lexers after you configure it!
'Options / settings-plugins / complete from text' menu.
e.g. tested in HTML now:
com

for HTML plugin options no_comments/no_strings must be configured to '0'.

Screenshot_2021-07-03_12-10-14

I will test... Thanks @Alexey-T

for HTML plugin options no_comments/no_strings must be configured to '0'.

I tested it and the "complete from text" plugin overrides CudaText autocomplete. So I left it disabled...
Really CudaText autocomplete and the "complete from text" plugin together they fight hahaha
Maybe one day you'll make them live together hahaha...

Maybe one day I will work on it...

One way it might work is to put the html suggestions in the "data/autocomplete" folder
for the "complete from text" plugin to suggest("use_acp" option). I will try...

it will not work the same good, as built-in HTML completion. but yes, plugin can be changed somehow. 'use_acp' is to use .acp files from https://wiki.freepascal.org/CudaText#Static_auto-completion_files

CudaText shows autocomplete for HTML and CSS, but is missing for JavaScript.

but is missing for JavaScript.

See here: https://wiki.freepascal.org/CudaText#IntelliSense

I made the beta 1.136.1.4 ,
http://www.uvviewsoft.com/c/

  • add: auto-completion in HTML: recently chosen items are shown on top

Pls test.
@halfbrained @Miroslavmatas

See here: https://wiki.freepascal.org/CudaText#IntelliSense

Thanks!

I made the beta 1.136.1.4 ,
http://www.uvviewsoft.com/c/

  • add: auto-completion in HTML: recently chosen items are shown on top

You are very good! Congratulations @Alexey-T
CudaText is amazing and wonderful

Played with this a bit - no issues.

Was this page helpful?
0 / 5 - 0 ratings