Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am just new to vim and i am following these tutorials for vim.

But some of my commands are not working in Vim like:--

Capital W.
f followed by a character. (To move to next same char.)

Can any body tell why this is happening.

share|improve this question
    
It should work if you are in command mode. –  Rojan Dec 28 '10 at 4:28
    
The commands W and fx don't work? What does happen when you try them? –  msw Dec 28 '10 at 5:38

3 Answers 3

up vote 9 down vote accepted

this may be because by default Ubuntu has a cut down version of vim called "vim-tiny" and many commands dont work in vim-tiny. To get full functionality you need to install "vim". You can install "vim" with following command

sudo apt-get install vim

Try these commands after installing vim and let me know if you still have problems.

share|improve this answer

Usually VIM runs in VI compatibility mode by default.

Try switching modes and see if the commands work. Use this to see which mode you are in:

:set compatible?

Then

:set compatible

or

:set nocompatible 

to switch to the other mode and give your commands a try.

Adding

set nocompatible

or

set compatible

to a file called ".vimrc" in your home directory will make the setting the default for vim.

share|improve this answer

I'm not sure of capital W. I dont know what it is supposed to do, it works just like small w, moving to the next word.

Regarding f followed by a character will move to the character only in the current line. If you want to move to a character else where use / and the character and press enter. ? for reverse. I too got confused with f first.

share|improve this answer
    
w moves to the next word, W moves to the next WORD. A WORD is basically anything delimited by white space. –  kyrias Oct 27 '13 at 1:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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