Vim script

Join the Vim script Track
Vimscript (or VimL) is the programming language used for scripting the Vim text editor.
Join the Vim script Track
Track mentors

4 Mentors

Our mentors are friendly, experienced Vim script developers who will help teach you new techniques and tricks.
Track students

1,021 Students

Join hundreds of students who have enjoyed learning and improving their skills by taking this track.
Track exercises

20 Exercises

Hundreds of hours have gone into making these exercises fun, useful, and challenging to help you enjoy learning.

About Vim script

function! Hello(...) abort
  let name = (a:0 == 1 ? a:1 : 'World')
  return 'Hello, ' . name . '!'
endfunction

Vim is a decades old text editor that is still wildly popular among programmers and people who like working in terminal emulators.

In Vim, keys don't always do the same things. It depends in which mode you're in. You constantly switch between modes: there is a mode for navigation, a mode for insertion, a mode for selecting regions of text, a mode for entering commands, and so on. This sounds complicated, but you quickly get used to it.

The biggest difference to other editors is Vim's modal interface. If you use Vim, you don't use complicated shortcuts, you speak a language.

E.g. when you hit d in normal mode, you initiate a delete action. Then you have to choose the region (or other object) to act upon. E.g. dw deletes until the end of the current word. dd deletes the current line. If the cursor is anywhere in a double quote, you can use ci" to change this quote.

You reduce the risk of carpal tunnel syndrome by not hitting several keys at once, but by pressing single keys in sequence.

For convenience, often used keys are put on the homerow or near it, so you don't have to move your hands back and forth all the time.

Yes, there's a lot to learn at first, but when you get it, you can edit text faster and more precisely than with most other editors. There is a reason people are still using Vim!

Vim has its own scripting language built in. It's called Vimscript, or Vim script, or VimL, depending on who you ask. It's a real programming language and you also use it to configure Vim. The configuration file, called vimrc, is merely a sequence of Vim commands, functions, and expressions.

This means Vim's configuration is Turing complete. You can start small, add a few lines to it, then add more, and you'll end up with entire plugins. There's nothing you can't do.

Bonus: Take it with a grain of salt, but there is an editor war going on between Vim and Emacs for a long time already. :-)

Join the Vim script track

Exercism is a great website

The reviews are incredibly helpful because they help me see things that I missed, learn about new ways and sometimes interesting discussions that can add a fun twist to maybe a simple problem.

Relaxed. Encouraging. Supportive.

Meet the Vim script Track mentors

Once you join the Vim script language track, you will receive support and feedback from our team of mentors. Here are the bios of a few of the mentors of this track.

Avatar of Andrew Radev

Andrew Radev https://github.com/AndrewRadev

Vimscript is a difficult language to love, but it grows on you. It's easy to learn, has a built-in REPL, and every little tool you write makes you faster and more efficient. After years of plugin-writing, I'd love to bring other people up to speed on it as well.
Avatar of Marco Hinz

Marco Hinz https://github.com/mhinz

I love Vim. I've written many Vim plugins and work at Neovim in my spare time.
Avatar of Victor Goff

Victor Goff https://github.com/kotp

Find me mentoring in person or online. Everyone starts somewhere! Contact me to pair program!
Avatar of Josh Goebel

Josh Goebel Blog: Running Blind

I mostly write Ruby on Rails professionally but for fun (and possibly profit one day) I dabble with Elixir, Nim, Arduino, and such. I’m really digging both Nim and Vim lately.
Fun. Challenging. Interesting

Community-sourced Vim script exercises

These are a few of the 20 exercises on the Vim script track. You can see all the exercises here.

Pangram
easy
loops
strings
Allergies
medium
bitwise
sorting
RNA Transcription
easy
misc
Scrabble Score
easy
dict
loops
strings
Roman Numerals
easy
numbers
transforming
Largest Series Product
easy
math
algorithms
integers
sequences
Passionate. Knowledgeable. Creative.

Meet the Vim script Track maintainers

The Vim script Maintainers are the brains behind the Vim script Track. They spend their spare time creating interesting and challenging exercises that we can all learn from. We are incredibly grateful for their hard work. Here are the bios of a few of the maintainers of this track.

Avatar of Marco Hinz

Marco Hinz My GitHub profile

I love Vim. I've written many Vim plugins and work at Neovim in my spare time.

Get started with the Vim script track. As with everything on Exercism, it's 100% free!

Join the Vim script Track