Skip to content

Commit 318ab24

Browse files
committed
docs: clarify default behavior
See #53.
1 parent 5787f08 commit 318ab24

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/snippy.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ allows snippets to be conveniently separated by a single blank line.
162162
The `option`s control the behavior of the expansion of the snippet and are
163163
optional. Currently supported are the following:
164164
- `w` Word boundary - The word expands only when the trigger is on a word
165-
boundary. This is the default behavior.
165+
boundary. A |word| in this context is a sequence of |iskeyword|
166+
characters.
166167
- `i` In-word expansion - The snippet gets expanded even if the trigger is
167168
only part of the word, up to the cursor.
168169
- `b` Beginning of line - The snippet is only expanded if its trigger is
@@ -172,9 +173,13 @@ optional. Currently supported are the following:
172173
this feature, because it checks every key pressed, may theoretically
173174
affect the performance of your editor when used.
174175

175-
Custom `option`s can be defined via the setup option `expand_options` to restrict
176-
expansion in specific scenarios. For example, consider latex snippets which
177-
should only be expanded when inside of a math environment or in comments:
176+
Note that the default behavior is to only expand if the whole |WORD|
177+
(space-delimited) before the cursor matches the trigger.
178+
179+
Custom `option`s can be defined via the setup option `expand_options` to
180+
restrict expansion in specific scenarios. For example, consider latex snippets
181+
which should only be expanded when inside of a math environment or in
182+
comments:
178183
>lua
179184
expand_options = {
180185
m = function()

0 commit comments

Comments
 (0)