Find the answer to your Linux question:
Results 1 to 4 of 4
When I edit a file in gedit and then open it in vim editior from terminal, I see some stray character ^M at the end of each line of the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    14

    gedit and vim


    When I edit a file in gedit and then open it in vim editior from terminal, I see some stray character ^M at the end of each line of the file when viewed in vim.

    Can any one suggest a fix for this problem?

    THanks in advance

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Easiest fix is to not use gedit. I do not know of any way to stop gedit from adding the control character to the file. One way to remove them would be to use dos2unix.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    I've never experienced this when using gedit. This should only be a problem when editing files that were created on a windows machine.

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    I was thinking this but because I don't use gedit I couldn't say this for sure. Who know the files might have had this all along.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •