Coding
  • Welcome
  • Baisc Knowledge
    • Vim
    • C
      • Library
    • Java
      • Setup
      • Java Basic
  • Kattis
    • Easy
      • A Second Opinion
      • A Shortcut to What?
      • A Stack of Gold
      • ACM Contest Scoring
      • ASCII kassi
      • Aaah!
      • Add Two Numbers
      • Adding Trouble
      • Afjörmun
      • Airfare Grants
      • Above Average
      • Akcija
      • Alphabet Spam
      • Amerískur vinnustaður
      • Anti-Palindrome
      • Apaxiaaaaaaaaaaaans!
      • Arithmetic Functions
      • Arm Coordination
      • Arrangement
      • Attendance
      • Autori
      • Average Character
      • Avion
      • Baby Bites
      • Babylonian Numbers
      • ABC
      • Aldur
      • Backspace
      • Bannorð
      • Barcelona
      • Basketball One-on-One
      • Batter Up
      • Beavergnaw
      • Bela
      • BergMál
      • Bergur*
      • Akureyri*
      • Best Compromise
      • Best Relay Team*
      • Besta gjöfin
      • Betting
      • Bijele
      • Bilað Lyklaborð
      • Bitte ein Bit
      • Blandað Best
      • Blaðra
      • Blaðra2
      • Bluetooth*
      • Booking a Room
      • Bottle Opening
      • Bounding Robots
      • Breaking Branches*
      • Bracket Matching*
      • Broken Swords
      • Building Pyramids
      • Bus
      • Bus Assignment
      • CPR Number
      • Call for Problems
      • Canadians, eh?
      • Candy Store
      • Cetiri
      • Cetvrta
      • Champernowne Verification
      • Chanukah Challenge
      • Chardonnay
      • Chocolate Division*
      • Chugging
      • Cinema Crowds 2
      • Class Field Trip
      • ASCII Kassi 2
      • Coffee Cup Combo
      • Cold-puter Science
      • Composed Rhythms
      • Cookies
      • Cooking Water
      • Cornhusker
      • Cosmic Path Optimization
      • Count the Vowels
Powered by GitBook
On this page
  • Ubuntu
  • Steps
  • Windows
  • Steps
  • Useful Tips
  • Copy paste your Code
Edit on GitHub
  1. Baisc Knowledge

Vim

PreviousWelcomeNextC

Last updated 6 months ago

For now, I use Vim to write my code on WSL (that's because 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:

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
😂
CS1010
https://github.com/mendax1234/Vim-config