vim-puppet syntax highlighting scripts are not effective

Bug #1390771 reported by Paul Kilgo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

The scripts from vim-puppet are installed to `/usr/share/vim/addons` which doesn't appear to be used by the current vim distributed with Ubuntu 14.04. The net effect is that installing the vim-puppet package seems to do nothing when you edit Puppet scripts.

Here is an example site.pp file:

file { '/etc/motd':
  contents => 'Hello, world!',
}

To reproduce:

1. Run "vim site.pp"

Expected behavior:

Syntax highlighting works. Running ":set filetype?" reveals that the filetype is "puppet".

Observed behavior:

Syntax highlighting does not work. Running ":set filetype?" shows there is no filetype set. On some files, some other script detects the filetype as "conf".

If I run "vim site.pp" and then ":scriptnames" this is what I get:

  1: /usr/share/vim/vimrc
  2: /usr/share/vim/vim74/debian.vim
  3: /usr/share/vim/vim74/syntax/syntax.vim
  4: /usr/share/vim/vim74/syntax/synload.vim
  5: /usr/share/vim/vim74/syntax/syncolor.vim
  6: /usr/share/vim/vim74/filetype.vim
  7: ~/.vimrc
  8: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
  9: /usr/share/vim/vim74/plugin/gzip.vim
 10: /usr/share/vim/vim74/plugin/matchparen.vim
 11: /usr/share/vim/vim74/plugin/netrwPlugin.vim
 12: /usr/share/vim/vim74/plugin/rrhelper.vim
 13: /usr/share/vim/vim74/plugin/spellfile.vim
 14: /usr/share/vim/vim74/plugin/tarPlugin.vim
 15: /usr/share/vim/vim74/plugin/tohtml.vim
 16: /usr/share/vim/vim74/plugin/vimballPlugin.vim
 17: /usr/share/vim/vim74/plugin/zipPlugin.vim
 18: /usr/share/vim/vim74/scripts.vim

Since most of these scripts are installed into /usr/share/vim/vim74 I guessed the files are just in the wrong place. I linked each of the installed "puppet.vim" files into their corresponding subdirectory in `vim74/`. This gets the expected behavior for me.

This is what I get after running "vim site.pp" and then ":scriptnames" after doing this.

  1: /usr/share/vim/vimrc
  2: /usr/share/vim/vim74/debian.vim
  3: /usr/share/vim/vim74/syntax/syntax.vim
  4: /usr/share/vim/vim74/syntax/synload.vim
  5: /usr/share/vim/vim74/syntax/syncolor.vim
  6: /usr/share/vim/vim74/filetype.vim
  7: /usr/share/vim/vim74/ftdetect/puppet.vim
  8: ~/.vimrc
  9: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
 10: /usr/share/vim/vim74/plugin/gzip.vim
 11: /usr/share/vim/vim74/plugin/matchparen.vim
 12: /usr/share/vim/vim74/plugin/netrwPlugin.vim
 13: /usr/share/vim/vim74/plugin/rrhelper.vim
 14: /usr/share/vim/vim74/plugin/spellfile.vim
 15: /usr/share/vim/vim74/plugin/tarPlugin.vim
 16: /usr/share/vim/vim74/plugin/tohtml.vim
 17: /usr/share/vim/vim74/plugin/vimballPlugin.vim
 18: /usr/share/vim/vim74/plugin/zipPlugin.vim
 19: /usr/share/vim/vim74/scripts.vim
 20: /usr/share/vim/vim74/syntax/puppet.vim

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: vim-puppet 3.4.3-1
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Nov 8 12:28:14 2014
InstallationDate: Installed on 2014-04-29 (193 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
PackageArchitecture: all
SourcePackage: puppet
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Paul Kilgo (paulkilgo) wrote :
Revision history for this message
Stig Sandbeck Mathisen (ssm) wrote :

The package description for "vim-puppet" says:

# As per the Debian vim policy, installed addons are not activated
# automatically, but the "vim-addon-manager" tool can be used for this
# purpose.

Not sure if this is also the Ubuntu policy for vim addons, but since this package is unmodified from its Debian version, that's what you see.

Revision history for this message
Paul Kilgo (paulkilgo) wrote :

Ah, just missed that. Thanks for clearing that up. I've marked this report invalid.

Changed in puppet (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.