Research
.
Skip Search Box

SELinux Mailing List

Re: vim selinux syntax file

From: Thomas Bleher <bleher_at_informatik.uni-muenchen.de>
Date: Thu, 1 Jan 2004 21:49:24 +0100

  • carstengrohmann@gmx.de [2003-12-05 11:14]:
    > has anybody writen an vim syntax file of the selinux policy?

I have recently written a syntax file for te-files, it is attached as te.vim. To use it, drop the file into /usr/share/vim/current/syntax/ or ~/.vim/syntax/. You can autoload the syntax-file by adding something like the following to your filetype.vim[1]:

        augroup filetypedetect
        au BufNewFile,BufRead *.te     setf te
        augroup END

Also attached is a patch against the policy-Makefile which implements ctags-support for the policy source.
After a "make tags" you can (in vim) press Control-] over every attribute, type or macro and vim will directly jump to its definition. If the tags-file is not in your working directory you will have to tell vim how to find it (:set tags=...)
You will need the exuberant ctags-package for this functionality.

Happy New Year to you all!

Thomas Bleher

[1]: The global filetype.vim resides in /usr/share/vim/current/, the local equivalent is in ~/.vim/

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  • text/plain attachment: te.vim
Received on Thu 1 Jan 2004 - 15:49:31 EST
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service