Ahhh, ok, so I forgot to tell it which files (or file types) to act
on, correct?

About the mappings...
what is the difference between the following?  i.e. why does one work
and the other not?
and what would each of them do? (the only difference is the bar so
don't hurt your eyes looking for anything else  ;) )
map <F2> :%s/\r/\r/ge<Bar>%s/\s\+$//e<CR>
map <F2> :%s/\r/\r/ge | %s/\s\+$//e<CR>

On Sep 21, 6:41 am, Gary Johnson <[email protected]> wrote:
> I think the only thing John didn't cover was this:
>
> On 2009-09-20, benjamwelker wrote:
> > I am also not sure if I am calling that function properly:
>
> > " autoload my funcitons
> > if !exists("autocommands_loaded")
> >    let autocommands_loaded=1
> >    autocmd BufWrite,BufWritePre,BufWriteCmd,FileWritePre,FileWriteCmd
> > call CleanupFile()
> > endif
>
> For what you want to do, I think the only event you need is
> BufWritePre (or BufWrite--they're the same).  Your autocommand is
> missing a pattern.  This should work:
>
>     autocmd BufWritePre * call CleanupFile()
>
> HTH,
> Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to