If I am at the end of a word and I try and uppercase the inner word, it only uppercases the last letter of the word. For example:

hello| <-- cursor is at the end of the word

gUiw only applies on the last letter:


Why is this so, and is there a way to uppercase the word if on its boundaries?

  • 3
    David, I cannot reproduce this: with my cursor on o, I get the whole word up-cased; with my cursor on a space after o, I get no change.
    – D. Ben Knoble
    Jun 9 '20 at 21:12
  • 2
    Can you reproduce it with vim --clean?
    – Maxim Kim
    Jun 9 '20 at 21:18
  • @MaximKim I see -- I think it' because I have ve+=onemore in my vimrc, but on clean it works (but the cursor is ON the last character, not one past it).
    – David542
    Jun 10 '20 at 5:46

Having non default virtualedit (all, onemore) makes "inner word" text object somewhat incorrect when your cursor is on a virtual column. If you try to viw it will also select the last non-whitespace character of the line. I don't know if this is a bug or "known feature".

Why incorrect (or rather inconsistent)? If you put your cursor between 2 words and do viw it will select only whitespace between words.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.