Wednesday, September 7, 2011

Re: HTML syntax & netrw

Ben Fritz, Wed 2011-09-07 @ 08:50:43-0700:
> Are you sure this is the only difference? stuff in $VIMRUNTIME/plugin
> is normally sourced automatically whenever you load Vim, regardless of
> what you do in Vim, unless you've turned plugins off from a command-
> line option or the 'noloadplugins' option.

Yes, I manually checked each item in the list in both cases.
netrwPlugin.vim is present if I start vim as `vim
http://tmh.cc/vimtest.html` and is not present if I use `vim
vimtest.html` (with a local copy). That's the only difference.


> How about trying editing the local file with netrw? I would expect it
> to misbehave in the same way if netrw is the culprit.

I opened the local file using the "file:" URI scheme (I assume this is
what you mean by editing locally with netrw), and interestingly, the
syntax seemed correct. I'm not sure what this means. But the problem
definitely occurs if I use "http:" or "scp:" to access a remote file. I
don't have an FTP daemon running on the remote host so I can't try that
protocol (or others) without considerable effort.


> I don't think you mentioned, did you verify that the correct filetype
> is set for both methods of editing? Maybe netrw is interfering with
> filetype detection.

Yes, the filetype is correctly identified as "html" in all cases I've
tried so far. "Resetting" the filetype as follows has no effect:

:set filetype&
:set filetype=html

Nor does:

:syntax off
:syntax on

Of course, the highlighting disappears completely after the first
command in either of the above, but returns with the same problems after
the second command.


> What version of netrw are you using (check the header info in the
> plugin files)? What version of Vim? What compiled feature set?

The comment at the top of netrwPlugin.vim says "Date: Feb 10, 2011". I
don't see anything that looks like an actual version number. As far as I
know, this is the version of netrw that is distributed with the latest
version of Vim, though. I haven't downloaded/updated it myself.

As for Vim itself:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 6 2011 10:39:41)
Included patches: 1-294
Compiled by Taylor M. Hedberg
Big version with GTK2 GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
+cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
+cmdline_info +comments +conceal +cryptv +cscope +cursorbind
+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 -lua +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 +path_extra +perl +persistent_undo
+postscript +printer -profile +python -python3 +quickfix +reltime
+rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime
+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

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: