Is there a way to write a function or is there a command I might use to
leave the user with a given string in the command-line?
Best,
Some context...
I have these mappings:
nnoremap ^[FF :Split echo globpath('/home/renato/repos/', "**/rdf*")
nnoremap ^[Ff :Split echo globpath(&rtp, "*/ttm*")
nnoremap ^[Fa :Split echo globpath(&rtp, "*/ttm*")<CR>
nnoremap ^[FA :Split echo globpath(&rtp, "**/pack/**")<CR>
(^[ stands for Alt here, achieved using <C-V>.)
I want the following mapping:
" nnoremap ^[Ff :Split echo globpath(&rtp, '"**/' . expand("<cword>") . "*")
which does not work because Vim considers the whole expression as a string
and does note evaluate expand().
To make this work, I made a function with variations such as:
fu! SearchFilenameRTP()
let a = expand("<cword>")
let b = '**/' . l:a . '*'
let c = ':Split echo globpath(&rtp, "' . l:b . '")'
normal l:c
endfu
but I can't get the string in l:c into the command-line.
-renato
>
> -tim
>
> -tim
--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/fZowH6oqwYE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/fZowH6oqwYE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.