vim settings are important for every
vim user and you shouldn’t have to use a vanilla
vim setup just because you ssh into a VM or set up a new computer. Since most vim settings have zero personal data, the most convenient thing to do is to upload your
vim directory+settings onto the internet for the world to bask in your glory and for you to pull down to any computer.
Creating a .vim directory
In your root directory, create a
~/.vim directory with an initial
$ mkdir ~/.vim && touch ~/.vimrc
Feel free to add any vim settings you like, heres a couple to start
" This turns on syntax highlighting syntax on
" This maps jj to the <Ecs> key in insert mode
:imap jj <Ecs>
Your directory should look like this
vim will source the file
~/.vimrc and since our real config is located in our
.vim directory, we will need to create a symlink that links our
$ ln -s ~/.vim/vimrc ~/.vimrc
Once you run the line above, you will have a symlink in your root directory that points to your
~/.vim/.vimrc and any file changes you make to either will “update” on both.
Its incredible to have your
.vim directory uploaded to Github so create a new repository called
.vim directory, add the remote branch and push your first commit.
Check out my ongoing
.vim at https://github.com/theptrk/.vim