sponsor Vim development Vim logo Vim Book Ad

NSIS syntax highlighting : NSIS syntax file for NSIS 2.46

 script karma  Rating 22/10, Downloaded by 1394  Comments, bugs, improvements  Vim wiki

created by
Chris Morgan
 
script type
syntax
 
description
This is a new syntax file for NSIS 2.46, properly documented as to where in the user manual each keyword comes from as well.  It was based originally on nsis.vim from Vim 7.2 (last edited 12 May 2004), and all keywords were refreshed from the 2.46 user manual.

All new NSIS syntax is properly supported and highlighted.

(I really think that this should go into the Vim core runtime files as an update to the old script, but I'm not sure about how to go about getting that to happen.)
 
install details
Place nsis.vim in $VIMRUNTIME\syntax or in vimfiles\syntax (wherever vimfiles is).

If you want NSIS script headers to be highlighted as well (which you should and which Vim itself should), add:
    augroup filetypedetect
        au BufNewFile,BufRead *.nsh setf nsis
    augroup END
to your vimrc, or just the middle line to $VIMRUNTIME\filetype.vim just below the *.nsi line (around line 1216)

(It works for Vim 5.7 or later, designed in 7.2/7.3)
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
nsis.vim 2.46-2 2012-03-05 5.7 Chris Morgan Highlight $' and $\` as well as $\"
nsis.vim 2.46-1 2012-03-04 5.7 Chris Morgan Improved !else to highlight the optional if((macro)?n?def) argument
Added SetPluginUnload (not in NSIS user manual; deprecated but still used)
Fixed highlighting of any single character as Number (bad decimal rule)
Started doing incorrect syntax error highlighting and only highlighting arguments in the proper place
Added the line continuation character (\)
Variable highlighting (far from perfect and doesn't auto-update, but it may be helpful)
Added extra Unicode NSIS instructions (and nsis_no_unicode_instructions to not highlight them): FileReadWord, FileReadUTF16LE, FileWriteWord, FileWriteUTF16LE, FindProc
Added MB_USERICON to MessageBox parameters
nsis.vim 2.45-3 2009-12-08 5.7 Chris Morgan Fixed ; or # comment characters at end of line making the next line a comment
Fixed ${|} and ${||} LogicLib highlighting
Changed nsisTodo list's contents and added it and @Spell to a new nsisCommentGroup
nsis.vim 2.45-2 2009-11-22 5.7 Chris Morgan Fixed missing colouring of nsisConstVar (NSIS constants like $DESKTOP)
nsis.vim 2.45-1 2009-11-22 5.7 Chris Morgan Initial upload
ip used for rating: 100.24.118.144

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
OSDN