Save in Vim causes invisible changes to file

I'm editing an XML file in geany in Windows.
geany says this file is UTF-8 with CR/LF line endings, so I have this modeline in the file:
<!-- vim: set ts=4 ff=dos : -->
When I open the file for editing in Vim I have confirmed the filetype is dos with :set ff? and the encoding is utf8 with :set enc?
However, if I :q it prompts to save changes even if I don't change anything.  If I give in and :wq then svn diff shows the whole file has changed.
However, if I save a new version of the file from Vim, rather than overwriting and compare the with normal diff it finds no changes at all.
This is annoying because if I make a single change in Linux then SVN commits show a total file change, which is obviously useless.
Vim seems to be changing something which diff ignores and svn diff detects - but I dunno what.
Suggestions, please!

Good reason to use a real editor.
You're right, that does sound odd.  Was the file created in Geany, or just opened that way?
... wait, here's what's going on.  Geany opened a file with Unix line endings.  It displayed correctly because Geany isn't stupid like Notepad, but Geany didn't convert the line endings when you closed the file because you didn't tell it to.  But Vim modelines take effect as if you had typed them in after opening the file.  So Vim detected that the file had Unix line endings, and opened it with fileformat=unix.  Then the modeline set fileformat=dos.  When you hit :w, Vim saved it with DOS line endings.
The moral of the story?  Don't use modelines, and if you do, don't use them to set the file format.  (Vim detects that automatically.)

Similar Messages

  • List of downloads is blank after I changed the file to save to. How can I restore the list of downloads?

    I have already tried the all the steps in this link.
    '''http://support.mozilla.com/en-US/kb/Downloads%20window%20is%20blank?s=+downloads+list&as=s'''
    I have changed the file to save to back to the original one as well.

    Try opening the problem files using a text editor or file viewer to see what the first few bytes contain. All valid FM binary files for FM 11 will contain <MakerFile 11.0> in the first bytes of the file.
    When updating books, it's sometimes better to just to create a new book file and add the files to that.
    When renaming files in a book, changes at the system level will break any links/cross-references between files, so it's always best to use the Rename option in the Book file to change FM file names. This will maintain the correct linkages.

  • Finder changes the file name in Save/Save As dialogue box

    Whenever I save or save as a file, the dialogue box opens, but when I make the file list active when using a mouse, the file name I click to changes the file name I am saving. I simply want to activate the file list window so I can find the right folder. For example if I am looking for a folder called "Receipts" I want to be able to click on the file list window to activate it and then type the first 2 letters of the folder-- "re" and then save the file in that folder. The finder keeps changing the name of the current file whenever I click on one of the "greyed-out" file names? This doesn't make sense unless of course I want to replace that file.
    Is there a shortcut that makes the file list window in the dialogue box active while in the SAVE/SAVE AS dialogue box??

    Yes, this example of horrible UI design has been a problem since "Panther". It illustrates what happens when you try to copy UI behaviour from another OS, do it poorly, and end up with a mess. In 10.3 and 10.4, the combination of the renaming behaviour with the default "replace" selection in the resulting save can result in data loss.
    Compared to the old Mac OS where a tab would flip the focus between the text field for the file name and the file browser, the current behaviour either doesn't allow enough keyboard access to controls, or with "full access" enabled, too many to cycle through easily. The inability to switch focus to the file browser using the mouse (depending on the view) is a horrible productivity loss. Having to recheck the filename before saving is a horrible productivity loss. Since there is no "undo" for the renaming in most files, having to retype the name is again, a horrible productivity loss.
    If they had done it right (a simple change, like requiring a modifier to rename), users would probably welcome the "rename" feature as a useful addition. Instead, it has the feel of something a junior Windows-trained programmer slipped in past their supervisor.
    In short, I am not aware of any workaround or hack to avoid this "renaming" behaviour. I doubt it will do any good since people have been doing so since "Panther", but you could try submitting feedback:
    http://www.apple.com/feedback/macosx.html

  • I am using a Mac Mini. I want to change the file size  in iMovie to MPEG so I can burn the move  to  a disc. There is no "save As" that I can find . What do i do?

    I am using a mac mini. I want to change the file size in iMovie to MPEG so I can burn the movie to a disc. There is no "Save As" that I can find. What do I do?

    Stanley Fayer wrote:
    ... to MPEG so I can burn the movie to a disc. ...
    to create standard-conform DVDs = playable on any DVDplayer, there's much more to do than just converting to mpeg(2)...-
    you need a DVD-authoring app, as iDVD, Burn, Toast ........... drag any iMovie export into it, 'burn'.

  • Every time I download a file to my macbook pro, it saves it to downloads but changes the name and inserts % sign.  Please advise how to correct the name that it is saved under.

    Every time I download a file to my macbook pro, it saves it to downloads but changes the name and inserts % sign.  Please advise how to correct the name that it is saved under.

    Anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID.
    Apple ID FAQs
    http://support.apple.com/kb/HE37

  • Can I create action to Save As...  and change only one character of the original file name?

    I'm working on a group of  files(25-28) at a time. I have to save each one as a photoshop .raw file and change the first character of the file name. the rest of the file name must remain the same. I then close the original file with no changes. I tried to create an action for this. The only problem is that the next file overwrote the file I used to create the action.  Is it possible to creat an action to save as... and keep the file name of the new file but chage the first character to the same one used in the recording?

    Good day!
    I think what you are describing is not possible with Actions.
    Scripting would be an option, but more convenient might be simply saving the files with unchanged names and then edit the names of  the whole bunch in Bridge in one go (Tools > Batch Rename).
    Regards,
    Pfaffenbichler

  • Where is "save as" or how to change file type in Preview in Lion?

    Where is "save as" or how to change file type in Preview in Lion? I used to use Preview to change quickly change a lot of PNGs to either JPEGs or PDFs but with the introduction of versions auto save etc there no "save as" in the File menu. Any suggestions how to get this functionality back or how to get around it within OS X (no Photoshop etc)?

    Just wasted 15 minutes looking for that.  What's wrong with Save As?

  • How to block displaying message "Save changes to file 'Test1' " in BEx?

    Hello, dear colleagues!
    Do You know how to block displaying message "Save changes to file 'Test1' " in BEx?
    I need some BEx setting which can block it and make it the same way as You close common Excel workbook without any changes made to it after opening e.g. without any messages, just clicking the cross. 
    Thank You all very much in advance!
    Val
    Edited by: vtb777 on Nov 21, 2011 1:46 PM
    Edited by: vtb777 on Nov 21, 2011 1:50 PM
    Edited by: vtb777 on Nov 21, 2011 1:52 PM

    from time to time i am working with macroses, but they are not good for the report's reliability.
    maybe You have some example of such macros?
    UPDATE:
    I have tried to edit event, called WorkbookBeforeClose in module BExEventHandler, adding there such a line:
    Application.DisplayAlerts = False
    but no result. maybe there are some other ways of solving this problem?
    Edited by: vtb777 on Nov 22, 2011 6:26 AM
    UPDATE-2:
    I got such a code, but it doesn't work:
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    If MsgBox("Save changes to file? " & Name, vbYesNo, "") = vbNo Then
       Cancel = True
    End If
    End Sub
    Edited by: vtb777 on Nov 22, 2011 11:07 AM
    Edited by: vtb777 on Nov 22, 2011 11:16 AM
    Edited by: vtb777 on Nov 22, 2011 11:20 AM

  • When I save a site after I modify the file the changes do not show up in my upload file.

    When I save a site after I modify the file the changes do not show up in my upload file. What am I doing wrong?

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • I uploaded and edited my RAW image, clicked 'Save As', and changed the file type from .psed to .jpg.

    I edited my raw image in Photoshop CS6, selected 'Save As', and changed the file type from .psed to .jpg. I also selected 12 and large file when the window popped up, concluding my 'saving as'. My computer does not recognize the file type and won't open them. Can someone help me? Thanks!

    When naming files, stick to the letters of the ENGLISH alphabet, numbers and underscores.  Do not use illegal characters like apostrophes, commas, asterisks, ampersands, hatch or pound signs, diacritics or accented characters, slashes, etc.
    While the period (dot) is not an illegal character per se, your file names should have only one period and that should always be followed by the file type extension.
    EDITED typo: se
    Message was edited by: station_two

  • Unsaved Changes in File:[File name] Save before closing?

    Hello!
    FM 9 on Win 7 Pro.
    I am a long-time FM user.
    I am trying to open files that I could successfully open before I left work yesterday. I can open FM, and open FM books. When I try to open an FM in a book, or an FM file not in a book, I get this message:
    "Unsaved Changes in File:[File name] Save before closing? Yes No Cancel.
    It doesn't matter which one I pick (Yes, No, Cancel), FM next shows this message:
    FrameMaker 9 Application has stopped working. Windows can check online for a solution to the problem.
    Check online for a solution and close the program
    Close the program.
    View problem details
    It doesn't matter what file I try to open (recently worked on files, and files I haven't touched for some time). Same messages, no matter what.
    I have tried to update the book (the update seems to happen), saving the changes, and then try to open. Same error messages. I had hoped that updating the book would clear any possible cross-reference problems.
    I have tried several re-boots, nothing works.
    Help!
    Thanks in advance for any and all help!
    Terri

    Since its happening with every file, my suspicion is that your application data is corrupted. Try this:
    close down framemaker.
    delete the following directory: C:\Users\[user]\AppData\Roaming\Adobe\FrameMaker\
    reopen framemaker and see if the problem is reproducible.

  • Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?

    Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?

    Hi Memalyn
    Essentially, the bare issue is that you have a 500GB hard drive with only 10GB free. That is not sufficient to run the system properly. The two options you have are to move/remove files to another location, or to install a larger hard drive (eg 2TB). Drive space has nothing to do with SMC firmware, and usually large media files are to blame.
    My first recommendation is this: download and run the free OmniDiskSweeper. This will identify the exact size of all your folders - you can drill down into the subfolders and figure out where your largest culprits are. For example, you might find that your Pictures folder contains both an iPhoto Library and copies that you've brought in from a camera but are outside the iPhoto Library structure. Or perhaps you have a lot of purchased video content in iTunes.
    If you find files that you KNOW you do not need, you can delete them. Don't delete them just because you have a backup, since if the backup fails, you will lose all your copies.
    Don't worry about "cleaners" for now - they don't save much space and can actually cause problems. Deal with the large file situation first and see how you get on.
    Let us know what you find out, and if you manage to get your space back.
    Matt

  • Excel file save error: Someone else is working in file right now. Please try again later.

    When trying to save a modified Excel file, which has been opened from a network share, our users are receiving the following message:
    Someone else is working in "\\domain.com\users\username\Document.xls" right now. Please try again later.
    The clients that have been affected are Windows 7 clients, and the DFS share is being served from a Windows 2012 server. I have already confirmed that DFS replication has not been enabled, so it isn't trying to lock files for replication. I have also disabled
    any real-time scanning that is occurring on the client to make sure that the AV software wasn't locking the files. I did notice when viewing the list of Open Files from the server's Computer Management console that when a users experiences this issue the file
    appears to be opened 4 times. Three times it shows that it was opened in Read mode and the 4th instance shows an Open Mode of Write. Typically, a file which is working correctly should just show one instance with the Open Mode of Read+Write. None of these
    open instances are temporary files preceded with a ~.
    Any thoughts?

    Hi,
    Does the issue occur in other operation system? Which Office version are you using? Have you ever tried to test with word document, PPT file or txt file?
    Based on your description, the issue may be caused by the same file open multiple time in computer management on SQL server. The user probably has User Access Control (UAC) enabled on the machine and it is not letting him overwrite the existing
    copy of the file because she does not have it open in administrator mode. UAC will block overwriting (saving) the existing file without Administrative privileges and it will automatically open the save as dialog so you can save with a different name and
    if you click save without changing the name at the point, it tries to save as a new file over the existing file and it can't because the file is open.
    I recommend you check the user's permission (Which showed in Computer Management console) and end the Excel file instance in the task manager of the user's client.
    Also, we may try the workaround: Save it to local drive(like drive c:) and then copy it to DFS.
    Thanks
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • Illustrator CS 2, save/save as dialog is invisible

    Hello,
    the last work I did in Illustrator without problems was on Jul 23rd. Today I wanted to open an AI file and save it in a different format. After opening the file, I chose "save as..." from the file menu. Illustrator's window borders changed their color, signalizing that they lost the focus. But the save/save as dialog was not visible. The Illustrator window was not respnding anymore, because the save dialog was "on top" of it, being modal.
    However I can press enter, and the dialog responds. For a new file, after choosing "save" and pressing enter the Illustrator options dialog appears. For an existing file that I opened, after choosing "save as" and pressing enter I am told that the file already exists (because I wasn't able to change the file name in the save as dialog) and whether I wanted to overwrite it.
    My workaround for now is to copy the file to the desired folder and set the new name in Windows Explorer. Then open that copy, make the desired changes and save it.
    But: How can I restore the save/save as dialog? I work with two monitors but I didn't change their order, position or anything that could cause the dialog being shown in an offscreen position. Is the position stored somewhere in the registry? How could I reset it?
    Any help would be greatly appreciated.
    Christian

    Hello,
    thanks very much for that tip, unfortunately it didn't help.
    But to help German users (as I use the German version of Adobe Illustrator, too): The folder name in German on Windows XP is
    C:\Dokumente und Einstellungen\<username>\Anwendungsdaten\Adobe\Adobe Illustrator CS2-Einstellungen\

  • I keep getting this diologue box as I start up Firefox "Could not initialise the application's security component. The most probable cause is problems with files in your browser's profile directory. ... what should I do exactly?

    I keep getting the following dialogue box when I start Firefox " Could not initialise the application's security component. The most probable cause is problems with files in your browser's profile directory. Please check that this directory has no read/write restrictions." I am not sure how to find or change the profile directory. I have gone to the Options: General: Save files to ...box but it wont allow me to browse to another file and the box remains blank. ideas please!

    See [[Could not initialize the browser security component]]
    Continue here: [/questions/780717]

Maybe you are looking for

  • Need urgent help on JAXB !!

    I'm new to JAXB and in urgent need of help. Here's my problem. I have a schema which has a child node "node1". "node1" can occur once or multiple times. My Input Now, I receive an xml with 5 occurrences of "node1". My Required Output I need to create

  • Flash 5.5 Question

    My stepdaughter is having a bear of a time with a Flash 5.5 project. In her words, she can't get the "UI loader to connect to external photos & video". Of course the project is due tomorrow, so any assistance is helpful. The error she is getting is:

  • Aperture & iPhoto - Solution to Livein both worlds?

    I am new to Aperture. Knowing I have to use a plug-in that only has iPhoto version (book printing from hypo.cc - A Taiwan-based 1-click book printing vendor), I will have to assume that I have to jump back and forth between the two. Googling around a

  • AIM Document for Discoverer Reports

    Hi All, I want to know if there are any Oracle's standard (AIM) documents for Discoverer Reports, similar to MD Documents for Oracle Reports? Can you send me any such document? Or where can I find them? You can send me on "[email protected]" if you h

  • Is this amount of errors normal

    Connection Information Line state: Connected Connection time: 0 days, 01:41:39 Downstream: 13.08 Mbps Upstream: 1007 Kbps ADSL Settings VPI/VCI: 0/38 Type: PPPoA Modulation: G.992.5 Annex A Latency type: Interleaved Noise margin (Down/Up): 13.5 dB /