mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 06:37:59 +01:00
Setup abbreviation behavior to be like an isk-less Vim.
For now, the internal equivalent of "iskeyword" is [^\s'"]. In the future, the internal "iskeyword" equivalent can be expanded. It may be overboard to add an "iskeyword" option, as it applies to lots more things than :abbr. Additionally, it's not clear why it's bad to call keyword characters everything except whitespace and quotes. TODO: Should abbreviations be triggered by any non-keyword character? TODO: Should abbreviations be triggered by <CR>? TODO: Should abbreviations be able to include <Left>, etc.?
This commit is contained in:
@@ -172,6 +172,27 @@ ________________________________________________________________________________
|
||||
|
||||
section:Abbreviations[abbreviations]
|
||||
|
||||
Vimperator can automatically replace words identified as abbreviations,
|
||||
which may be used to save typing or to correct commonly misspelled
|
||||
words. An abbreviation can be one of three types that are defined by the
|
||||
types of constituent characters. Whitespace and quotes are non-keyword
|
||||
types, and all other characters are keyword types.
|
||||
|
||||
. A "full-id" abbreviation consists entirely of characters that are not
|
||||
keyword characters (e.g., "teh", "msoft").
|
||||
|
||||
. An "end-id" abbreviation ends in keyword character but otherwise
|
||||
contains all non-keyword characters (e.g., "'i").
|
||||
|
||||
. A "non-id" abbreviation ends in a non-keyword character but otherwise
|
||||
contains any non-whitespace character (e.g., "def'").
|
||||
|
||||
Strings that cannot be abbreviations include "a'b" and "a b".
|
||||
|
||||
An abbreviation is recognized when a space is typed after the
|
||||
abbreviation. There are no default abbreviations, and abbreviations are
|
||||
never recursive.
|
||||
|
||||
|:ab| |:abbreviate|
|
||||
||:ab[breviate] {lhs} {rhs}|| +
|
||||
||:ab[breviate] {lhs}|| +
|
||||
@@ -179,8 +200,7 @@ section:Abbreviations[abbreviations]
|
||||
________________________________________________________________________________
|
||||
Abbreviate a key sequence. Abbreviate {lhs} to {rhs}. If only {lhs} is given,
|
||||
list all abbreviations that start with {lhs}. List all abbreviations, if no
|
||||
arguments are given. To prevent ambiguity, the {lhs} cannot contain
|
||||
quotes (' or ") or spaces.
|
||||
arguments are given.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user