Forge Home


Manage VIM via puppet.


370 latest version

5.0 quality score

Version information

  • 2.8.0 (latest)
  • 2.7.0
  • 2.6.0
  • 2.5.0
  • 2.4.0
  • 2.3.2
  • 2.3.1
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.3
  • 2.0.1
  • 2.0.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Jul 15th 2022
This version is compatible with:
  • Puppet Enterprise 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >=6.0.0 <8.0.0
  • , , OracleLinux, Scientific, , , Gentoo, FreeBSD, Solaris

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'saz-vim', '2.8.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add saz-vim
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install saz-vim --version 2.8.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



saz/vim — version 2.8.0 Jul 15th 2022

puppet-vim Puppet Forge CI

Manage VIM via puppet.

Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor 'Vi', with a more complete feature set.

This module aims to enable easy installation and configuration of VIM through class parameters on different platforms, in a way that the administrator can easily set it up differently according to need and/or personal taste.


    class { 'vim': }

Class parameters

  • set_as_default - Set VIM as default editor (default: true).
  • ensure - Whether or not VIM will be installed (default: present).
  • autoupgrade - Whether or not the VIM package should be automatically kept up-to-date using the distribution's packaging system (default: false).
  • set_editor_cmd - The command used to set VIM as the default editor. Be careful if you're setting this parameter (default: update-alternatives --set editor /usr/bin/${editor_name} for Debian)
  • test_editor_set - Command used to verify that VIM is the default editor. Be careful if you're setting this parameter (default: test /etc/alternatives/editor -ef /usr/bin/${editor_name for Debian)
  • conf_file - Path to VIM's main configuration file (default: /etc/vim/vimrc (Debian), /etc/vimrc (RedHat))
  • opt_nocompatible - If true, "set nocompatible" is added to the top of the vimrc.
  • opt_backspace - Set the behavior of the backspace key in insert mode (default: 2).
  • opt_bg_shading - Terminal background colour. This affects the colour scheme used by VIM to do syntax highlighting. Accepted values: dark or light (default: dark)
  • opt_indent - If true, Vim loads indentation rules and plugins according to the detected filetype (default: true).
  • opt_lastposition If true, Vim jumps to the last known position when reopening a file (default: true).
  • opt_matchparen - If true and syntax is on, putting your cursor on a paren/brace/bracket will highlight its pair (default: true).
  • opt_powersave - If set to 'true' avoids cursor blinking that might wake up the processor (default: true).
  • opt_ruler - Turns on the ruler (default: false).
  • opt_syntax - Turns on syntax highlighting if supported by the terminal (default: false).
  • opt_misc - Array containing options that will be set on VIM. Anything contained here will show as a "set option" line in your vimrc (default: ['hlsearch','showcmd','showmatch','ignorecase','smartcase','incsearch','autowrite','hidden']).
  • opt_maps - Hash containing keybinds for use in "map " lines in your vimrc (default: {}).
  • opt_code - Array containing custom lines in your vimrc (default: []).

Sample Usage

Install VIM and use the provided configuration defaults

node default {
  class { 'vim': }

Turn on line numbering while keeping the default opt_misc values

node default {
  class { 'vim':
    opt_misc => ['hlsearch','showcmd','showmatch','ignorecase','smartcase','incsearch','autowrite','hidden','number'],

Set F5 key to save and execute current file

node default {
  class { 'vim':
    opt_maps => { '<F5>': '<Esc>:w<CR>:!%:p<CR>' },

Uninstall vim

node default {
  class { 'vim':
    ensure => absent,


This module was forked from the one originally written by Saz ( It adds enterprise linux support and configuration file management, which were not present on the original at the time of the first release.