On 2009-01-10, Tony Mechelynck <[email protected]> wrote:
> Oh, but you can set up mappings for search commands as distinct from 
> mappings for ex-commands. Here's an example:
>
>       :cnoremap <expr> <CR> ((getcmdtype == '/' <Bar><Bar> getcmdtype == 
> '?')?"<Bslash>CR>:set fdm=expr":'')
>
> The above requires Vim 7.0 or later, and of course with expression 
> evaluation compiled-in.

Can someone explain this a bit more slowly for me please?
And on vim 7.2 with +eval it gives me
    E121: Undefined variable: getcmdtype
    E15: Invalid expression: ((getcmdtype == '/' || getcmdtype
    == '?')?"\CR>:set fdm=expr":'')

I have to use "ZQ" to get out; nothing with ":" works.

I can see we're mapping the <CR> you hit at the end of the
command, but after that I'm lost :-(



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to