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: “
Category: vim
Prettyfying XML within Vim
Vim is not an island. Sometimes, the best way to do something is an external program.nAssuming the XML is well-formed, this will do:n
Simple TDD with NeoVim’s Terminal
Gotta love NeoVim’s terminal! For simple projects, it can replace a lot of whatndedicated plugins do, not to mention external dependencies like file watchers.nnHere is a TDD recipe for a small project. No plugins used:nStart nvimnnvim feature.pynnSplit a new terminal verticallyn:vsp | :terminalnnGet the terminal’s job id.n