I'm interested in setting up a TDD environment for developing Vim scripts and rc files. As a simple example, let's say I want vim to insert 8 spaces when I press the tab key. I would install a script that did the following:
- Launch vim using the isolated .vimrc file.
- press i
- click tab
- press esc
- click: w test_out
- claim test_out contains ''
The default config is in vim, this will not work. However, as soon as I add set expandtabto my .vimrc file, the test will pass.
How to programmatically issue these commands? vim -c <commands>close but seems to work only for ex mode commands. Any suggestions? This question seems to be fully protected by Google.