Highlight ansible YAML and Jinja syntax in “vim” Editor

We are moving out! An updated post can be found here:


Hi Guys,

Sometimes. I’m getting a bit dizzy with all those lines playing with ansible.
This will helpful to have more fun over your coding. Active syntax colors i your YAML and Jinja files


Use this: https://github.com/tpope/vim-pathogen

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Now add the following lines to vim ~/.vimrc to activate this and start autoloading bundles.

execute pathogen#infect()
syntax on
filetype plugin indent on

Now, download the bundles.

cd ~/.vim/bundle
git clone git://github.com/chase/vim-ansible-yaml.git
git clone https://github.com/lepture/vim-jinja.git

You’re done!

Now prepare to be amazed “vim” any yml and j2 file (remeber use “vim” instead “vi”. Well, everything depends on your profile)


See ya!

Categories: cloud, DevOps

Tagged as: , ,

1 reply »

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: