This .vimrc is a good basic set of utilities to get your vim editor in to a state that is very useful for developing puppet manifests and modules. It maintains a set of defaults that I find useful as well.
-
You first need to install brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Get your PATH set up right and place the following in your ~/.profile.
export PATH=/usr/local/bin:/usr/local/sbin:~/bin:$PATH:
Once you do this, close all your shells/terminals and reopen
-
You then need to install macvim to get the YouCompleteMe plugin working. Don't worry, if you symlink the binary to vim/vi it won't load a gui
brew install macvim
-
Link vim to the macvim binary
cd /usr/local/bin ln -s mvim vim ln -s mvim vi
Once you do this, close all your shells/terminals and reopen
-
Get Vundle all set up
mkdir ~/.vim/bundle git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
-
Create your ~/.vimrc file using the .vimrc from this repo or if you're a pro, you can manually cobble it together.
vim ~/.vimrc
-
Exit vim, reload it, and run :PluginInstall
#<in vim> :q vim ~/.vimrc #<in vim> :PluginInstall # or from the command line vim +PluginInstall +qall
8. Once it's done its PluginInstall, exit vim, and compile YouCompleteMe.
You will see an error message generated by YouCompleteMe before you compile
the requisite portion.
cd ~/.vim/bundle/YouCompleteMe/ ./install.sh --clang-completer
9. Install the appropriate linters and software for python, puppet, ruby, yaml
pip install flake8 gem install puppet gem install hiera-eyaml gem install puppet-lint gem install ruby-lint npm install -g js-yaml
10. You're ready to work with puppet!
#Additional configurations
git config --global --bool pull.rebase true
git config --global push.default simple