Wednesday, July 2, 2014

Re: map a chain of commands

On Wed, 2 Jul 2014 15:09:46 -0500
Tim Chase <vim@tim.thechases.com> wrote:

>> > :nnoremap <buffer> <f4> :for idx in [3,18,6]<bar>let
>> > val=split(getline('.'), '\t')[idx-1]<bar>if strlen(val)<bar>let
>> > @+=val<bar>call input('Press enter
>> > #'.idx)<bar>endif<bar>endfor<cr>
>
>The mapping takes the current line, splits it on <tab>s, iterates
>over the desired positions (3,18,6), pulling out that value and, if
>it has a non-zero length, stuffs it in the system clipboard [then
>currently waiting for you to hit <enter>, but as mentioned, you might
>be able to take that bit out].

Is there maybe a typo in the command above?
It doesn't do anything, neither prompts me to enter nor puts anything
in the clipboad.




--

Tarlika Elisabeth Schmitz, Scotland
http://my.mutterings.co.uk/

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: