Do you have to drag your .vimrc and plugins along every time you set up a new code space? My vim setup is pretty bespoke, it would be annoying to have to set that up every time.
I also have a very bespoke dotfiles config that predates Codespaces (https://github.com/wincent/wincent), so I made a thin wrapper around it that makes it work (https://github.com/wincent/dotfiles). For people with less complicated set-ups (ie. basically the entire universe), it is pretty straightforward.
It's totally worth taking the time to sync your dotfiles via git. There's a little bit of maintenance involved whenever you make a config change on one system that you want to propagate elsewhere, but it pays off.
Personally, I just `git init && git remote add ...` in my home directory and have a .gitignore that ignores everything by default, so I have to `git add -f` whenever I want to sync a config. Submodules work well for `.vim/bundle/the-plugin`. It's also nice for syncing important zsh customizations like this one: https://github.com/MatrixManAtYrService/home2/blob/master/.z...
I once had a setup where I could just clone a repository and run a script to get my dotfiles set up. For Vim, I would just need to then run the command to install the plugins and that was that.
Edit: Here is the CLI program that helped me set this up: