Post

Saving Persistant Macros

The problem with the default Vim macros is that they’re not persistent. Every time you fire up them. Those old macros you were using yesterday are no longer there. In fact.. macros are confined to the buffer by default. So being able to save persistent macros, which can be used in daily operations, and from buffer the buffer is a bit of a game changer.

Persistant buffers

Quick generation of html tags with these persistant Macros and the surround plugin.

Prerequisites

fire off the below commands by stiking @ and proceeding charater

create list html tags

1
let @l = 'VS<li>\<Esc>'

create h1 html tags

1
let @1 = 'VS<H1>\<Esc>'

create h2 html tags

1
let @h = 'VS<H2>\<Esc>'

create h3 html tags

1
let @3 = 'VS<H3>\<Esc>'

create h4 html tags

1
let @4 = 'VS<H4>\<Esc>'

create p html tags

1
let @p = 'VS<p>\<Esc>'

create span html tags

1
let @s = 'VS<span>\<Esc>'

create div html tags

1
let @d = 'VS<div>\<Esc>'

create ul html tags

1
let @u = 'VS<ul>\<Esc>'

create ol html tags

1
let @o = 'VS<ol>\<Esc>'
This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.