私の質問は簡単です: ...Is it possible to escape the space characterのコマンドのみを使用して、スペースで区切られた 2 つの単語を短縮する方法はありますか?ab
vi
スタックオーバーフローではこれしか見つかりませんでしたが、すべての回答は置換コマンドを使用していました。私も試しました:
:ab word1<space>word2 replaceWord
しかし無駄だった (エラーが発生した)
私の質問は簡単です: ...Is it possible to escape the space characterのコマンドのみを使用して、スペースで区切られた 2 つの単語を短縮する方法はありますか?ab
vi
スタックオーバーフローではこれしか見つかりませんでしたが、すべての回答は置換コマンドを使用していました。私も試しました:
:ab word1<space>word2 replaceWord
しかし無駄だった (エラーが発生した)
実際にエミュレートできます。
word2
その前にあるものをチェックする略語を定義する必要があります。'\' で始まる略語について詳しく説明しましたが、同じです (前の行の最後の単語をテストする必要がある場合を除いて)。
残念ながら、それは不可能です。
から:help :abbreviate
:
Examples of strings that cannot be abbreviations: "a.b", "#def", "a b", "_$r"
これは、略語が 3 種類しかないためです (まだ から:help
):
full-id The "full-id" type consists entirely of keyword characters (letters
and characters from 'iskeyword' option). This is the most common
abbreviation.
Examples: "foo", "g3", "-1"
end-id The "end-id" type ends in a keyword character, but all the other
characters are not keyword characters.
Examples: "#i", "..f", "$/7"
non-id The "non-id" type ends in a non-keyword character, the other
characters may be of any type, excluding space and tab. {this type
is not supported by Vi}
Examples: "def#", "4/7$"