public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: James <wireless@tampabay.rr.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: Paste into vim keeping indention or original?
Date: Thu, 27 Jan 2011 22:38:23 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110127T233531-240@post.gmane.org> (raw)
In-Reply-To: AANLkTi=LXA_RdXPrbJYrnwJQAtF5ZZfEh=1r-20Zx5e4@mail.gmail.com

Mark Knecht <markknecht <at> gmail.com> writes:


> What is the solution to begin able to paste code I find on the web
> into a file in vim and being able to keep the indentation from
> changing?


Well, if you want to keep it simple, here is what I do:
edit /etc/vim/vimrc

"set ai                  " Always set auto-indenting on
set noai                " No auto indenting (James added this



now pasting into with vi does not indent deeper with each line.

hth,
James







      parent reply	other threads:[~2011-01-27 22:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 19:07 [gentoo-user] Paste into vim keeping indention or original? Mark Knecht
2011-01-27 19:22 ` [gentoo-user] " Mark Knecht
2011-01-27 19:28   ` Mike Gilbert
2011-01-27 20:11     ` Petri Rosenström
2011-01-27 20:53     ` YoYo Siska
2011-01-28 17:08       ` Bill Longman
2011-01-28 20:03         ` kashani
2011-01-28 22:42           ` Bill Longman
2011-01-28 20:20         ` David Abbott
2011-01-27 22:38 ` James [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20110127T233531-240@post.gmane.org \
    --to=wireless@tampabay.rr.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox