Nmap Development mailing list archives

Re: Modules for vim/emacs


From: Ron <ron () skullsecurity net>
Date: Tue, 2 Nov 2010 21:28:01 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 2 Nov 2010 18:50:06 -0700 David Fifield <david () bamsoftware com> wrote:
On Tue, Nov 02, 2010 at 08:29:00PM -0500, Ron wrote:
In the latest revision of my sample script, I added modelines to
the top: http://nmap.org/svn/docs/sample-script.nse

Specifically:
-- -*- mode: lua -*-
-- vim: set filetype=lua :
-- The preceding lines should be left intact to help vim/emacs do
syntax -- highlighting

Basically, they tell vim/emacs that it's a lus file, despite the
extension being .nse. The first thing I do when I start working on
NSE on a new box is update my vim syntax file appropriately, but I'm
guessing that not everybody knows how to do that so having a hint to
the editor that it's a lua file could be handy. 

I've tried adding this to a ~/.vimrc:

au BufNewRead,BufRead *.nse set filetype=lua

That doesn't solve the problem of having to do it on every new
machine, but it's less invasive than editing the syntax file.

David Fifield

Yeah, I'm thinking more about others than myself with this, and I doubt others would know how to do that. 

The talk I'm doing at B-sides in 2 weeks is going to be largely about how to get started with NSE dev, so I'm trying to 
think of ways to lower the bar to script writing that might scare some people off. This is one thing that could 
potentially help. 

Ron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAkzQyLYACgkQ2t2zxlt4g/SJoQCdEt39hcdA08TYV0YR4dB89ABK
pnkAoNL973om+t9jq39qwpGajAapvTVx
=a+nQ
-----END PGP SIGNATURE-----
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: