avalan_che
avalan_che

Reputation: 93

Why can't this menu item work?

I got this in my vimrc:

:so menu_format.vim

and in menu_format.vim, this:

"... other menu items that work
menu Format.nbsp_space <ESC>:%s@ @ @gec<CR> //(the 1st blank is 0xa0, the 2nd is 0x20)
"... other menu items that work

On Windows it works (been using it for a while), but on Linux Mint 17 vim gives:

E319: Sorry, the command is not available in this version.

I tried %s@ @ @gec on command line, it worked, too!

I knew how to fix this: %s@[\xa0]@ @gec would do. I just wanted to know why there is such a difference, and it made me doubt the portability of my vim scripts.

BTW, I built vim (7.4.560) on both Linux and Windows with the same configuration, both use the same menu_format.vim.

Upvotes: 0

Views: 107

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172688

It looks like you only have the minimal version of Vim named vim-tiny; it only provides a minimal vi-compatible implementation. The E319 implies that the :menu command is not available, the :substitute does look fine and should work.

To get the full Vim (and graphical GVIM), install the following package:

$ sudo apt-get install vim-gnome

Upvotes: 1

Related Questions