Skip to content

NeoVintageous Plugins

NeoVintageous includes a number of bundled plugins by default. Each plugin offers additional functionality beyond the features of Vim. Let's take a look at some the features.

Abolish

Abolish is a port of vim-abolish, Tim Pope, the author, describes it as

Three superficially unrelated plugins in one that share a common theme: working with variants of a word.

The NeoVintageous port currently only supports the "case mutating algorithms". Each algorithm can be applied to a word under the cursor using the cr mapping (mnemonic: CoeRce) followed by one of the following characters:

characteralgorithm
ccamelCase
mMixedCase
_snake_case
ssnake_case
uSNAKE_UPPERCASE
USNAKE_UPPERCASE
-dash-case (not usually reversible)
kkebab-case (not usually reversible)
.dot.case (not usually reversible)
<space>space case (not usually reversible)
tTitle Case (not usually reversible)

For example:

cru

On a lowercase word to make it uppercase is slightly easier to type than the equivalent:

gUiw

Coercion reversibility

Some algorithms, such as cr- (dash-case) and cr. (dot.case), are listed as "not usually reversible". The reason is because - (dash) and . (dot) are not "keyword characters", so they are treated as breaking a word. For example, "key_word" is a single keyword, whereas the dash-case version, "key-word", is treated as two keywords, "key" and "word".

Commentary

Commentary is a port of vim-commentary, it adds several commands that make it easier to comment, uncomment, and toggle comments.

Use gcc to comment out a line (takes a count), gc to comment out the target of a motion (for example, gcap to comment out a paragraph, gcG to comment to the end of file), and gc in visual mode to comment out the selection. All of the commands toggle the comment.

commanddescription
gccComment or uncomment [count] lines.
gc{motion}Comment or uncomment lines that {motion} moves over.
{Visual}gcComment or uncomment the highlighted lines.

Highlighted Yank

Highlighted Yank is a port of vim-highlightedyank.

Make the yanked region apparent!

This plugin highlights a yanked region immediately after being yanked. The duration and style is configurable, see the 1.7.0 Release Notes for a detailed guide.

Multiple Cursors

Multiple Cursors is a port of vim-multiple-cursors.

commanddescription
<C-n> or ghStart multiple cursor.
<C-n> or jAdd next match.
<C-x> or lSkip next match.
<C-p> or kRemove current match and go back on previous.
<Esc> or JQuit and enter normal mode.

Once you've started a multiple cursor you can use visual mode commands, for instance, I, c, d, s, x, y.

You can go to normal mode by pressing v. Once in normal mode you can use normal mode commands, for instance, i, ciw, d$, p, yiw.

At any time, you can press <Esc> or J to exit back to normal mode. This behaviour can be configured to work similar to pressing v. This is useful if you want to go back to normal mode and still be able to operate on all the cursors.

Menu → Preferences → Settings

json
{
    "vintageous_multi_cursor_exit_from_visual_mode": false,
}

The control keys, such as <C-n>, <C-x>, <C-p>, are disabled by default. You can enable them via the Command Palette:

console
NeoVintageous: Toggle CTRL keys

Surround

Surround is a port of vim-surround.

Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML tags, and more. The plugin provides mappings to easily delete, change and add such surroundings in pairs.

It's easiest to explain with examples. Press cs"' inside

html
[Hello] world!

to change it to

html
'Hello world!'

Now press cs'<q> to change it to

html
<q>Hello world!</q>

To go full circle, press cst" to get

html
"Hello world!"

To remove the delimiters entirely, press ds"

html
Hello world!

Now with the cursor on "Hello", press ysiw] (iw is a text object).

html
[Hello] world!

Consider the following examples (an asterisk denotes the cursor position).

old textcommandnew text
"Hello *world!"ds"Hello world!
[123+4*56]/2cs])(123+456)/2
"Look ma, I'm *HTML!"cs"<q><q>Look ma, I'm HTML!</q>
if *x>3 {ysW(if ( x>3 ) {
my $str = *whee!;vllllS'my $str = 'whee!';

The Surround plugin is very powerful and has many more features than shown above, see the surround documentation for more examples. You can also access documentation via the ex command :help surround.

Unimpaired

Unimpaired is a port of vim-unimpaired.

Much of unimpaired.vim was extracted from my vimrc when I noticed a pattern: complementary pairs of mappings.

Next and previous

commanddescription
[b:bprevious
]b:bnext
[B:bfirst
]B:blast
[t:tprevious
]t:tnext
[T:tfirst
]T:tlast
[lJump to the [count] previous error (requires SublimeLinter).
]lJump to the [count] next error (requires SublimeLinter).

Line operations

commanddescription
[<Space>Add [count] blank lines above the cursor.
]<Space>Add [count] blank lines below the cursor.
[eExchange the current line with [count] lines above it.
]eExchange the current line with [count] lines below it.

Option toggling

The mnemonic for y is that if you tilt it a bit it looks like a switch.

OnOffToggleOption
[oa]oayoa'menu'
[oc]ocyoc'cursorline'
[oe]oeyoe'statusbar'
[oh]ohyoh'hlsearch'
[oi]oiyoi'ignorecase'
[ol]olyol'list'
[om]omyom'minimap'
[on]onyon'number'
[os]osyos'spell'
[ot]otyot'sidebar'
[ow]owyow'wrap'

Indent Object

Indent Object is a port of vim-indent-object. It defines a new text object, based on indentation levels. This is very useful in languages such as Python, in which the syntax defines scope in terms of indentation. Using the objects defined in this plugin, an entire if structure can be quickly selected.

Just like regular text objects, these mappings can be used either with operators expecting a motion, such as d or c, as well as in visual mode.

commanddescription
aiAn Indentation level and line above.
iiInner Indentation level (no line above).
aIAn Indentation level and lines above/below.
iIInner Indentation level (no lines above/below).

The iI mapping is mostly included for completeness, it's effectively a synonym for ii.

Further reading