See ":help g:vimsyn_embed".
Apparently, by default the vim.vim syntax supports MzScheme, Python,
Perl and Ruby embedded scripts, *but only if your current Vim is
compiled with support for them*. I don't see how to mark as other than
error an embedded syntax not supported by your current Vim version, except:
Possibility 1) by extracting $VIMRUNTIME/syntax/vim.vim to (on Unix)
~/.vim/syntax/vim.vim or (on Windows) ~/vimfiles/syntax/vim.vim and
modifying the copy. Probably not worth the trouble.
Possibility 2) by availing yourself of a more poverful version of gvim.
See the following:
- Windows (pre-compiled installers with support for all 5 languages)
https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721
Click the clipboard-like icon next to any download link to see which
features are compiled-in.
- Unix/Linux: how to compile Vim for yourself with the latest bugfixes
and the features you want:
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
Best regards,
Tony.
--
better !pout !cry
better watchout
lpr why
santa claus <north pole >town
cat /etc/passwd >list
ncheck list
ncheck list
cat list | grep naughty >nogiftlist
cat list | grep nice >giftlist
santa claus <north pole > town
who | grep sleeping
who | grep awake
who | egrep 'bad|good'
for (goodness sake) {
be good
}
- This is a console version; in your previous post you talked about gvim
(a GUI version).
- Even if g:vimsyn_embed includes P it won't highlight Python code
embedded in vim scripts if Vim doesn't support Python _now_ (see below).
- This version is compiled with _dynamic_ Python support, which means it
will or won't support Python embedding depending on whether the file
python26.dll can be found at run-time.
- To know whether it has found the required DLL, type
:echo has('python')
in a running Vim. If the answer is zero, support of Python is not
included now (either because not compiled-in or because the required DLL
wasn't found).
- In particular, if your installed Python version is other than 2.6,
this version of Vim won't be able to use it.
Best regards,
Tony.
--
The real problem with fucking a sheep is that you have to walk around
in front every time you want to kiss her.
I don't see this working, but I found out why.
I have a .vim file with embedded Perl.
:echo has('perl')
1
Specifically:
+perl/dyn
Looking and using:
breakadd file vim.vim
Stepping through I see this line:
if (g:vimsyn_embed =~ 'p' && has("perl")) &&
filereadable(expand("<sfile>:p:h")."/perl.vim")
:echo expand("<sfile>:p:h")."/perl.vim"
If by chance, you have an updated copy of vim.vim and it is sourced from:
\vim\vimfiles\syntax\vim.vim
Then the above expands to:
\vim\vimfiles\syntax\perl.vim
I don't have an "updated" copy of this file, I just have the regular
distribution file:
\vim\vim72\syntax\perl.vim
So this was never loading my file.
I think Charles is the maintainer of this file.
What happens if we just do a runtime syntax/perl.vim instead or
something that will test both locations, vim72 and vimfiles?
Once I deleted the updated copy, I starting getting highlighting as I wanted.
Tony, I am glad you mentioned this option, it has always bugged me
that the Perl code I have embedded was never highlighted.
Dave
I had to search for it. First,
:help vim<Ctrl-D>
showed that there were many helptags named <filetype>.vim, or probably
more exactly <syntax>.vim. Examining the (big) list more closely showed
that vim.vim was one of them. So I did
:help vim.vim
and the needed info was there, half a page below that helptag.
Best regards,
Tony.
--
It's a good thing we don't get all the government we pay for.
let g:vimsyn_noerror = 1
As Tony pointed out, the documentation for vimL (vim-Language) syntax
highlighting is available under
:help vim.vim
Its also available under
:help ft-vim-syntax
I'm not sure why you'd want to have embedded perl script in a vimL
script that your vim can't handle, though. Is it for use on a different
machine?
Regards,
Chip Campbell
[...]
To copy the ":version" text to the clipboard in gvim:
:redir @+
:version
:redir END
then paste into your mailer and snip away what (if anything) isn't needed
See ":help :redir"
This is how I got the following (not on Windows, but it works on Windows
too):
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 3 2008 14:54:30)
Included patches: 1-64
Extra patches: Extra float functions (Bill McCarthy)
Compiled by antoine.m...@skynet.be
Huge version with GTK2-GNOME 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 +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
+find_in_path +float +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_sysmouse +mouse_xterm +multi_byte +multi_lang
-mzscheme +netbeans_intg
-osfiletype +path_extra +perl +postscript +printer +profile +python
+quickfix +reltime +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_interact +xterm_clipboard
+xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -DORBIT2=1 -pthread
-I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0
-I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1
-I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0
-I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0
-I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include
-I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0
-I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2
-I/usr/include/pango-1.0 -I/usr/include/gail-1.0
-I/usr/include/freetype2 -I/usr/include/atk-1.0
-I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/libpng12 -O2 -fno-strength-reduce -Wall
-D_FORTIFY_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV
-DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
-I/usr/include/python2.6 -pthread -I/usr/include
-D_LARGEFILE64_SOURCE=1 -I/usr/lib/ruby/1.8/i586-linux
Linking: gcc -L. -rdynamic -Wl,-export-dynamic -Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
-L/usr/local/lib -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
-lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo
-lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0
-lglib-2.0 -lgnomeui-2 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2
-lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
-lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lz
-lfontconfig -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -lgobject-2.0
-lglib-2.0 -lXt -lncurses -lacl -lgpm -Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
-L/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE -lperl -lutil -lc
-L/usr/lib/python2.6/config -lpython2.6 -lutil -Xlinker -export-dynamic
-L/usr/lib -ltcl8.5 -lieee -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lm
Best regards,
Tony.
--
CONCORDE: Message for you, sir.
He falls forward revealing the arrow with the note.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD