killersheep – Silly game for Vim version 8.2

Vim is my favorite text editor and version 8.2 released. The new version includes support for popup windows and text properties. Popup windows can be used for many purposes. For example, a list of choices can be displayed, where the user selects an entry with keys or with the mouse. There is also a new vim game released named as killersheep to show you new capabilities of Vim. Let us see how to install and play killersheep.



Indeed, you need vim version 8.2 to play this game. Otherwise, you will see an error that read as, “This build of Vim is too old, you need at least 8.1.170.”

ADVERTISEMENTS



killersheep – Silly game for Vim version 8.2

killersheep is a silly game of vim to show off the new features of Vim version 8.2 such as:

Popup windows with colors and mask Text properties to highlight text Sound

killersheep – Silly game requirements

Vim version 8.2 (use pacman command/apt command/yum command/zypper command/brew command/dnf command to update vim) Feature +textprop Sound support i.e. feature +sound or command “afplay”, “paplay” or “cvlc”. Terminal with at least 45 lines height

I tested it with vim version 8.1.2268. You can find out the vim version and featured by typing the following command:

vim --version

How to install killersheep silly game

It would be best if you used vim plugin manager. I am using vim-plug which is a beautiful and minimalist vim plugin manager for Linux/Unix users. You can use a vundle or pathogen plugin too. If vim-plug not installed, try:

mkdir -p ~/.vim/autoload/

cd ~/.vim/autoload/

wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Updated your ~/.vimrc as follows:

vim ~/.vimrc

Append the following to install killersheep:

call plug#begin ( '~/.vim/plugged' ) " Install vim game Plug 'vim/killersheep' call plug#end() call plug#begin('~/.vim/plugged') " Install vim game Plug 'vim/killersheep' call plug#end()

Save and close the file in vim. Start vim, run:

vim

Next, activate the game:

:PlugInstall



Another option is to download the files using the zip archive, and unpack them in your pack directory ~/.vim/pack/mine/opt/killersheep/. Then load the pack manually with the following command from ~/.vimrc

packadd! killersheep

How to play killersheep vim game

Start vim:

vim

Type the following vim command:

:KillKillKill



Game kyes

One can play the game using the following keys in vim:

s : start game

: start game l : move cannon right

: move cannon right h : move cannon left

: move cannon left Space : fire cannon

: fire cannon Esc : exit game

Conclusion

I liked the Killersheep vim game. It shows popup windows, text properties, and sound features added in the newer release. For more info, see this page here and here.