4 ms·
Is there a guide or spec to how Vim defines text/a word? I'm thinking of cursor motions like 'e' or 'w'. If you paste in a URL put your cursor on the starting
by zogrodea 2y ago
Is there a guide or spec to how Vim defines text/a word?
I'm thinking of cursor motions like 'e' or 'w'. If you paste in a URL put your cursor on the starting 'h' and press 'e', your cursor will move to the : in the URL.
That's different from how operating systems navigate text on ctrl-right so I'm wondering if Vim modes/clones have a spec or definition, or if they copy through observation.
- positr0n 2y agoYes, see `:help iskeyword` Different file types can have different values for this. For example in clojure / and : are commonly used, so they are added to `iskeyword`. In .clj files "w" navigates across `:person/first-name` as one word. Also FYI if you didn't know and are having that problem with URLs, capital E and W navigate across vim WORDS, which is defined as all non-whitespace characters.
- zogrodea 2y agoThat's quite helpful. Thank you for the information!