nsis-mode - NSIS ファイルを編集したりする

1 説明

NSIS スクリプトファイルの編集用モードです。

2 インストール

NetInstaller でインストールした場合は 3 以降を、 NetInstaller + ni-autoload を使っている人は 4 以降で OK です。

  1. アーカイブをダウンロードします。

    <URL:http://miyamuko.s56.xrea.com/xyzzy/archives/nsis-mode.zip>

  2. アーカイブを展開して、$XYZZY/site-lisp 配下にファイルをコピーします。
  3. 拡張子が nsi (NSIS Script File) または nsh (NSIS Header File) のファイルを開いたときに自動的に nsis-mode になるように ~/.xyzzy または $XYZZY/site-lisp/siteinit.l に以下のコードを追加します。

    ;; nsis-mode
    (require "nsis-mode")
    (pushnew '("\\.ns[ih]$" . nsis-mode) *auto-mode-alist* :test 'equal)
  4. 設定を反映させるには xyzzy を再起動してください。

    ※siteinit.l に記述した場合には再ダンプが必要です。

3 リファレンス

3.1 キー割り当て

TAB

インデントする。

Compiler directive (!defineとか) はインデントしません。

RET
改行+インデント付け。
M-TAB

キーワードと組み込み関数の補完。

先行する文字があればその文字から始まるキーワードをツールチップで表示します。 先行する文字がなければすべてのキーワードを表示します。

3.2 変数

*nsis-indent-level*
*nsis-continued-statement-offset*

インデントレベルを設定します。

;; インデントの幅(下図で _ の部分, default=2)
(setq *nsis-indent-level* 4)

;; 継続行のオフセット(下図で - の部分, default=4)
(setq *nsis-continued-statement-offset* 4)

;; Section "Modern User Interface" SecContribModernUI
;; ____SetOutPath "$INSTDIR" \
;; ____----"\Examples\Modern UI"
;; EndSection

4 これからやるかもしれないこと

5 関連するかもしれないページ

Nullsoft Scriptable Install System // NSIS Developer Site
<URL:http://nsis.sf.net/>
NSIS related software - NSIS Archive
<URL:http://nsis.sourceforge.net/archive/nsisweb.php?page=8&instances=0>

6 ライセンス

nsis-mode は修正 BSD ライセンスに基づいて利用可能です。

Copyright (C) 2003-2004 MIYAMUKO Katsuyuki. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1 Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer as the first lines
of this file unmodified.

2 Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.