Autocompletion/suggestions

Post Reply
doesnotcompute29
Posts: 6
Joined: 20.04.2019 22:23

Autocompletion/suggestions

Post by doesnotcompute29 »

Hi. I'm working with HTML in cudatext, and I'm trying to get autocomplete/autosuggest to work, but not having any luck. I installed Complete to text, and also Autocomplete, but to no avail. What can I do to enable this plugin/feature?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Try this: menu File / New from template;
Then choose HTML lexer with "Redirection.html" item.
At the end of new HTML file, type
<t
and press Ctrl+Space.
I see listbox with variants:
table
tbody
td
....
Cudatext option "autocomplete_html" must be true.

Listbox shows on Ctrl+Space, or can be shown if typed N chars- for this use option "autocomplete_autoshow_chars".
doesnotcompute29
Posts: 6
Joined: 20.04.2019 22:23

Post by doesnotcompute29 »

I can get it to work when I press ctrl+space, but automatically it doesn't work. I looked in Settings->Default, and looked for autocomplete_chars, and it's set at 0. What would I change it to? Also, I'm trying to execute javascript, but can't seem to run it in cuda. I have node.js installed, and I did the same process for setting up python, but I am unable to run javascript. What am I doing wrong?

Edit: I figured out how to run javascript!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Automatically it is disabled by default. Call Plugins / Options Editor, and find 2 options
autocomplete_autoshow_chars
autocomplete_trigger_chars

OptionsEditor gives help text for all options in the bottom.
doesnotcompute29
Posts: 6
Joined: 20.04.2019 22:23

Post by doesnotcompute29 »

I opened up Options Editor, and found the 2 options, but I can't type anything into the boxes at all. I tried hitting ctrl, and double-clicking on the boxes, but that didn't do anything. It said I need to use the format int.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

screen shot shows what you need to do.

- focus needed option in listbox
- check the option [x] Lexer and choose lexer HTML
- enter value e.g. 2 near "Lexer:"
- value e.g. 2 must appear in listbox in one of the columns
Attachments
Screenshot from 2019-06-15 11-41-47.png
Post Reply