Hi,
tjg wrote:
>
> I have a file where all the lines have the same structure : ID (integer),
> Type (text), Description (text). These "fields" are separated by tabs (ts=7)
>
> To add new items I have created (well, not yet, as you will see) an
> interactive function which goes :
>
> function NewData ()
> let ts=7
> let ID = input("ID ? : ")
> let Type = input("Type ? : ")
> let Description = input("Description ? : ")
> execute "normal! i".ID
> execute "normal! a".Type
> execute "normal! a".Description
> endfunction
>
> which, for data such as [5237, Stock, something] gives me
> 5237Stocksomething...
>
> How must I proceed to have the function insert a tab between execute #1 and
> execute #2, and another one between execute #2 and execute #3 ?
replace the three lines with 'execute' with the single line
execute "normal! i".ID."\t".Type."\t".Description
Regards,
Jürgen
--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)
--
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.