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

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

9 thoughts on “PacVim – A Game That Teaches You Vim Commands”

  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!!!

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

    Reply
  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
    
    Reply
    • @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]
      
      Reply
  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?

    Reply
    • @James,

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

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

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.