On Jan 9, 11:22 am, Tim Chase <[email protected]> wrote:

> In my hypothetical world, one might be able to do this more
> cleanly as
>
>    :autocmd SearchPost * :set foldmethod=expr...
>
> Alas, there's no such SearchPost event. :(
>

No, but you could define your own command that takes a regex, does a
search for that regex, then does whatever else you want. I call mine,
"Foldsearch" (though I usually type just "Folds"). I got it from this
tip:

http://vim.wikia.com/wiki/Folding_with_Regular_Expression

> There's also not a distinction for command-line mappings to
> discern a "search" command-line from a "colon" command-line

You mean like getcmdtype()? Or do you need something else?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to