Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 8ee50d6

Browse files
committed
Merge branch 'develop-8.2' into merge-develop-8.2-17-9-18
Conflicts: Toolset/home.livecodescript Toolset/libraries/revidelibrary.8.livecodescript Toolset/libraries/revidemessagehandlerlibrary.livecodescript Toolset/libraries/revinitialisationlibrary.livecodescript Toolset/palettes/revresourcecenter.rev Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript Toolset/palettes/script editor/behaviors/revseeditorbehavior.livecodescript Toolset/palettes/script editor/behaviors/revsestackbehavior.livecodescript
2 parents f52211b + 1c0e646 commit 8ee50d6

File tree

58 files changed

+3157
-342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3157
-342
lines changed

Documentation/guides/The LiveCode IDE.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,102 @@ Choose a handler to go to that handler in the script.
565565

566566
The Window menu contains the names of open script editor windows.
567567

568+
### Autocomplete
569+
570+
> **Note:** Autocomplete is only available in commercial versions of
571+
LiveCode
572+
573+
#### Using Autocomplete
574+
575+
While typing in the script editor a filtered list of available completions
576+
will appear below the selection. Use the following keys to navigate the
577+
completion list:
578+
579+
- tab - apply the completion
580+
- up arrow - move up the list
581+
- down arrow - move down the list
582+
583+
Moving the mouse will hide the completion list to avoid it remaining in
584+
place over an area you would like to select. Completions include
585+
placeholder fields which you can navigate with the tab key. Some
586+
completions may have multiple placeholders with the same name which
587+
will be edited together. Clicking within a placeholder will select it.
588+
589+
The current automatic completion of control structures has not changed.
590+
591+
Autocomplete provides the following features:
592+
593+
- Completions generated from the LiveCode documentation
594+
- Completions generated dynamically by introspecting
595+
the object being edited and its message path
596+
- An Autocomplete Snippet Manager dialog is accessible from the script
597+
editor menubar to manage a custom set of completions.
598+
599+
#### Autocomplete Snippet Manager
600+
601+
An autocomplete snippet provides the information required to match and
602+
complete some code in the script editor. The Autocomplete Snippet Manager
603+
allows the user to manage a custom set of completion snippets.
604+
605+
Create a new completion snippet by clicking the **+** icon and delete the
606+
currently selected snippet by clicking the **-** icon.
607+
608+
The dialog allows entry of the following:
609+
610+
**Display Name** - choose a completion snippet to edit or change the
611+
display name of the current snippet.
612+
613+
**Priority** - A value between 1 and 100 indicating the order the
614+
completions should be matched in. Higher priorities will be listed
615+
before lower priorities.
616+
617+
**Match Scope** - Choose whether the completion should try and match when
618+
the selection is outside a handler, inside a handler or anywhere. A
619+
comment completion might be anywhere, a statement completion (unless
620+
local, global or constant) would be only inside a handler and a handler
621+
completion would be outside a handler.
622+
623+
**Match Words** - Choose whether to match only all the words of a line,
624+
just the word being written or either. A statement would be all the words
625+
on a line, an expression would be just the current word and a comment
626+
would be either.
627+
628+
**Alternate Match String** - When matching completion snippets the text
629+
of the completion is matched first but in some cases that is not suitable
630+
or another string would be better to match. Enter a string to try matching
631+
if the completion fails to match.
632+
633+
**Summary** - This field is optional and provides some detail below the
634+
completion in the script editor.
635+
636+
**Completion** - This is the string to be used when replacing the
637+
selection after choosing a completion. The completion may be any script
638+
and any length. Add placeholders to the completion in the following form:
639+
640+
${<name>:<type>}
641+
642+
Where:
643+
644+
- name - is the text seen in the script editor
645+
- type - is used to filter the completions presented for the placeholder
646+
one of:
647+
648+
- statement - any LiveCode command
649+
- expression - any LiveCode expression
650+
- identifier - a variable or handler name
651+
652+
Additionally, it is possible to include multiple placeholders with the
653+
same name. When a multiple placeholder is selected they are edited
654+
at the same time. In this example completion as the user enters the
655+
condition a comment is appended to the `end if` with the condition text.
656+
Once the condition is complete the user may tab to the `-- code` line
657+
and enter a statement. The tab order is always top to bottom and left to
658+
right:
659+
660+
if ${condition:expression} then
661+
${-- code:statement}
662+
end if # ${condition}
663+
568664
## The Message Box
569665

570666
The Message Box is a command line tool that allows you to run scripts or

0 commit comments

Comments
 (0)