On 10/01/09 17:09, Tim Chase wrote:
[...]
> :cnoremap<buffer> <expr> <cr>
> (getcmdtype()=~'[/?]')?"\r:setlocal fdm=expr
> fde=(getline(v:lnum)=~@/)?0:1 fdl=0\r":"\r"
>
> As always, Tony, thanks for elucidating a new corner of Vim.
>
> -tim
Note that (expression)?0:1 can always be simplified to !(expression). In
this case even further, to (getline(v:lnum) !~ @/). Then if (like me)
you like the spaces for clarity, backslash-escape them to avoid breaking
the ":set" statement.
Best regards,
Tony.
--
BLACK KNIGHT: I move for no man.
ARTHUR: So be it!
[hah] [parry thrust]
[ARTHUR chops the BLACK KNIGHT's left arm off]
ARTHUR: Now stand aside, worthy adversary.
BLACK KNIGHT: 'Tis but a scratch.
The Quest for the Holy Grail (Monty
Python)
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---