Taking over the maintenance of nsis.vim

136 views
Skip to first unread message

Ken Takata

unread,
Jan 14, 2018, 4:18:30 AM1/14/18
to vim...@googlegroups.com, Alex.J...@kemek.lt, n...@bitwi.se
Hi,
(Cc: Alex Jakushev, Nikolai Weibull)

Currently, plugin files for NSIS script are not maintained.
Both syntax/nsis.vim and ftplugin/nsis.vim are not updated for more than
ten years.  I consider taking over the maintenance of them, and I created
a repository for them:

Changes are:

* Support NSIS 3.02.
  New instructions, options, etc.
* Support LogicLib.nsh.
  Conditional statements like ${If}..${Else}..${EndIf}.
* Support matchit.vim.
* Add indent plugin.
* And more.

I'd like to wait a few weeks for comments. I will send updated files to Bram
after that.

Regards,
Ken Takata

Steve Hall

unread,
Jan 15, 2018, 10:32:11 AM1/15/18
to vim...@googlegroups.com
On Sun, Jan 14, 2018 at 4:18 AM, Ken Takata <ktakat...@gmail.com>
wrote:
> Currently, plugin files for NSIS script are not maintained. Both
> syntax/nsis.vim and ftplugin/nsis.vim are not updated for more than
> ten years.

Any interest in moving the entire Vim installer to NSIS? I started
doing this with Cream for Vim's installer in 2003. It installs
shortcuts, start menus, icons, registry, right click menu, write the
vimrc, uninstaller, etc.--all without needing Vim's little terminal
pop-up window and DOS command line prompting system.

-- 
Steve Hall  [ digitect dancingpaper com ]

Bram Moolenaar

unread,
Jan 15, 2018, 1:56:47 PM1/15/18
to vim...@googlegroups.com, Steve Hall

Steve Hall wrote:

> On Sun, Jan 14, 2018 at 4:18 AM, Ken Takata <ktakat...@gmail.com>
> wrote:
> >
> > Currently, plugin files for NSIS script are not maintained. Both
> > syntax/nsis.vim and ftplugin/nsis.vim are not updated for more than
> > ten years.
>
> Any interest in moving the entire Vim installer to NSIS? I started
> doing this with Cream for Vim's installer in 2003. It installs
> shortcuts, start menus, icons, registry, right click menu, write the
> vimrc, uninstaller, etc.--all without needing Vim's little terminal
> pop-up window and DOS command line prompting system.

There have been a few attempts at this, but they all dropped some
funcationality. Best would be to do this step by step, making sure it
still works for all different kinds of users.
It should be a bit easier now that we dropped support for Windows 95.

--
hundred-and-one symptoms of being an internet addict:
211. Your husband leaves you...taking the computer with him and you
call him crying, and beg him to bring the computer back.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Steve Hall

unread,
Jan 15, 2018, 5:22:34 PM1/15/18
to Bram Moolenaar, vim...@googlegroups.com, Steve Hall
On Mon, Jan 15, 2018 at 1:56 PM, Bram Moolenaar <Bram moolenaar net>
wrote:
> Steve Hall wrote:
> >
> > Any interest in moving the entire Vim installer to NSIS?
>
> There have been a few attempts at this, but they all dropped some
> funcationality. Best would be to do this step by step, making sure
> it still works for all different kinds of users.

Maybe why nobody has tackeled this. Going through dosinst.c I find all
these options:

* (Find existing non-standard installation)
* Installation location
* Runtime location
* Working directory location
* Plugins location ($VIM or $HOME)
* Vi, Vim, or Vim+ behavior
* Remap some keys to Windows behavior
* Mouse right button behavior (Unix, Windows, visual)
* Install vim.bat and/or gvim.bat in %PATH%
* Install vimrc
* Install diff.exe
* Install explorer right-click menu (gvimext.dll)
* Create Start Menu shortcuts
* Create Desktop shortcuts
* Register OLE

Why not just install with sane defaults? Cream's Vim installer (0.5m
downloads) uses just one pick in three choice screens:

* Forced acceptance of license (only choice actually required)
* Confirm default behaviors (tick/untick):
  + Start Menu shortcut
  – (No Desktop shortcut)
  + Add Windows Explorer right-click menu
  + Native language support
  + Install vimrc (prompt to back up if existing)
  – (No command prompt .bat files)
  + Install Vim extension for MS Visual Studio
  – (No plugin directories in %HOMEDRIVE%%HOMEPATH%)
* Confirm default installation path (C:\Program Files (x86)\vim)

There is one more prompt to overwrite if there is already a (g)vimrc.

Our assumption is that experts don't need a GUI installer, so the NSIS
is for newbies or casual users. It puts runtimes, plugins, diff, etc.
in the sofware directory, registers OLE, installs a single windows
explorer right-click "Edit" menu item, and uses Vim's default options.

A similar structure to Vim's NSIS would avoid it (and dosinst.c) being
too complex to write and maintain. [Please take as Einstein and Occam
simplicity, not BSB (http://dilbert.com/strip/2017-12-25 ff). ;) ]

KF Leong

unread,
Jan 15, 2018, 10:11:10 PM1/15/18
to vim_dev
Please check out this implementation by Guo Peng Wen many years ago. I am using it myself and it works quite well.

https://github.com/gpwen/vim-installer-mui2

HTH.
KF

Bram Moolenaar

unread,
Jan 16, 2018, 8:13:20 AM1/16/18
to Steve Hall, vim...@googlegroups.com
We are talking about the NSIS installer, not the command line one.

> Why not just install with sane defaults? Cream's Vim installer (0.5m
> downloads) uses just one pick in three choice screens:
>
> * Forced acceptance of license (only choice actually required)
> * Confirm default behaviors (tick/untick):
> + Start Menu shortcut
> – (No Desktop shortcut)
> + Add Windows Explorer right-click menu
> + Native language support
> + Install vimrc (prompt to back up if existing)
> – (No command prompt .bat files)
> + Install Vim extension for MS Visual Studio
> – (No plugin directories in %HOMEDRIVE%%HOMEPATH%)
> * Confirm default installation path (C:\Program Files (x86)\vim)
>
> There is one more prompt to overwrite if there is already a (g)vimrc.

Let's not try to discuss removing options from the NSIS installer, there
is always someone who needs some option. Let's just make it work well
and perhaps even add some option. We probably still need to invoke the
command line command, e.g. to create the batch files.

> Our assumption is that experts don't need a GUI installer, so the NSIS
> is for newbies or casual users. It puts runtimes, plugins, diff, etc.
> in the sofware directory, registers OLE, installs a single windows
> explorer right-click "Edit" menu item, and uses Vim's default options.
>
> A similar structure to Vim's NSIS would avoid it (and dosinst.c) being
> too complex to write and maintain. [Please take as Einstein and Occam
> simplicity, not BSB (http://dilbert.com/strip/2017-12-25 ff). ;) ]

The command line installer has been around for many years, there is no
maintenance problem.


--
hundred-and-one symptoms of being an internet addict:
214. Your MCI "Circle of Friends" are all Hayes-compatible.

Ken Takata

unread,
Jan 18, 2018, 4:22:04 AM1/18/18
to vim_dev
https://groups.google.com/d/msg/vim_dev/W5bHwWqHZ9g/FBMGJP8OAQAJ

Hi Steve,

My original post was talking about NSIS ftplugin/indent/syntax plugins,
not about the install script of Vim, but it's okay. ;-)


2018/1/16 Tue 7:22:34 UTC+9 Steve Hall wrote:
> On Mon, Jan 15, 2018 at 1:56 PM, Bram Moolenaar <Bram moolenaar net>
> wrote:
> > Steve Hall wrote:
> > >
> > > Any interest in moving the entire Vim installer to NSIS?
> >
> > There have been a few attempts at this, but they all dropped some
> > funcationality. Best would be to do this step by step, making sure
> > it still works for all different kinds of users.
>
>
> Maybe why nobody has tackeled this. Going through dosinst.c I find all
> these options:
>
>
> * (Find existing non-standard installation)
> * Installation location
> * Runtime location
> * Working directory location
> * Plugins location ($VIM or $HOME)
> * Vi, Vim, or Vim+ behavior
> * Remap some keys to Windows behavior
> * Mouse right button behavior (Unix, Windows, visual)
> * Install vim.bat and/or gvim.bat in %PATH%
> * Install vimrc
> * Install diff.exe
> * Install explorer right-click menu (gvimext.dll)

Recently I changed this to install both 64-bit and 32-bit version on
64-bit platform. (Including iconv and gettext DLLs.)

> * Create Start Menu shortcuts
> * Create Desktop shortcuts
> * Register OLE
>
>
> Why not just install with sane defaults? Cream's Vim installer (0.5m
> downloads) uses just one pick in three choice screens:
>
>
> * Forced acceptance of license (only choice actually required)
> * Confirm default behaviors (tick/untick):
> + Start Menu shortcut
> – (No Desktop shortcut)
> + Add Windows Explorer right-click menu
> + Native language support
> + Install vimrc (prompt to back up if existing)
> – (No command prompt .bat files)
> + Install Vim extension for MS Visual Studio
> – (No plugin directories in %HOMEDRIVE%%HOMEPATH%)
> * Confirm default installation path (C:\Program Files (x86)\vim)

Where can I find your NSIS script (for cream)?
Does it use MUI or MUI2?


> There is one more prompt to overwrite if there is already a (g)vimrc.
>
>
> Our assumption is that experts don't need a GUI installer, so the NSIS
> is for newbies or casual users. It puts runtimes, plugins, diff, etc.
> in the sofware directory, registers OLE, installs a single windows
> explorer right-click "Edit" menu item, and uses Vim's default options.
>
>
> A similar structure to Vim's NSIS would avoid it (and dosinst.c) being
> too complex to write and maintain. [Please take as Einstein and Occam
> simplicity, not BSB (http://dilbert.com/strip/2017-12-25 ff). ;) ]

Regards,
Ken Takata

KF Leong

unread,
Jan 19, 2018, 10:10:27 PM1/19/18
to vim_dev
Please check out this implementation by Guo Peng Wen many years ago. I am using it myself and it works quite well.

It's using MUI2.

https://github.com/gpwen/vim-installer-mui2

HTH.
KF

Ken Takata

unread,
Jan 21, 2018, 10:02:35 AM1/21/18
to vim_dev
Hi Bram,

An error mail was returned from Alex's mail address and no response from
Nikolai. So I will take over the maintenance of them.

I attached an update of ftplugin/nsis.vim and syntax/nsis.vim, and also newly
added indent/nsis.vim.
Please include them.

Regards,
Ken Takata

nsis.zip

Bram Moolenaar

unread,
Jan 25, 2018, 3:56:39 PM1/25/18
to vim...@googlegroups.com, Ken Takata
I'll include the files, thanks.

The nsis.vim file uses line continuation, but doesn't set 'cpo'.
Please fix.

--
hundred-and-one symptoms of being an internet addict:
237. You tattoo your email address on your forehead.

Ken Takata

unread,
Jan 25, 2018, 6:06:53 PM1/25/18
to vim_dev
Hi Bram,

Updated!

Regards,
Ken Takata

nsis.zip

Bram Moolenaar

unread,
Jan 26, 2018, 4:06:43 PM1/26/18
to vim...@googlegroups.com, Ken Takata
Thanks.

--
"Women marry men hoping they will change. Men marry women hoping
they will not. So each is inevitably disappointed."
- Einstein
Reply all
Reply to author
Forward
0 new messages