You Might Not Need a Vim Plugin to Visualize Line Indents
In this video we'll go over using built in Vim motions and mappings to select and manipulate text within or around HTML tags.
Quick Jump: Demo Video
After stumbling across a plugin to visualize line indents (which I liked from VSCode), I quickly installed it but then after a minute my inner Vim voice talked me out of using it.
Typically the reason for wanting to visualize line indents is to perform some type of action such as selecting, cutting or copying text within or around the text you’re looking at. This video covers how to do that without needing a plugin.
Timestamped Table of Contents
- 0:33 – Visualizing line indents with a Vim plugin
- 1:05 – VSCode made visualizing line indents really nice looking
- 1:37 – Finding a Vim plugin to visualize line indents
- 2:22 – I really thought I needed that plugin in Vim
- 3:04 – A memory reminded me of the
%mapping to jump between open / close tags
- 3:53 – Using
vatto select everything inside and around tags
- 4:56 – Using
ditto cut everything inside of the tag you’re on
- 5:20 – Using
catto change everything around the tag you’re on
- 5:35 – Do you really need to see the line indents? Maybe not
- 6:34 – But IMO using plugins is fine, I have over 40+ plugins that I happily use
Are you using the indent line plugin? Let me know why below.