Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Vim yodl syntax highlighting



Bart Schaefer wrote on Mon, Jul 06, 2015 at 15:31:58 -0700:
> On Jul 6,  2:12pm, Daniel Shahaf wrote:
> }
> } Should this live in the zsh repository?  If it's useful to people it
> } should live alongside the code, but if it's just me, I'll throw it on my
> } personal github account.
> 
> There are presently
> 
>     .editorconfig
>     Src{,/{Modules,Builtins,Zle}}/.exrc
> 
> already in the distribution, so there would be some precedent for putting
> this in Doc/ if there were a reasonably portable way to make it load (or
> not) as required/supported by the local vi-alike.

What's your concern — portability (not causing errors for people who use
other vi-like editors) or usability (automatically enabling the syntax
highlighting)?

Compatibility with vi isn't an issue: these are Vim scripts, vi won't
see them and won't try to execute them in the first place.

Compatibility with Vim builds that don't support syntax highlighting...
I think this can be made to work.

Automatically enabling syntax highlighting: I don't believe Vim has
built-in support for letting a directory tree specify its own syntax
highlighting, so I assume _some_ opt-in step would be needed.  We could
make this as frictionless as possible, for example, by putting the file in
    Doc/editorconfig/vim/syntax/zyodl.vim
and having a
    Doc/editorconfig/vim/filetype.vim
that installs filetype-detection for the zyodl filetype; this way,
people will be able to get syntax highlighting simply by adding
Doc/editorconfig/vim/ to their 'runtimepath' setting (aka, a one-line
~/.vimrc change).

Perhaps there's a better way; I'm open to suggestions from the audience.

> I have an ancient but still functional yodl-mode.el around, somewhere.

Obviously we can't have _that_ in the repository :-)



Messages sorted by: Reverse Date, Date, Thread, Author