Loading ...
Sorry, an error occurred while loading the content.

137478Re: Running Indent in a Cygwin Shell from GVim

Expand Messages
  • George Dinwiddie
    May 2, 2013
      Bill,

      On 5/1/13 10:11 PM, Waters, Bill wrote:
      > This may be more of a Cygwin question, but I’ll see if you guys can help…
      >
      > I am trying to use indent
      > (http://www.gnu.org/software/indent/manual/indent.html) on my new Win7
      > machine. When I ran it from GVim, I got a bunch of ^M characters
      > inserted into the result.

      As I recall (it's been awhile since I've used Windows), the key is to
      have Cygwin use unix line endings (bare LF).

      - George

      >
      > I had the same problem running it in a standalone Cygwin shell. I
      > tracked that back to the fact that the drive was getting mounted as
      > binary instead of text. So, I changed the line in my \cygwin\etc\fstab
      > file to this…
      >
      > none /cygdrive cygdrive text,noacl,posix=0,user 0 0
      >
      > ^^^^
      >
      > Then the output from indent looks as expected, with no ^M characters.
      >
      > Unfortunately, I still get output with ^M characters when I run indent
      > from GVim.
      >
      > Here are the related settings in my _vimrc file:
      >
      > set shell=c:/cygwin/bin/bash.exe
      >
      > set shellcmdflag=-c
      >
      > " Run indent on the entire file
      >
      > nnoremap <silent> <S-F7> :%!indent<CR>
      >
      > Any ideas as to how to resolve this?
      >
      > Thanks,
      >
      > Bill
      >
      > --
      > --
      > You received this message from the "vim_use" maillist.
      > Do not top-post! Type your reply below the text you are replying to.
      > For more information, visit http://www.vim.org/maillist.php
      >
      > ---
      > You received this message because you are subscribed to the Google
      > Groups "vim_use" group.
      > To unsubscribe from this group and stop receiving emails from it, send
      > an email to vim_use+unsubscribe@....
      > For more options, visit https://groups.google.com/groups/opt_out.
      >
      >

      --
      ----------------------------------------------------------------------
      * George Dinwiddie * http://blog.gdinwiddie.com
      Software Development http://www.idiacomputing.com
      Consultant and Coach http://www.agilemaryland.org
      ----------------------------------------------------------------------

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 7 messages in this topic