Take the 2-minute tour ×

I'm running vim (7.0.237) after sshing to a remote CentOS box, and it just won't enter visual mode.

When I press 'v', it just beeps and does nothing.

I'm running Ubuntu with GNOME Terminal, and the local copy of vi works fine, so I don't see how this could be a problem with the terminal. I have the same .vimrc file on the local and remote machines, and the only settings are: set nocompatible; set tabstop=4.

I'm at a total loss here, any ideas?

share|improve this question

4 Answers 4

up vote 10 down vote accepted

RedHat based systems have a package called vim-minimal installed by default, which has a limited set of features enabled. You want to install the vim-enhanced package.

Debian based systems do something similar, where vim-tiny is the default install and has a minimal feature set. Your Ubuntu system must have one of the other Vim packages installed (likely vim or vim-gtk) which is why it works fine there.

share|improve this answer

Well it actually seems like you can build vim without support for visual mode. Check the output of :ver and see whether it says +visual or -visual. Bad luck if it's the latter.

share|improve this answer
That's correct, thank you. I awarded the checkmark to the other answer, since he gave a bit more detail. –  BobMarley Dec 14 '09 at 12:03

I've installed vi as vim-enhanced, but if I run it as vi, :ver shows Tiny version without GUI and lists -visual. When launched as vim, it says Huge version without GUI (and +visual).

Check your .bashrc for alias vi='vim'.

share|improve this answer

Your local terminal settings are not necessarily transferred correctly via SSH; do other programs that use termcap/terminfo (e.g. top, less) work through the SSH link?

Another thing to try: manually setting the TERM environment variable to "vt100" and see whether that has any effect.

share|improve this answer
Yup, the 'v' key works fine in less. I don't see how this could be a terminal issue at all, in that case. Must be something weird with that particular version or configuration of vi. –  BobMarley Dec 10 '09 at 12:53

Your Answer


