Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

ViM: vimrc

📅 2010-Apr-21 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ vim ⬩ 📚 Archive

vimrc is the configuration file used by ViM. It is typically ~/.vimrc in Linux and C:\Program Files\Vim\vimrc in Windows. I currently use ViM across 3 computers with both Windows and Linux. I have my custom vimrc file which works across all these setups.

I like to keep my vimrc under source control (currently Mercurial). To make this convenient and have a single copy across partitions, I replace the default ~/.vimrc or C:\Program Files\Vim\vimrc with the following text:

source C:\FoobarRep\vimrc

Here, C:\FoobarRep\ is the directory of my repository where vimrc resides. For Linux, use the mounted path of the same directory.


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧