Autor Tema: Syntax Highlighter for VIM  (Leído 2325 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado kruz

  • Newbie
  • *
  • Mensajes: 9
  • Karma: 3
    • Ver Perfil
Syntax Highlighter for VIM
« en: Diciembre 06, 2010, 10:05:16 pm »
I prefer to use Linux over Windows, but when I have to use Windows, I still use gVim for editing files.  I created a simple highlighting file and it's not perfect or complete.  I've never created a syntax file, but it works for the most part.  You may have to mess with the filetype.vim file as .prg files are part of another language.  I attached the file as a txt so just rename to bennu.vim and move it to your syntax directory.  If anyone has any questions on how to get this to work properly, feel free to message me.

-Kruz
p.s.
If anyone else has any familiarity with Vim syntax files, I would appreciate any input/help/suggestions.

--- added in response 2010-12-10
I'm not sure that I have an account for the Wiki or that this type of information should go on it since it is not official, nor is it completed... it just helps highlight the constants/functions and bennu language in general. 

As far as the installation instructions go, I'm not sure about each different GNU/Linux distribution as they keep their files in different locations.  But general install instructions would go as follows:

Warning!!! If you use FoxPro, there is a conflict as FoxPro also uses .prg !!!
  • Save the file and rename to bennu.vim
  • Move the file to your Syntax directory /usr/share/vim/vim##/syntax | Windows C:\Program Files\Vim\vim##\syntax (your directory may vary depending on OS)
  • Edit the /usr/share/vim/vim##/filetype.vim to reflect the files you want to be recognized by the syntax file.  example. au BufNewFile, BufRead *.prg,*.inc setf bennu  (You will want to remove the FoxPro lines from the filetype.vim file.)

Hope this helps (:
-Kruz
« última modificación: Diciembre 10, 2010, 11:41:30 am por kruz »

Desconectado osk

  • Hero Member
  • *****
  • Mensajes: 516
  • Karma: 52
  • Sexo: Masculino
    • Ver Perfil
Re: Syntax Highlighter for VIM
« Respuesta #1 en: Diciembre 08, 2010, 02:43:18 am »
I think it could be interesting merge all posts and attachments about syntax highlighting in only one central place, if we want not to forget them.
Thanks!!

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: Syntax Highlighter for VIM
« Respuesta #2 en: Diciembre 08, 2010, 01:53:56 pm »
Thanks a lot for your help. Installation instructions?

BTW: The perfect place for such a post is the wiki :)

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re: Syntax Highlighter for VIM
« Respuesta #3 en: Diciembre 08, 2010, 02:11:00 pm »
karma! Thanks
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado blostec

  • Hero Member
  • *****
  • Mensajes: 742
  • Karma: 20
  • Sexo: Masculino
    • Ver Perfil
Re: Syntax Highlighter for VIM
« Respuesta #4 en: Diciembre 21, 2010, 05:24:23 am »
Good work, thank you! karma up  ;)