Vim power: transforming yaml to m4

The more I learn vim, the more I am impressed with the efficient ways it handles complex nrepetitive editing tasks:nMy task is to transform a yaml file to a bunch of m4 definitionsn# Welcome to Jekyll!n#n# This config file is meant for settings that affect your whole blog, valuesn# which you are expected to set up once and rarely edit after that. If you findn# yourself editing this file very often, consider using Jekyll’s data filesn# feature for the data you need to update frequently.n#n# For technical reasons, this file is *NOT* reloaded automatically when you usen# ‘bundle exec jekyll serve’. If you change this file, please restart the server process.nn# Site settingsn# These are used to personalize your new site. If you look in the HTML files,n# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.n# You can create any custom variable you would like, and they will be accessiblen# in the templates via {{ site.myvariable }}.ntitle: Sitenemail: site@example.comndescription: “some example site”nlogo: falsennbaseurl: “”nurl: “https://example.com”npermalink: “:year/:month/:day/:title/”ndomain_name: “https://example.com”nn# Details for the RSS feed generatornauthor: “anon”nn# cache buster, increment when we have changesncache_version: 2nnexcerpt_separator: “

Leave a Reply