Thursday, February 13, 2020

nested expr in a mapping

Hi,

Is it posible to nest conditionals in a mapping, something like, just for demonstration:

vnoremap <expr> vv (strlen(@y) == 1) ? ':let ...' : '("vcl" =~ getregtype("*")) ? 'some foo' : 'some bar' ' <bar> some more ...

Can we do this ?  Do I use ''' (3 single quotes) to embed quotes ?  (and then 5 for a 2nd level embed ...) ... ?

thx as always,
-m

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/da6436ec-0159-4364-8ab0-90e9b075764d%40googlegroups.com.

No comments:

Post a Comment