A New Motion: Vim Skip

Motions are a fundamental unit of Vim's vocabulary, so it's sometimes surprising to see new ones appear in the form of plugins. Vim Skip (GitHub: jayflo / vim-skip), which was announced on reddit, allows you to skip the cursor to the centre of the line by pressing s. If you press it again you'll move half way from the current position to the end of the line, and so on, in a way that might remind you of Zeno's arrow paradox.

Before you get distracted contemplating the fabric of reality, take a moment to question why this might be useful: sometimes it's easier to think in terms of positions on a line than to skip between characters with f and t.

Though there are multiple options and modes, Vim-skip does not attempt to provide you many mid-range motions! Rather, it strives to provide a minimal tool set allowing the user to tailor a single, efficient mid-range motion based on their own needs. Don't get overwhelmed with the modes or options! It is my intention to keep this skipping motion quick and efficient, while still providing enough versatility to fit your working style on many file types.

The discussion on /r/vim is worth checking out as well, some of the recent motion plugins like vim-sneak are discussed and compared.

blog comments powered by Disqus