PacVim – A Game That Teaches You Vim Commands

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
$ 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
PacVIM Game for Learning Vim Commands
PacVIM Game for Learning Vim Commands

Here are a few keys to move the cursor:

  • h – move left
  • l – move right
  • j – move down
  • k – move up
  • q – quit the game

You can launch it in a specific level and mode (n and h for normal/hard respectively), for example.

$ pacvim n
$ pacvim 2
$ 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.

Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.


Leave a Reply
  1. 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!!!

  2. 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.

  3. Hi, I got a problem after running make install command.

    src/helperFns.h:24:21 : fatal error : cursesw.h: No such file or directory
    • @Illia,

      Please install the required Curses (graphics library) package on your Linux distribution, before compiling the PacVim.

      $ sudo apt install libncurses5-dev libncursesw5-dev  [On Ubuntu/Debian]
      # yum install ncurses-devel                          [On CentOS/RHEL]
      # dnf install ncurses-devel                          [On Fedora]
  4. Tried it on CentOS7 and Debian 8. Got the same error after “make install

    make: g++: command not found
    : recipe for target 'src/avatar.o' failed
    make: *** [src/avatar.o] Error 127

    Any suggestions?

    • @James,

      Please install the needed build libraries on your CentOS 7 and Debian 8.

      # yum groupinstall 'Development Tools'
      # apt-get install build-essential

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.