|
| 1 | +--- |
| 2 | +title: "Nvim in Docker With CICD" |
| 3 | +date: 2025-06-26T18:45:30-04:00 |
| 4 | +draft: true |
| 5 | +--- |
| 6 | + |
| 7 | +I'm a huge fan of vim. I've been using it since 2012 and I don't predict that |
| 8 | +changing anytime soon. I think the philosophy of vim motions -- a programming |
| 9 | +language for moving the cursor through a text file -- is incredibly powerful. It |
| 10 | +allows you to edit text without needing to use the mouse, which I believe is the |
| 11 | +main bottleneck that slows us down and breaks our "flow state". Once you get the |
| 12 | +hang of it, you feel as if you can code at the speed of your thoughts. |
| 13 | + |
| 14 | +After using vim for a while, I wanted a way to keep my vim configuration files |
| 15 | +in sync across my various machines. This is when I created my |
| 16 | +[vim-config](https://github.com/rsutton1/vim-config) repo (now archived) in |
| 17 | +2016. Now if I get a new laptop, for example, I could just pull the repo and |
| 18 | +run a script to move my config files to the correct place. |
| 19 | + |
| 20 | +This worked for a while, but it wasn't sufficient. Many of my vim configurations |
| 21 | +had dependencies on various packages, which I had to track and install |
| 22 | +manually each time I used a new computer. |
| 23 | + |
| 24 | +That's when I made the [devbox](https://github.com/rsutton1/devbox) repo in |
| 25 | +2022. This repo uses Github Actions to build a Docker container, which allows |
| 26 | +both the configurations and the packages to be saved into a single image. This |
| 27 | +means if I ever get a new laptop or start a new job, all I have to do is pull |
| 28 | +the container and I can start coding on day one. |
| 29 | + |
| 30 | +# Implementation |
| 31 | + |
| 32 | +I created two repos: |
| 33 | + |
| 34 | +1. dotfiles: static configuration files |
| 35 | +2. devbox: pulls the configuration files and installs them into a Docker |
| 36 | + container. |
| 37 | + |
| 38 | +First, I archived my vim-config repo and migrated them to the tool chezmoi. |
| 39 | +Chezmoi is a tool for tracking static configuration files across various |
| 40 | +devices. It provides many features more than the quick bash scripts in my |
| 41 | +vim-config repo, which is why I decided to archive it in favor of chezmoi. |
| 42 | + |
0 commit comments