On Thursday, October 8, 2015 at 4:56:20 PM UTC-5, Sonny Chee wrote:
> Hey Guys,
>
> When I want to insert text from my clipboard, I turn off auto-indenting with the following:
>
> :setl noai nocin nosi inde=
>
> That works great.
>
> I'm working on a vimscript that inserts (prettily) formatted text into a buffer. I tried to execute the above before the inserts with the following:
>
> execute "normal :setl noai nocin nosi inde="
> execute 'normal! ' . l:start . 'Gg0o' . "\t" . join(l:cols, "\n\t, ")
>
>
> But all of the text is auto-indented. Any help would be appreciated....
I second the suggestion to use :set paste instead.
However, your script isn't working, because there is no "enter" command sent to execute the command-line. You COULD insert a "\<CR>" at the end of your first normal command to accomplish that.
But that's pointless. You're using the "execute" ex command to use the "normal" ex command that does a ":" to go into the command-line mode where you execute...ex commands.
Instead of all that, why not just use "setl noai nocin nosi inde=" directly?
--
--
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.
Friday, October 9, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment