Vim Tip: Converting to a Beamer frame

Today we’ll learn how to convert the text under the cursor to a Beamer frame, yet it’s easy to apply the same technique for other stuff:

map xibegin{frame}{TITLE}end{frame}kp

Lets analyze it
* xi cut whatever is selected and enter insert mode
* begin{frame}{TITLE}end{frame} write the beamer frame declaration
* kp go up one line and paste what was on the buffer

You can do something like this whenever you need to map text in Vim, it’s very easy.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s