Vim

For now, I use Vim to write my code on WSL (that's because CS1010 uses vim 😂). So, I decide to migrate the vim setup from CS1010 on my pc.

Ubuntu

Since setting up vim and managing plugins on Windows is tedious and not elegant. I decide to use Vim on my WSL (Ubuntu). Below are the necessary configuration files:

https://github.com/mendax1234/Vim-config

Steps

Copy the .vimrc to your HOME directory. You can do this by using

git clone https://github.com/mendax1234/Vim-config.git

to clone the whole repository somewhere on your pc, cd to the repo's root directory and then use

cp ./.vimrc .

to copy .vimrc to your HOME directory (~)

Then, copy the .vim folder to your HOME directory also using

cp -r ./.vim/ .

Now, the setup is done!

Windows

The way Windows manages vim plugins is a bit different from how Ubuntu/macOS manages it. Basically, on windows, the equivalent of .vim/ on Unix/macOS is called vimfiles/, which is located under your HOME directory.

Steps

  1. Copy the .vimrc to your HOME directory.

  2. Copy all the files from the .vim/colors/ to the vimfiles/colors/ on your Windows machine.

  3. Copy the .vim/pack/ folder to the vimfiles/.

It's all done!

Useful Tips

Copy paste your Code

To copy your code written on WSL Vim to your Windows clipboard. We can do a vim visual selection then do the command:

:'<,'>w !clip.exe

The following command saves the whole file to the clipboard (not the requirement):

:w !clip.exe

Last updated