Nicolás Brailovsky


A modern blog

Vim Tip: Converting to a Beamer frame

author Posted by: nico on date Dec 1st, 2011 | filed Filed under: Vim Tips

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 xi\begin{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.


     Add A Comment

trackback Trackback URI | rsscomment Comments RSS