On Thursday 14 May 2009 12:51 am, Aman Jain wrote:
>
> Is there a way to save recordings, as I often need to retype all the
> useful recordings(e.g commenting a line) whenever I open a vim
> session.
there may be other ways, but one thing i like to do is to create
modules for specific purposes
let's say for example i am going to be working on some html -- i
will
:source ~/.vim/html_lets
which looks like
<html_lets>
echo 'html_lets being applied'
echo 'insert mode <C-R>register inserts them'
let @a = '<a href=""></a>'
let @b = '<br>'
let @c = '<!-- -->'
let @g = '>'
let @l = '<'
let @p = '<pre>
</pre>'
let @q = '"'
" vim:ft=vim
</html_lets>
what these "lets" do is populate various registers with things i
find useful in an html edit session, which i use with the insert
mode <C-R>
if you want, you can save your recording(s) in a similar module
to access them, read up on "redir" -- save the output of
:reg
using redir, then make a module to be sourced that contains "let"s
for the recordings you find most useful -- this is a handy way of
editing your recordings after you've made them too
hth,
sc
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---