Thursday, July 3, 2014

Re: map a chain of commands

On Thu, 3 Jul 2014 21:01:01 +0200
Christian Brabandt <cblists@256bit.org> wrote:

>Hi Tarlika!
>
>On Do, 03 Jul 2014, Tarlika Elisabeth Schmitz wrote:
>
>> On Wed, 2 Jul 2014 16:35:46 -0500
>> Tim Chase <vim@tim.thechases.com> wrote:
>>
>> >On 2014-07-02 22:07, Tarlika Elisabeth Schmitz 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>
>> >> [...]
>>
>> However, it does not cope with empty fields. [...]
>
>Try the additional parameter 1 for split (see :h split())
>
>Christian

That works!

--

Tarlika Elisabeth Schmitz

--
--
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:

Post a Comment