Skip to content

Instantly share code, notes, and snippets.

@robderickson
Last active March 26, 2019 09:13
Show Gist options
  • Save robderickson/f3451d28a0b692968e5d98e2414fa1fc to your computer and use it in GitHub Desktop.
Save robderickson/f3451d28a0b692968e5d98e2414fa1fc to your computer and use it in GitHub Desktop.
Confgure VIM for Puppet on CentOS 7

Confgure VIM for Puppet on CentOS 7

Install VIM and Git

sudo yum install vim-enhanced -y
sudo yum install git -y

Download and install Puppet plugin for VIM

git clone https://github.com/puppetlabs/puppet-syntax-vim.git
mkdir ~/.vim
mv -v puppet-syntax-vim/ftdetect puppet-syntax-vim/ftplugin/ puppet-syntax-vim/indent puppet-syntax-vim/syntax -t  ~/.vim

Edit .vimrc file

vim ~/.vimrc
set nocompatible
syntax on
filetype indent plugin on
set expandtab
set smarttab
set autoindent
au FileType puppet setlocal tabstop=8 expandtab shiftwidth=2 softtabstop=2

Cleanup the puppet-syntax-vim repo downloaded earlier

rm -rf puppet-syntax-vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment