Nmap Development mailing list archives
Re: Modules for vim/emacs
From: Fyodor <fyodor () insecure org>
Date: Fri, 5 Nov 2010 00:12:19 -0700
On Tue, Nov 02, 2010 at 08:29:00PM -0500, Ron wrote:
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. My point is, I think this should be added to the top of every script. Unfortunately, the emacs one (the first one) *has* to be the first line in the file. The vim one can go at the bottom or middle or whatever, it doesn't matter where it goes. Opinions?
You make some good points, and I agree that Lua mode can make editing NSE scripts easier in some editors. But I'm not sure it is worth adding those four lines to the top of hundreds of files. Especially since users of other editors might then want to add their own codes as well. I think I favor this aproach: 1) We should definitely document the procedure for registering NSE to Lua in common editors. David already posted a recommended .vimrc line. Now can someone post their preferred mechanism for emacs or other editors? We can then add the instructions to scripting.xml. 2) Emacs and Vim are fellow open source projects--maybe they would register .nse to Lua by default? They don't seem to be registering the extension to anything at the moment (at least in my default Fedora 14 install), and I don't know of any competing uses for ".nse". Do we have any volunteers to file a bug report/feature request or otherwise communicate this idea to the folks behind your favorite editor? If you file a report, you can post the URL here so that we can add comments and second the request. I think it would be great for the premier editors to support NSE out of the box! And we're only talking about a one-line configuration change here. Cheers, Fyodor _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Modules for vim/emacs Ron (Nov 02)
- Re: Modules for vim/emacs David Fifield (Nov 02)
- Re: Modules for vim/emacs Ron (Nov 02)
- Re: Modules for vim/emacs Fyodor (Nov 05)
- Re: Modules for vim/emacs Mak Kolybabi (Nov 05)
- Re: Modules for vim/emacs David Fifield (Nov 02)