Skip to content
Strike from the cursor to either end of a text object
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Apply count to mappings Oct 25, 2014
plugin Fix broken count implementation Oct 26, 2014
.gitignore Add gitignore Apr 7, 2014
README.md Add insert and append operators Apr 22, 2014

README.md

ninja-feet.vim

In Practical Vim by Drew Neil, a cute illustration outlines the difference between Vim's standard motions and text objects. In short, we see a ninja kicking in one direction (a motion) compared to a ninja kicking in two directions (a text object).

Ninja with feet

While Vim has a great number of wonderful text objects, and plugins can add even more, there is no general way to operate from the cursor to the beginning or end of those text objects.

Well, now there is. ninja-feet.vim lets you do so by putting [ or ] between the operator and the text object. For example, d]i) deletes from the cursor to the end of the current parenthetical term. c[ip changes from the cursor to the beginning of the paragraph.

You can also jump into Insert mode at the beginning or end of a text object (technically, any motion) with z[ and z].

You can’t perform that action at this time.