Although Vim (short for VI Improved) is a popular text editor on Linux systems, people still find it hard to learn, it has a steep learning curve especially the advanced features; a lot of Linux newbies are literally afraid of learning this powerful and highly recommended text editor.
On the other hand, so much effort has been directed by the Tecmint and Linux community towards making Vim easy to learn; from creating Vim tutorials, sharing useful Vim usage tricks and tips, to developing interactive learning web-apps and command-line games such as PacVim.
PacVim is a free open source, text-based game that teaches you vim commands in a simple and fun manner. It is inspired by the popular and classic PacMan game, and runs on Linux and MacOSX. It helps you to comprehensively learn vim commands in an enjoyable way. Its objective is more or less like that of PacMan – you must move the pacman (the green cursor) over all the characters on the screen while avoiding the ghosts (red G).
How to Install PacVim Game in Linux
To install PacVim game, you need to first install required Curses (graphics library) package on your Linux distribution using default package manager as shown.
$ sudo apt install libncurses5-dev libncursesw5-dev [On Ubuntu/Debian] # yum install ncurses-devel [On CentOS/RHEL] # dnf install ncurses-devel [On Fedora]
Next, download PacVim source files by cloning its repository and install it as shown.
$ cd ~/Downloads $ git clone https://github.com/jmoon018/PacVim.git $ cd PacVim $ sudo make install
After installing PacVim, you can start learning vim commands by running it from level 0 and the default mode is hard.
$ pacvim
Here are a few keys to move the cursor:
h
– move leftl
– move rightj
– move downk
– move upq
– quit the game
You can launch it in a specific level and mode (n
and h
for normal/hard respectively), for example.
$ pacvim n OR $ pacvim 2 OR $ pacvim 2 n
You can find more information including key-usage combinations and how to create your custom maps from the PacVim Github repository.
Read Also: nSnake – Play Old Classic Snake Game in Linux Terminal
That’s all! PacVim is a useful game that teaches you vim commands while having fun with Linux terminal. Use the comment form below to share your thoughts or ask questions about it.
The follow-up to my initial question: It seems that it is a typo here. I checked on the GitHub Repo and to move right is indeed lowercase ‘L’ & not ‘i’ as you have written here above:-) NM…this game is cool. I love VIM!!!
@Francesca,
Thanks for pointing out, yes it is lowercase
'l'
. Corrected in the article…I was wondering if the command to move right is ‘l’ (lowercase L), instead of ‘i’? As i is ‘insert’ mode in VIM.
It would be hard to learn this and then have to re-learn with lowercase L. Thanks.
Hi, I got a problem after running
make install
command.@Illia,
Please install the required Curses (graphics library) package on your Linux distribution, before compiling the PacVim.
Tried it on CentOS7 and Debian 8. Got the same error after “make install”
Any suggestions?
@James,
Please install the needed build libraries on your CentOS 7 and Debian 8.
So, how many VIM commands are learned though the use of this game? It it 5?
You also can use
w
,e
,b
,gg
,G
,$
,0
and so on.