Larry Alkoff wrote:
A.J.Mechelynck wrote:
Larry Alkoff 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?

Regards,
Chip Campbell




Hello Chip.

:version shows 7.0

It ought to show about a page of info. See at bottom for instance what mine displays.


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

Larry


My vim is from Kubuntu Edgy Eft. It would be surprising if they crippled the help.

Here is my :version.  I thought you only wanted the version number - sorry.

:version
VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57)
Included patches: 1-6
Compiled by [EMAIL PROTECTED]
Big version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +dialog_con +diff +digraphs -dnd -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 -mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -netbeans_intg -osfiletype +path_extra -perl +postscript +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 +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
   system vimrc file: "$VIM/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 -g -Wall
Linking: gcc   -L/usr/local/lib -o vim       -lncurses -lgpm
Hit ENTER or type command to continue

I've tried various things to continue the listing but it always goes back to the main editing screen. Please tell me how to see the rest of it.

Larry



The above is the complete listing for that version. You can also get it into a file or (if compiled with clipboard support) into the clipboard, by using the ":redir" command (see ":help :redir"). Or even at the shell prompt:

        vim --version >version.text

The listing you gave above is for Vim 6.4.6 which has +mouse and +version, and where your vimrc should work with no error. If you do

        vi --version >version7.txt

on your 7.0 version, I expect you'll see "Tiny version without GUI" and also -mouse and -syntax, which explain the errors you got. On the same system, using "vim" rather than "vi" should cure the error, if some "vim" program is installed under that name. On RedHat-like system, there are up to four "vim" packages, all of which can be installed side-by-side:

        vim-common
                required by each of the others
                contains the runtime files
                contains no editor executables
        vim-minimal
                a "minimum" version of Vim, installed as /bin/vi
                includes neither syntax highlighting, mouse support, nor even
                expression evaluation
                it will be mounted even in single-user mode
        vim-enhanced
                an all-purpose Vim for use in console mode
                installed as /usr/bin/vim
                contains almost everything except the GUI code
        vim-x11
                installed as /usr/X11R6/bin/gvim
                contains everything, including the GUI.

You may install all four packages, then invoke Vim as:
- vi    only when working in single-user mode (for system repairs), if
        /usr is not mounted or is corrupt.
- vim   in Console mode
- gvim  when working in an X11 window manager.

You should also bracket the vimrc lines which give an error in some versions, such as:

        if has("syntax")
                syntax on
        endif
and
        if has("mouse")
                set mouse=a
        endif

Versions without expression evaluation will skip everything from "if" to "endif", thus also giving no error.


Best regards,
Tony.
--
The New Testament offers the basis for modern computer coding theory,
in the form of an affirmation of the binary number system.

        But let your communication be Yea, yea; nay, nay: for
        whatsoever is more than these cometh of evil.
                -- Matthew 5:37

Reply via email to