PacVim | Learn VIM commands by Game

Pacvim

PacVim is a game to learn VIM commands in a fun way. So if you are a beginner to VIM then PacVim is the best option for you to learn VIM commands. 

In this guide, I will give you brief information about PacVim and will also mention how to install and play the PacVim game.

Nowadays VIM is one of the best and popular text editors and also somewhat complex to learn because of its commands.

To make use of VIM easier, some developers from Github think to create a game called PacVim through which learning VIM becomes easier.

Read Also: 


1. What is PacVim?

PacVim is a game that you can use to play from the command-line interface (CLI). It is mainly intended to entertain the user to learn VIM text editor in a fun way. It is fully free software no hidden cost required to install, and the source code of the software is easily available on the Github page.

The PacVim game is inspired by a popular game called PacMan. The game is available for GNU / Linux and for the Mac OS X platforms. You can easily install this game from the Github page for your Linux or Mac OS X.

2. How to install PacVim on Linux?

Below is the procedure on how to install PacVim on Linux. To avoid any kind of error please go through every step of this article.

2.1. Our first step is to install the Curses graphic library. In order to install the Curses library use the below commands:

For Ubuntu and Kali Linux use this command:

sudo apt-get install libncurses5-dev

For CentOS and RHEL use this command:

 yum install ncurses-devel 

For Fedora use this command:

dnf install ncurses-devel

2.2. Now clone the package by using the below command:

git clone https://github.com/jmoon018/PacVim.git

2.3. Now go to the PacVim directory by using the below command:

cd PacVim

2.4. Now install the game by using the below command:

sudo make install

That's it PacVim has been installed on your Linux. Now you can run the game by typing pacvim on the command line.

Note: During the installation in Fedora 28, I could not compile the first time because I was missing the package 'g ++', to install it use the below command:

dnf install gcc-c ++

3. How to install PacVim on Mac OS X?

Below is the procedure on how to install PacVim on Mac OS X. Installing the PacVim on Mac OS X is very easy.

Mac OS X comes with pre-installed Curses library so no need to install them skip this step.

3.1. open your terminal and type the below command to install the PacVim on Mac OS X.

brew install pacvim

That's it PacVim is installed on your Mac OS X.

Alternate downloading procedure:

3.2. Open your terminal and type the below commands one by one in order to install the PacVim on Mac OS X.

git clone https://github.com/jmoon018/PacVim.git

cd PacVim

sudo make install

4. How to launch the PacVim game?

Simply use the below command to launch the PacVim game:

pacvim

To play the game on another level you can use the below command:

pacvim [LEVEL_NUMBER] [MODE]

replace the [LEVEL_NUMBER] with any level number example 2.

replace the [MODE] with n or h.

n - stands for normal mode
h- stands for hard mode. 

Note: The default mode of the game is hard.

For example, I want to play the game on the 3rd level and the mode must be normal, then I will type the below command.

pacvim 3 n

By using the above command the game will directly start from level 3 and the mode of the game will be normal.

For example, I want to play the game on the 4th level with hard mode, then I will type the below command.

pacvim 4 h

By using the above command. The game will directly start from level 4 and the mode of the game will be hard.

5. How to uninstall the PacVim game?

To uninstall the game simply go to the pacvim folder where you installed the game from the Github. After going into that directory simply use the below command to uninstall the game.

sudo make uninstall

After using the above command by going into the pacvim directory your game will be completely uninstalled.

6. How to play the PacVim game?

If you ever played the PacMan game then this game will be easier for you. You just need to run over all the characters on the screen while avoiding red characters in G on the screen. 

The game have 2 obstacles:

6.1. You cannot move into the walls that is in "yellow" color. While you can jump over the walls by using in-game VIM motions.

6.2. If you step on a tilde character that you will see in  "cyan ~", you will lose.

Note: you will be given 3 lives in the game.

How to win the game?

You need to use the VIM commands to move the cursor over the letters and highlight them. As you highlight all the letters you will win and then you will proceed to a new level.

Note: Red G character i.e ghost speed will increase as you win a level.

When you will lose the game?

If you come in contact with red G or a tilde character that will be in Cyan color, then you will lose one life. If you lose all life in the game then you will lose.

Read Also:


7. Game controls:

Below are the game controls through which you can control the game.

q quit the game

h move left

j move down

k move up

l move right

w move forward to next word beginning

W move forward to next WORD beginning

e move forward to next word ending

E move forward to next WORD ending

b move backward to next word beginning

B move backward to the next WORD beginning

$ move to the end of the line

0 move to the beginning of the line

gg/1G move to the beginning of the first line

numberG move to the beginning of the line given by the number

G move to the beginning of the last line

^ move to the first word at the current line

& 1337 cheat (beat current level)

Source of game controls is taken from Github: https://github.com/jmoon018/PacVim

Post a Comment

Previous Post Next Post