What does capital W do in VIM?

Solution 1:

As others have said, :W isn't defined in vanilla vim (7.0 here), so it sounds like some plugin you've installed has added it.

:command W will tell you what it does.

Solution 2:

I guess you have a common mapping for :W in your .vimrc to save the file as typing :w does. Often people press too long the shift key for the colon and make the typo but actually wanting to type :w. You've possibly got this mapping by copy and paste of snippets into your vimrc or by using a pre-configured vim setup such as spf13-vim distribution.

.vimrc:

command! W  write

However, as pointed out by Sam Stokes checking the meaning of commands via

:command W

and for keycombos:

:verbose map < C-j>

is a general approach to find out what a command or keycombo does.

Solution 3:

You can test this line

{Cursor}It's the test

{Cursor} : Cursor position in normal mode, w: will move word which separated by " ,./?" W: will move word which separated by " " only