7

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?

4 Answers 4

11

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.

10

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.

1
  • That's correct, thank you. I awarded the checkmark to the other answer, since he gave a bit more detail.
    – BobMarley
    Dec 14, 2009 at 12:03
2

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'.

0

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.

1
  • 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, 2009 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .