vim syntax headers

2013-09-02 Thread Florent Peterschmitt
Hi,

I want to use this header (or footer) to tell vim showing syntax
highliting on Apache conf files:

# vim: syntax=apache

If put at head of file, only the comment will be colored, not the text.
If put at the end of fiel, nothing is colored.

Then if a :set syntax=apache, syntax goes on.

Here is vimrc I use:
http://projet.beastie.eu/?p=desktop-config.git;a=blob_plain;f=vimrc;hb=HEAD

Any idea?

-- 
Florent Peterschmitt   | Please:
flor...@peterschmitt.fr|  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92   |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)



signature.asc
Description: OpenPGP digital signature


Re: vim syntax headers

2013-09-02 Thread Pietro Cerutti
On 2013-Sep-02, 11:39, Florent Peterschmitt wrote:
 Hi,
 
 I want to use this header (or footer) to tell vim showing syntax
 highliting on Apache conf files:
 
 # vim: syntax=apache

try with

# vim: ft=apache

 
 If put at head of file, only the comment will be colored, not the text.
 If put at the end of fiel, nothing is colored.
 
 Then if a :set syntax=apache, syntax goes on.
 
 Here is vimrc I use:
 http://projet.beastie.eu/?p=desktop-config.git;a=blob_plain;f=vimrc;hb=HEAD
 
 Any idea?
 
 -- 
 Florent Peterschmitt   | Please:
 flor...@peterschmitt.fr|  * Avoid HTML/RTF in E-mail.
 +33 (0)6 64 33 97 92   |  * Send PDF for documents.
 http://florent.peterschmitt.fr |  * Trim your quotations. Really.
 Proudly powered by Open Source | Thank you :)
 



-- 
Pietro Cerutti
The FreeBSD Project
g...@freebsd.org

PGP Public Key:
http://gahr.ch/pgp


pgpWadfH4SbuS.pgp
Description: PGP signature


Re: vim syntax headers

2013-09-02 Thread Serpent7776
Hello,

 Hi,
 
 I want to use this header (or footer) to tell vim showing syntax
 highliting on Apache conf files:
 
 # vim: syntax=apache
 
 If put at head of file, only the comment will be colored, not the
 text. If put at the end of fiel, nothing is colored.
 
 Then if a :set syntax=apache, syntax goes on.
 
 Here is vimrc I use:
 http://projet.beastie.eu/?p=desktop-config.git;a=blob_plain;f=vimrc;hb=HEAD
 
 Any idea?

Try this:
# vim: set syntax=apache

-- 

 Serpent

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: vim syntax headers

2013-09-02 Thread Florent Peterschmitt
Le 02/09/2013 12:20, Pietro Cerutti a écrit :
 try with
 
 # vim: ft=apache

No more results.

-- 
Florent Peterschmitt   | Please:
flor...@peterschmitt.fr|  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92   |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)



signature.asc
Description: OpenPGP digital signature


Re: vim syntax headers

2013-09-02 Thread Florent Peterschmitt
Le 02/09/2013 12:27, Serpent7776 a écrit :
 Try this:
 # vim: set syntax=apache

Doesn't work anymore. I built vim 7.4 manually (and installed it in
~/.local), it doesn't work anymore but it's ok on Debian with vim 7.4.

A bug somewhere?

-- 
Florent Peterschmitt   | Please:
flor...@peterschmitt.fr|  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92   |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)



signature.asc
Description: OpenPGP digital signature


Re: vim syntax headers

2013-09-02 Thread olli hauer
On 2013-09-02 13:44, Florent Peterschmitt wrote:
 Le 02/09/2013 12:27, Serpent7776 a écrit :
 Try this:
 # vim: set syntax=apache
 
 Doesn't work anymore. I built vim 7.4 manually (and installed it in
 ~/.local), it doesn't work anymore but it's ok on Debian with vim 7.4.
 
 A bug somewhere?
 

perhaps modline is disabled?

echo 'set modeline'  ~/.vimrc



___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: vim syntax headers

2013-09-02 Thread Florent Peterschmitt
Le 02/09/2013 14:22, olli hauer a écrit :
 perhaps modline is disabled?
 
 echo 'set modeline'  ~/.vimrc

You rock! Thanks for this :)

-- 
Florent Peterschmitt   | Please:
flor...@peterschmitt.fr|  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92   |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)



signature.asc
Description: OpenPGP digital signature


Re: vim syntax headers

2013-09-02 Thread Michael Schuh


  Try this:
  # vim: set syntax=apache

 Doesn't work anymore. I built vim 7.4 manually (and installed it in
 ~/.local), it doesn't work anymore but it's ok on Debian with vim 7.4.

 A bug somewhere?


should work since vim 6.0;
may be modelines are disabled per default for security concerns?
http://vimdoc.sourceforge.net/htmldoc/options.html#'modeline'

you can figure if modelines are enabled and if the area is big enough, by
checking the settings: [ESC]:set

or try [ESC]:help modelines.
and if approbiate review your .vimrc/.exrc

modeline boolean
modelines no_of_lines to check

defaults to 5, if your comment before (at the beginning of the file) or
after (at the end of the file) is to
big no modeline gets loaded.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: vim syntax headers

2013-09-02 Thread Florent Peterschmitt
Le 02/09/2013 18:30, Michael Schuh a écrit :
 should work since vim 6.0;
 may be modelines are disabled per default for security concerns?

Yep, someone found the solution and then I searched for the answer about
modelines and found security problems. I read[0] that modelines are just
able to do set work.

So I think using modelines is safe now and the default behaviour can be
changed, or documented at installation. What do you -all- think about it?

[0] http://usevim.com/2012/03/28/modelines/

-- 
Florent Peterschmitt   | Please:
flor...@peterschmitt.fr|  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92   |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)



signature.asc
Description: OpenPGP digital signature