Pasting stuff into vim arranges text weirdly

When I paste things into a vim session (in a terminal), the text I'm transferring gets rearranged weirdly.
Example: the PKGBUILD for Cube. It goes from this:
# Maintainer: Eric Belanger <[email protected]>
# Contributor: Peter Baldwin <[email protected]>
pkgname=cube
pkgver=2005_08_29
pkgrel=4
pkgdesc="Open source multiplayer and singleplayer first person shooter game"
url="http://www.cubeengine.com/"
depends=('sdl_mixer' 'sdl_image')
backup=(opt/cube/autoexec.cfg opt/cube/servers.cfg)
install=cube.install
source=(http://dl.sourceforge.net/sourceforge/cube/${pkgname}_${pkgver}_unix.tar.gz
cube.xpm cube.desktop cube.sh cubed.sh)
md5sums=('e77f3cf85292bf61100d2f8511a254cc' 'd8c1368a2ac729e168fe3dac7e7bd284'
'a09afc0facfb3f048bcc4d9377af3189' 'b57c33005a88a72cb4f6d0bab0e5bb0a'
'9fe10f48983864e0ebaa76abe9827065')
build() {
install -d $startdir/pkg/opt
cp -r $startdir/src/cube $startdir/pkg/opt
cd $startdir/pkg/opt/cube
touch servers.cfg packages/base/temp.{cfg,cgz}
chown root:20 servers.cfg autoexec.cfg packages/base/temp.{cfg,cgz}
chown root:20 savegames demos screenshots
chmod 664 servers.cfg autoexec.cfg packages/base/temp.{cfg,cgz}
chmod 775 savegames demos screenshots
install -D -m644 $startdir/src/cube.desktop $startdir/pkg/usr/share/applications/cube.desktop
install -D -m644 $startdir/src/cube.xpm $startdir/pkg/usr/share/pixmaps/cube.xpm
install -D -m755 $startdir/src/cube.sh $startdir/pkg/usr/bin/cube
install -D -m755 $startdir/src/cubed.sh $startdir/pkg/usr/bin/cubed
install -m755 bin_unix/linux_client cube_client
install -m755 bin_unix/linux_server cube_server
rm -r $startdir/pkg/opt/cube/{bin_unix,cube_unix}
To this:
intainer: Eric Belanger <[email protected]>
# Contributor: Peter Baldwin <[email protected]>
pkgname=cube
pkgver=2005_08_29
pkgrel=4
pkgdesc="Open source multiplayer and singleplayer first person shooter game"
url="http://www.cubeengine.com/"
depends=('sdl_mixer' 'sdl_image')
backup=(opt/cube/autoexec.cfg opt/cube/servers.cfg)
install=cube.install
source=(http://dl.sourceforge.net/sourceforge/cube/${pkgname}_${pkgver}_unix.tar.gz
cube.xpm cube.desktop cube.sh cubed.sh)
md5sums=('e77f3cf85292bf61100d2f8511a254cc'
'd8c1368a2ac729e168fe3dac7e7bd284'
'a09afc0facfb3f048bcc4d9377af3189'
'b57c33005a88a72cb4f6d0bab0e5bb0a'
'9fe10f48983864e0ebaa76abe9827065')
build() {
install -d $startdir/pkg/opt
cp -r $startdir/src/cube
$startdir/pkg/opt
cd $startdir/pkg/opt/cube
touch servers.cfg
packages/base/temp.{cfg,cgz}
chown root:20 servers.cfg
autoexec.cfg
packages/base/temp.{cfg,cgz}
chown root:20 savegames
demos screenshots
chmod 664 servers.cfg
autoexec.cfg
packages/base/temp.{cfg,cgz}
chmod 775 savegames
demos screenshots
install -D -m644
$startdir/src/cube.desktop
$startdir/pkg/usr/share/applications/cube.desktop
install -D -m644
$startdir/src/cube.xpm
$startdir/pkg/usr/share/pixmaps/cube.xpm
install -D
-m755
$startdir/src/cube.sh
$startdir/pkg/usr/bin/cube
install -D
-m755
$startdir/src/cubed.sh
$startdir/pkg/usr/bin/cubed
install
-m755
bin_unix/linux_client
cube_client
install
-m755
bin_unix/linux_server
cube_server
rm -r
$startdir/pkg/opt/cube/{bin_unix,cube_unix}
WTF is going on?

paranoos wrote:
it's because vim automatically tabs stuff out for you.
this is what the paste option is for.
:set paste
and when you're done, turn it off.
:set nopaste
Just to expand - you can also do:
:set paste!
to toggle the setting (which makes this key bindable).
However, vim-devel in [unstable] supports
set pastetoggle=<F2>
which will allow F2 to toggle the paste mode in any mode (normal, insert, visual, select, etc)

Similar Messages

  • Trying to send copy/pasted content into a mass text message

    I have composed a message (some copied and pasted from an online bible) (and also commentary that I add to it) and saved it as a draft in my yahoo email on my computer. I save it as a draft. I open the draft on my iPhone 4. Then copy/paste content into a text message to send to my congregation. Many of the recipients of the text get duplicate messages with no/or partial content. I have contacted my carrier and I am fully set up to send receive both sms and mms.
    What could be the cause of this?
    How can I fix it so that the receivers of my daily message get it properly?

    When i create a message on my iPhone4 and save it into notes. it goes to my draft ( Mail ) on my computer. That tells me that there is no difference in where i create the message at. But between the copying and pasting i'm losing or something is being changed. Some of my friends are getting multiple messages and some are getting blank pages. We all have different carriers. ( T Mobile, Sprint,Verzion ) I'm waiting on another phone so i can use both of them to see if i can get my messages out

  • Why can't I paste anything into the Text window any more

    Hi Laura,
    Why cant I paste anything into the text window any more? I am using IE 7.0 (7.0.5730.13C0)
    Regards
    Ray Farmer

    I've seen some weird (temporary) cases, for example when ctrl+v suddenly did not work, but "right-click..paste" was still working. Also, when I was pasting the comment here, notice that the last line containing the date (i.e. the line containing May 27, 2011) moved to the top of the quote, while it was at the botton in the original location (probably soem extra html got dragged along, I have not investigated).
    (This was in Chrome.)
    LabVIEW Champion . Do more with less code and in less time .

  • How can I copy text from a table in a format that's readable when I paste it into an internet based data recording system?

    I have to fill in forms regarding foster children every week, then export the text to an on-line data recording system for each child. The old pages let me copy (cmdA ) the whole document and past it into where it needs to go.
    The new version includes inverted commas and I have to copy the document headers separately from the information contained in the table. It's a bit of a pain!

    I have to fill in forms regarding foster children every week, then export the text to an on-line data recording system for each child. The old pages let me copy (cmdA ) the whole document and past it into where it needs to go.
    The new version includes inverted commas and I have to copy the document headers separately from the information contained in the table. It's a bit of a pain!

  • HowDoI copy a phone number from a contact and paste it into a text

    Z10 HowDoI copy a phone number from a contact and paste it into a text message?
    Help Please. It should be so simple but in the maze of approaches to contacts from the phone or home screen which ever way you get there; how do I select a phone number, copy it and paste it into a text message to another contact so that I can send it on?
    The logic of the interface is totally baffling to me most of the time. Can't there just be one contacts interface so that when you enter it from anywhere it presents the same options to edit etc. Cannot the three blobs be called up to allow a proper edit menu - copy/cut/paste/delete.
    Can the favourites be held permanently in screen at the top with the rest of the contacts scrolling below them?
    Can it be set up so that contact pictures do not show to save screen space?
    Any help on any of these - much appreciated.
    Solved!
    Go to Solution.

    Hey jbee,
    Welcome to the BlackBerry® Support Community Forums.
    How Do I copy a phone number from a contact and paste it into a text message?
    The only option would be to to select the edit option on the contact and hold your finger on the number and select the copy option on the left side panel.
    Can the favorites be held permanently in screen at the top with the rest of the contacts scrolling below them?
    This feature is currently not available. 
    Can it be set up so that contact pictures do not show to save screen space?
    This feature is currently not available.
    Let me know if you have any other questions.
    Thanks.
    -HB
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Illustrator image copy/paste onto the Indesign the text should automatically converted into image?

    Hi All,
    Is there options to get the image copy & paste into the Indesign, if i done manually the frames and lines stroke, colors, are coming fine, but the text object only converted the image. i want to edit text  in indesign.
    this is possible for scripting or manual?
    regards
    CSM_PHIL

    You can copy/paste from Illy to ID by selecting the text with the type tool in Illy and then pasting it into ID. You will not be able to maintain the formatting. If you want to maintain the appearance the text will be converted to outlines.
    If you need to get anything other than very simple objects from Illy to ID then you should save as AI and use the file > place command to place those objects as linked graphics into ID.
    Your closing statement is irrelevant. Whether you like it or not, this is the way it is.
    Bob

  • How do I copy a photo from iPhoto and paste it into a text/Pages document?

    How do I copy a photo from iPhoto and paste it into a text/Pages document (using iMaC)?

    Use the Media browser in Pages and just drag the image over.

  • I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    How to know character's encoding is ASCII?

  • Copy and/or Cut and Paste no longer works from within Firefox yet I can Paste to Notepad and yet again copy the same text from within Notepad or any app will not Paste back into Firefox, thanks

    I 'Copy & Paste' from within Firefox quite often but for some reason the function has stopped working when using some sites, even the menu item 'Paste' is greyed out, yet I can open Notepad and 'Paste'. I tried pasting into 'Notepad' then copying from Notepad and pasting back into Firefox, which I've found in the past sometimes works but today even that does not work. I accept it may not actually be a Firefox problem but I have noticed since upgrading to the latest version, I am having several problems with crashing and hanging exceedingly long execution of the browser.

    See:
    *http://kb.mozillazine.org/Clipboard_not_working

  • Scripting Selective XML into a Single Text Frame? (& Some Other Stuff...)

    Hi all, I could use some help (using version CS5.5).
    I want to import (via Javascript) an XML file similar to this:
    <movieRoot>
         <dvds>
              <movie>
                   <title>2001: A Space Odyssey</title>
                   <edition>Special Edition</edition>
                   <features>NOTHING</features>
                   <notes/>
              </movie>
              <movie>
                   <title>Airplane!</title>
                   <edition />
                   <features>Extra Laughs</features>
                   <notes/>
              </movie>
         </dvds>
    </movieRoot>
    I've been able to successfully do this, so no problem there.
    Then I want to dump the child elements under the XML element "<dvds>" into a single text frame that spans 2 columns per page. That's easy enough too, except:
    1) I want to filter the data so that empty elements or whose contents equal "NOTHING" do not appear.
    2) I want to add static text title above some of the elements that remain (outside the XML proper).
    3) Then I want to format the text (using Paragraph Styles).
    Tall order, I know, but I'm keen on figuring it out. I initially created a document using placeholders and used the standard XML Import to populate it with data, which was filtered using scripts to remove extraneous placeholders and static text. It gave me the result I wanted, but as the XML will be regularly updated and since the "filtered" tags result in non-standard XML entries, it means starting over from scratch after every XML update. So I turned to scripting...
    For point #1, I was able to filter properly using a recursive IF statement, tested here using message alerts:
    I've included a bunch of variables for (hopefully) easier viewing.
    var myXMLRoot = myDocument.xmlElements.item(0);  //movieRoot
    var myXMLParent = myXMLRoot.xmlElements.item(0);  //dvds
    var myXMLElement = myXMLParent.xmlElements.item(0);  //movie
    var currElement = myXMLElement.xmlElements.item(0);  //title
    for (i = 0; i < myXMLParent.xmlElements.length; i++)
        myXMLElement = myXMLParent.xmlElements.item(i);
        for (j = 0; j < myXMLElement.xmlElements.length; j++)
            currElement = myXMLElement.xmlElements.item(j);
            if (currElement.contents != "" && currElement.contents != "NOTHING")
                alert (currElement.markupTag.name + ": " + currElement.contents);
    It worked great until I tried to get it into an existing text frame. Since I want all the info in one text frame, placexml was out of the question, and markup worked but overwrote XML tags -- such as assigning the entire text frame to <movie/title> when I wanted it assigned to <dvds> with <movie/title> tags nested within it.
    If you can help me with anything, this is really where I need pointed in the right direction most. But if you're feeling generous or bored...
    Then for points #2 and #3, I want to take what's left ("filtered" XML data) and add additional text and formatting wherever certain tags are found.
    For example, applying the paragraph style "MovieTitles" for any text within <title></title> XML tags; or adding the phrase "Special Features" (with paragraph style "Headers") above any text marked with <features> tags, while the content within those <features> tags applies the paragraph style "NormalText."
    I've got some of this worked out in pieces already, but it generally falls apart because I can't get the tag structure correct in the text frame. I can provide more info as requested. Any help would be mighty appreciated!
    UPDATE: Surprisingly, I've actually had some good success this evening on solving most of these problems. I'll post my results once I've finished up just in case anyone else can be helped by what I've learned.
    One question remains for the moment: I've inserted text within an XML element, but outside of XML tags (e.g., </title>EDITION:<edition>) using "insertTextAsContent":
    [xmlElementHere].insertTextAsContent("EDITION:", XMLElementPosition.beforeElement); 
    Does anyone know a good way to apply a paragraph style to that text without using a find & replace function later (after placing the XML into a text frame)?

    As posted into the other thread:
    Yes, each record will be in its own frame.
    You can use one of a couple solutions to stitch (link) each frame to the other, delete all but the first page and the first merged record, then resize that first merge frame and reflow the entire document.
    https://forums.adobe.com/thread/1341730?start=0&tstart=0
    Please review this thread. There is a couple posts with a script and you would want the last version of that script. You would have to follow the directions, as well as add a column at the beginning of your data and fill it with consecutive numbers.
    Alternatively, there is a free plug-in by Rohiko for stitching merge data frames together, then follow the process above to reflow the document.
    https://www.rorohiko.com/wordpress/indesign-downloads/textstitch/
    Mike

  • How to arrange text into concentrical "sunbeams"?

    hi.
    is there a simple way of arranging text as concentrical "sunbeams" in illustrator?
    i'm thinking of something like type on a path tool, but so that a word (or a sentence)
    would attach to the path by it's beginning or end rather than baseline?
    thanks.

    Create your sunbeam using just paths.  (point a to point b)
    Select them all and go to the type menu -> threaded text -> create
    Bang zoom.
    The lines will be converted to text paths, so if you need to style them, it may be easier for you to make a copy of them before creating the text thread.
    The text will read from point a to point b on the paths, so consider that as you are initially creating the sunbeam.

  • How can I copy information from Excel and Paste it into a fillable field?

    I have a job site quote fillable packet that I go through when quoting a new job. I also have a fullly detailed excel sheet with all sorts of pricing and data. When I am done filling out the excel sheet, the numbers all compile into a new area that is broken down by phases of the project.
    On the last page of the fillable packet I have an estimate page, a spot where I can input the pricing for each phase of the project, each individual field (there are six) then totals into a fillable field on the bottom of the page.
    Currently I have to select the 6 consecutive cells in excel, open up my PDF, paste the information in a text box, then manually type in each line item.
    Is there a way for me to create a field that I could paste excel sheet data in? Is there a table or some way to paste each cell into one of six text fields?
    Any help would be appreciated!
    Thanks.

    All that should be necessary is to open the ebook, highlight what you wish to copy with the cursor (hold left click, and drag to the end of the section you wish), then either right click and choose copy OR command + c on your keyboard, then move the cursor to the desired section of your Word document, and either right click and choose paste OR command + V to paste the selection.

  • Put in the clipboard, from an VB program, an image with a tooltip and a hyperlink to paste them into a Word or PowerPoint doc.

    I tried to put
    in the clipboard an image with an associated tooltip
    and a hyperlink to paste them into a Word or PowerPoint doc.
    I tried to do it with the usual Clipboard's methods SetData and GetData. It's easy to paste an image, text, rich text, html, but it does not appear to be able to associate metadata or hyperlink to an image.
    Usally the tooltip
    and the hyperlink are in the metadata
    associated with the object.
    I think it can be done with the CliboardData class and its Data and Metadata properties, working with the different items of the List of Objects, but I don't know how to tackle it.
    Any suggestions?
    Thank You

    I tried to put
    in the clipboard an image with an associated tooltip
    and a hyperlink to paste them into a Word or PowerPoint doc.
    I tried to do it with the usual Clipboard's methods SetData and GetData. It's easy to paste an image, text, rich text, html, but it does not appear to be able to associate metadata or hyperlink to an image.
    Usally the tooltip
    and the hyperlink are in the metadata
    associated with the object.
    I think it can be done with the CliboardData class and its Data and Metadata properties, working with the different items of the List of Objects, but I don't know how to tackle it.
    Any suggestions?
    Thank You
    Does word or powerpoint associate a tooltip and hyperlink to an image and then allow that image with those associations to be copied to another open word or powerpoint document? If not then your probably wasting your time.
    This code can "listen" for items copied to the clipboard. Needs a RichTextBox on a Form.
    Option Strict On
    Imports System.Runtime.InteropServices
    Public Class Form1
    ' System.Windows.Forms.DataFormats class http://msdn.microsoft.com/en-us/library/system.windows.forms.dataformats(v=vs.110).aspx
    Declare Function AddClipboardFormatListener Lib "user32.dll" (hWnd As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
    Declare Function RemoveClipboardFormatListener Lib "user32.dll" (hWnd As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
    Dim DataFormats As New Dictionary(Of String, String)
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.CenterToScreen()
    DataFormats.Add("Bitmap", "Specifies a Windows bitmap format. This static field is read-only.")
    DataFormats.Add("CommaSeparatedValue", "Specifies a comma-separated value (CSV) format which is a common interchange format used by spreadsheets. This format is not used directly by Windows Forms. This static field is read-only.")
    DataFormats.Add("Dib", "Specifies the Windows device-independent bitmap (DIB) format. This static field is read-only.")
    DataFormats.Add("Dif", "Specifies the Windows Data Interchange Format (DIF) which Windows Forms does not directly use. This static field is read-only.")
    DataFormats.Add("EnhancedMetafile", "Specifies the Windows enhanced metafile format. This static field is read-only.")
    DataFormats.Add("FileDrop", "Specifies the Windows file drop format which Windows Forms does not directly use. This static field is read-only.")
    DataFormats.Add("Html", "Specifies text in the HTML Clipboard format. This static field is read-only.")
    DataFormats.Add("Locale", "Specifies the Windows culture format which Windows Forms does not directly use. This static field is read-only.")
    DataFormats.Add("MetafilePict", "Specifies the Windows metafile format which Windows Forms does not directly use. This static field is read-only.")
    DataFormats.Add("OemText", "Specifies the standard Windows original equipment manufacturer (OEM) text format. This static field is read-only.")
    DataFormats.Add("Palette", "Specifies the Windows palette format. This static field is read-only.")
    DataFormats.Add("PenData", "Specifies the Windows pen data format which consists of pen strokes for handwriting software; Windows Forms does not use this format. This static field is read-only.")
    DataFormats.Add("Riff", "Specifies the Resource Interchange File Format (RIFF) audio format which Windows Forms does not directly use. This static field is read-only.")
    DataFormats.Add("Rtf", "Specifies text consisting of Rich Text Format (RTF) data. This static field is read-only.")
    DataFormats.Add("Serializable", "Specifies a format that encapsulates any type of Windows Forms object. This static field is read-only.")
    DataFormats.Add("StringFormat", "Specifies the Windows Forms string class format which Windows Forms uses to store string objects. This static field is read-only.")
    DataFormats.Add("SymbolicLink", "Specifies the Windows symbolic link format which Windows Forms does not directly use. This static field is read-only.")
    DataFormats.Add("Text", "Specifies the standard ANSI text format. This static field is read-only.")
    DataFormats.Add("Tiff", "Specifies the Tagged Image File Format (TIFF) which Windows Forms does not directly use. This static field is read-only.")
    DataFormats.Add("UnicodeText", "Specifies the standard Windows Unicode text format. This static field is read-only.")
    DataFormats.Add("WaveAudio", "Specifies the wave audio format which Windows Forms does not directly use. This static field is read-only.")
    AddClipboardFormatListener(Me.Handle)
    End Sub
    Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
    RemoveClipboardFormatListener(Me.Handle)
    End Sub
    Protected Overrides Sub WndProc(ByRef m As Message)
    If m.ToString.Contains("msg=0x31d") Then
    Invoke(New ClipboardListenerDelegate(AddressOf ClipboardListener))
    End If
    MyBase.WndProc(m)
    End Sub
    Private Delegate Sub ClipboardListenerDelegate()
    Private Sub ClipboardListener()
    If InvokeRequired Then
    Invoke(New ClipboardListenerDelegate(AddressOf ClipboardListener))
    Else
    RichTextBox1.Clear()
    For Each Item In DataFormats.Keys
    If Clipboard.ContainsData(Item) = True Then
    RichTextBox1.AppendText(Item & " .. " & DataFormats(Item) & vbCrLf)
    End If
    Next
    End If
    End Sub
    End Class
    La vida loca

  • Trouble pasting table into Pages.

    I have been unable to copy a table from Numbers and paste it into a Pages document.  The data gets pasted, but not the formatting and it is also not placed in a table.  I am using Pages '09  and Numbers '08. 
    What appears to happen is teh text or cell data from teh table is pasted in teh Pages document, and seperated by a series of tabs rthare than being placed in a table.

    Numbers '08 was designed to be used with Pages '08, not with Pages '09 which was created 18 months later.
    As Fruhulda wrote, pasting a table from Numbers '08 in Pages '08 or pasting a table from Numbers '09 in Pages '09 behave well (as long as the size limits are respected).
    Pages '09 was not designed as a single app but as a component of a package including Numbers '09 and Keynote '09. Compatibility with the '08 versions wasn’t an item in the design workflow. They were distributed as separate apps only at least 18 months later.
    Yvan KOENIG (VALLAURIS, France) mardi 21 février 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • How do I copy an email link and paste it into my email?

    Just got a hand-me-down MacBook Pro. I need to send an email to someone who's posted an ad on Craigslist. How do I, a) copy the link for their email; and, b) paste it into the address field of my Outlook mail?
    If I just click on the email link in CL, the computer wants to direct me to some default email client, which I'm not using. So I want to copy and paste the address.
    Thanks.

    Care to share which OS you are using?
    From the OS Help menu:
    Copy from one document to another
    Open both documents, select the text, picture, or movie you want to copy, and then drag it to the other document.
    If you can’t drag an item from a document window, select the item and choose Edit > Copy. Then click in the other document window and choose Edit > Paste.

Maybe you are looking for

  • View backed up files in Time Capsule

    how can I check that time capsule is actually backing up all my files How do i tag folders i want backed up in Time Capsule?

  • Forcing Spotlight to index dot directories (& contents thereof)

    I commonly need to find files hidden in dot directories of my computer. I am given to understand that Spotlight does not index hidden directories by default. I'd like to know if there is a way to force indexing of the +contents of hidden directories.

  • Multiple Quizzes - Captivate 4

    Hi, I was wondering if there is any way to create multiple quizzes in Captivate 4 in the same project file. I have a learning styles survey based quiz set up, and need to collect 3 varibles, one for auditory, visual, and kinesthetic. Then I want to d

  • ESB Exception Handling Best Practices

    I've update the "ESB Transactions, Error Handling and Resubmit" Lesson PDF to include a best practices section. Go to http://otn.oracle.com/goto/esb and click on the link in the Learning more section. Feedback welcome.

  • Anyway to uninstall java jre using the windows xp command line

    Hi, Is there anyway I can uninstall Java JRE 1.6_6 by using the xp cmd. I need to do this for my team project where ive made a custom installer that installs a JRE and my java application. I then also need to make an uninstaller which removes my appl