Installation script's target directory

Hugh Sasse hgs at dmu.ac.uk
Tue Aug 9 08:08:30 EDT 2005


On Tue, 9 Aug 2005, Doug Kearns wrote:

> Thanks Hugh,
>
         [...]
>
>  irb(main):008:1>   system_dir = path.sub(/\\vim\d\d\\gvim.exe/i, '')
>
         [...]
irb(main):013:0> dirs = []
=> []
irb(main):014:0> path = ''
=> ""
irb(main):015:0> Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Vim\Gvim') d
o |reg|
irb(main):016:1* path = reg['path', Win32::Registry::REG_SZ]
irb(main):017:1> end
=> "C:\\VIM\\VIM63\\gvim.exe"
irb(main):018:0> unless path.empty?
irb(main):019:1> system_dir = path.sub(/\\vim\d\d\\gvim.exe/i, '')
irb(main):020:1> dirs << system_dir + '/vimfiles'
irb(main):021:1> end
=> ["C:\\VIM/vimfiles"]
irb(main):022:0>

>
> I always forget that it's case insensitive...

Yes, same here..
>
> <snip>
>
> Thanks again,
> Doug

         Hugh


More information about the vim-ruby-devel mailing list