Package: vim-scripts
Version: 20210124.2
Severity: normal
Tags: upstream
X-Debbugs-Cc: d...@syn-net.org

Dear Maintainer,

calling `:Vimplate <TAB>` (in vim after `:plugadd! vimplate`) caused the 
following error message:

  :Vimplate Use of uninitialized value in opendir at /usr/bin/vimplate line 216.

The problem seems to occur because the `vimplate -listtemplate` command / 
option fails:

  ❯ vimplate -listtemplates
  Use of uninitialized value in opendir at /usr/bin/vimplate line 216.
  readdir() attempted on invalid dirhandle DIR at /usr/bin/vimplate line 218.

  ❯ vimplate -listtemplates -d .
  Use of uninitialized value in opendir at /usr/bin/vimplate line 216.
  readdir() attempted on invalid dirhandle DIR at /usr/bin/vimplate line 218.

I expected the template files (*.tt) files to be listed of the current
/ given directory.

I then created a .vimplaterc file with `vimplate -createconfig` and adjusted 
$Config:opt:dir option:

  $Config::opt = {
                    dir => '/home/jkirk/.vim/vimplate-templates',
                    [...]
  },

Vimplate then listed the template files nicely:

  ❯ vimplate -listtemplates
  ansible-role
  network-definition
  ddj
  new-kopano-user
  journal
  doc-review
  helios-update

The man page vimplate(1) + /usr/share/doc/vim-scripts/README.Debian do not
mention the need of the .vimplaterc.
(I only then found the "Installation" section in 
/usr/share/doc/vim-scripts/html/vimplate.html).

So there are two issues:

* I am not sure where I should have started reading the documentation
but maybe we could improve the documentation somehow?
* Vimplate does not list templates with the `-d` option without a .vimplaterc 
file

As a side note:

  # This is an example configuration.
  # please see: http://napali.ch/vimplate

http://napali.ch/vimplate does not exist anymore.

Thanks for maintaining vim-scripts!

Best,
 - Darsha

-- System Information:
Debian Release: 12.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-26-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages vim-scripts depends on:
ii  vim             2:9.0.1378-2
ii  vim-gtk3 [vim]  2:9.0.1378-2

vim-scripts recommends no packages.

Versions of packages vim-scripts suggests:
pn  ctags             <none>
ii  libtemplate-perl  2.27-1+b5
pn  perlsgml          <none>

-- no debconf information

Reply via email to