Deliberate practice as Unit Tests
As a software engineer, I spend a lot of time in a text editor (about 40 hours per week). Recently, I’ve been learning to use the Vim editor (specifically, MacVim) and have been pleasantly surprised by the power and flexibility. One of my larger goals in life is to engage in deliberate practice in the things I want to become very good at. Because of my vocation, I’ve chosen Vim as one area where it seems worthy of dedicating time and effort to becoming an expert.
So you can think of deliberate practice as Unit Tests for your brain: find an invariant function that takes inputs, applies a transform to produce outputs, and then compares the outputs with an expected value. If I were a psychologist, I would probably be able to poke a hole in this short explanation of deliberate practice, but for this initial application to Vim, I think it suffices.
What would Unit Tests for your brain look like? Whenever you learn something new in Vim, add a line to a text file that gives you the opportunity to practice your new ability:
Using the 'surround' plugin, remove the single quotes from 'surround'.
Your text file will grow in length as you learn new abilities. Revisit the text file and perform each of your Unit Tests on a daily basis. The strength of your neuronal connections will improve and you will become an expert at editing in Vim.
Using 'surround', remove the _value and replace with ['value']: config_value Using a macro recording, prefix the first and third words of each line with a double dash ("--"): one two three four five six seven eight nine ten eleven twelve Display the contents of the register where you recorded the macro: Modify the above macro to use underscores instead of dashes, and then read the macro back into the register. etc.
This is the best solution I’ve found to the related question I posted on the Vim list. I hope it works for you!
Update: I forgot to mention that one really neat technique I’ve picked up is the ability to quickly go to my practice file and add new tricks. The way I do this is by using (mark-capital-letter) in Vim: go to the practice file, and type “mP”. This adds a bookmark to the file. Now, whenever you want to re-visit the practice file, type ‘P (single-quote-P). Instant access! Any capital letter can be used.