On 2020-01-11, Jorge Almeida wrote:
> I'm fighting the following strange behaviour:
> >From an xterm, in Linux:
> $ vim -S bar.vim foo.txt
> 
> bar.vim is a very basic syntax file. What happens is that foo.txt gets
> edited but the syntax highlighting is missing.
> I can activate it via
> :so bar.vim
> but it should not be necessary. What's wrong?
> 
> Note that
> $ gvim -S bar.vim foo.txt
> edits the file with syn. hi. active.

It works for me.

I created the following files,

----------------------------- bar.vim ------------------------------
syn keyword Statement cow
----------------------------- foo.txt ------------------------------
The cow stood in the pasture.
--------------------------------------------------------------------

and ran vim as follows:

    $ vim -N -u NONE --cmd 'syntax on' -S bar.vim foo.txt

The word "cow" was highlighted in yellow, as expected.

The vim I used is a normal version, reasonably up to date.

    $ vim --version
    VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 17 2019 13:33:01)
    Included patches: 1-18
    Compiled by gary@aurora
    Normal version with GTK2 GUI.  Features included (+) or not (-):
    ...

Regards,
Gary

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/20200111185152.GA7193%40phoenix.

Reply via email to