On Thu, November 12, 2009 12:21 pm, anna klein wrote:

Please do not top post. It's general list agreement to trim quotes and
reply inline.

> Basically, I would like to insert sentence(s) at several positions in
> my document. The sentences are quite random. It can be inserting lines
> of sentences or just a character of \<NL> that is a new line. I have a
> list of sentences and the position where I should place the sentences.
> So, I guess the best thing to do is use 'goto' and then use 'normal
> i'.my sentences.  For my function, I want the insertion of \<NL>
> should be preceded by an indent, so that if there is insertion later,
> I don't need to check whether there is a tab or not.

:exe "norm! ox\<BS>"

> However, for insertion of many sentences, I just want it copy blindly
> what the list says. If there is a indent at the front, then my
> document should have. If no indent, then my document should not have
> one.

let a="foobar."
exe "norm! i" . a

> Is there a way to turn on and off this auto indent?  I tried to turn
> off autoindent and smartindent before doing my function, but no luck.

May be 'indentexpr' or 'cindent' are set?

regards,
Christian
-- 
:wq


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to