I believe I have done an extensive google for semantic_escape_chars, but i have failed to find what the meaning of that config is. When are semantic_escape_chars used?
What is the meaning of semantic_escape_chars?
196 views Asked by user1283776 At
1
The sample configuration says the
semantic_escape_chars
configuration option is used to specify a string of characters that are used to separate "semantic words". These are words that are seen as a single unit when you perform any actions on them, similar to the concept of words in vim.This is used by the vi binding actions (
SemanticLeft
,SemanticRight
,SemanticLeftEnd
, etc.) which under allow the cursor to be moved semantically based on boundaries specified bysemantic_escape_chars
.More concretely, in your
alacritty.yml
, if you haveAnd you enter vi mode (
Ctrl+Shift+Space
) with the following in your promptAssuming your cursor is at the first character, hitting "w" would take you to the beginning of the next semantic word, which would be the "b" in "bar".
If instead, you included an
.
in thesemantic_escape_chars
, pressing "w" would take you to the "o" at the end of "foo" since that is the end of the boundary for that semantic word as it is followed by the semantic escape character.
.