On 2007-02-16, Larry Alkoff <[EMAIL PROTECTED]> wrote:
> Charles E Campbell Jr wrote:
> > Larry Alkoff wrote:
> >
> >> I have a desktop and newly configured laptop with different versions 
> >> of vim.
> >>
> >> The desktop has vim 6.4.6 which contains the lines in ~/.vimrc
> >> set mouse=a
> >> syntax on
> >> They show in :help
> >>
> >>
> >> The laptop has vim 7.0.35 and gives an error on the above two vimrc 
> >> commands.  Also they don't show in :help.
> >>
> >> What has happened in vim 7?  Are there replacements for syntax on and 
> >> set mouse?
> >
> >
> > These commands are fine.  So, bring up your new vim and type:
> >  :version
> >
> > What does that show?

Tony has already addressed most of your issues, so I'll just add 
this.

> The error I get is:
> 
> [EMAIL PROTECTED] X11 # vi xorg.conf
> Error detected while processing /home/lba/.vimrc:
> line   52:
> E319: Sorry, the command is not available in this version:   syntax on
> line  121:
> E538: No mouse support: mouse=a
> Press ENTER or type command to continue
> 
> 
> Where line 52 says:
> syntax on
> 
> and line 121 says:
> set mouse=a

That explains a lot.  You're executing "vi", not "vim", and 
apparently on a Linux system.  Some Linux system vendors put a very 
limited version of vim in /bin/vi so that there is some editor that 
doesn't take much disk space or RAM available for troubleshooting 
systems that may not be able to mount /usr.

I get similar errors when I execute /bin/vi on a Red Hat 9 system.  
Executing :version shows that none of the mouse-related features 
were included.

    :version
    VIM - Vi IMproved 6.1 (2002 Mar 24, compiled Feb 12 2003 07:44:25)
    Included patches: 1, 3-15, 17-18, 20-22, 24-34, 36-43, 45-49, 51-72, 74-75, 
77-8
    3, 85-87, 89-92, 94-99, 101-118, 120-146, 150, 152-153, 157-183, 185-189, 
191-19
    5, 197, 200-201, 203-227, 231-239, 241-242, 244-252, 254-258, 260-289, 
293-295,
    297-299, 301-302, 305-310, 312-320
    Compiled by <[EMAIL PROTECTED]>
    Tiny version without GUI.  Features included (+) or not (-):
    -autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent
    -clientserver -clipboard -cmdline_compl -cmdline_hist -cmdline_info 
-comments
    -cryptv -cscope -dialog -diff -digraphs -ebcdic -emacs_tags -eval -ex_extra
    -extra_search -farsi -file_in_path -find_in_path -folding -footer +fork()
    -gettext -hangul_input +iconv -insert_expand -jumplist -keymap -langmap
    -libcall -linebreak -lispindent -listcmds -localmap -menu -mksession
    -modify_fname -mouse -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm
    -mouse_xterm +multi_byte -multi_lang -osfiletype -path_extra -perl -printer
    -python -quickfix -rightleft -ruby -scrollbind -signs -smartindent -sniff
    -statusline -sun_workshop -syntax -tag_binary -tag_old_static -tag_any_white
    -tcl +terminfo -termresponse -textobjects -title -toolbar -user_commands
    -vertsplit -virtualedit -visual -viminfo -vreplace +wildignore -wildmenu
    -windows +writebackup -X11 -xfontset -xim -xterm_clipboard -xterm_save
       system vimrc file: "/usr/share/vim/vim61/macros/vimrc"
         user vimrc file: "$HOME/.vimrc"
          user exrc file: "$HOME/.exrc"
      fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -march=i386 
-mcpu=i686 -
    g -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strength-reduce
    Linking: gcc   -L/usr/local/lib -o vim       -ltermcap -lacl -ldl

The easiest solution is to use "vim" and not "vi".  That should run
/usr/bin/vim which is built with many more features than /bin/vi.
If your fingers are too accustomed to "vi" for that, you could put
an alias in your ~/.bashrc file:

    alias vi=vim

Regards,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | Wireless Division
                             | Spokane, Washington, USA

Reply via email to