all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jens Schmidt <Jens.Schmidt27@epost.de>
Subject: Re: indentation - always a pita
Date: 27 Jun 2003 11:21:43 +0100	[thread overview]
Message-ID: <usmpv7rd4.fsf@undis.closed> (raw)
In-Reply-To: mailman.8693.1056654403.21513.help-gnu-emacs@gnu.org

Harry Putnam <reader@newsguy.com> writes:

> > Try `sh-basic-offset' instead.  That's what I use.  I tried to
> > format your example with the following result:
> 
> Thanks Jens, that does look a lot better. 
> But one of the things I was after was so I could open the same files
> with vim and not see radical changes.
>
> [...]
>
> On my setup, using your suggestion and Kais about tabs does look much
> nicer but displays bad in vim.  So leaving tabs alone and just using
> your suggestion on offset.  Its closer but still displays bad in vim.
> Leaving emacs entirely vanilla on those vars produces a file that vim
> displays well.

The main problem seems to be vim and not Emacs, I think.

If I format your example with `sh-basic-offset' set to 2 and
`indent-tabs-mode' set to nil I get the result shown below in
Emacs.  I confirmed that there are no TABs in it by doing C-s
TAB.  I saved the example to ~/tmp/xxx and opened that file with
the version of vi that I have (MKS NT vi).

Of course, I get the same results as in Emacs since a blank is a
blank in vi, too.

So the question is: What does look so radically different in your
vim?  Have you tried looking at the file using a simple less or
cat?  Does that look different from Emacs or vim?  How?  Are you
sure that your vim is really vanilla?

Jens

if [ ];then
  if [ ];then
    case $option
      t)cmd
      if[];then
        cmd
      fi
      ;;
      h)cmd
        if[];then
          case $otheroption
            a) cmd
            if[];then
              cmd
            fi
            ;;
            b) cmd
              ;;
          esac
          ;;
    esac
        fi
        if[];then
          cmd
        fi
  fi
fi

  parent reply	other threads:[~2003-06-27 10:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.8589.1056493977.21513.help-gnu-emacs@gnu.org>
2003-06-25  6:14 ` indentation - always a pita Kai Großjohann
2003-06-25 13:30   ` Harry Putnam
2003-06-25 14:15     ` Harry Putnam
2003-06-25 17:13     ` Kai Großjohann
2003-06-26  4:13       ` Harry Putnam
     [not found]       ` <mailman.8648.1056600891.21513.help-gnu-emacs@gnu.org>
2003-06-26  9:13         ` Jens Schmidt
2003-06-26 18:21           ` Harry Putnam
2003-06-26 18:35           ` Harry Putnam
     [not found]           ` <mailman.8693.1056654403.21513.help-gnu-emacs@gnu.org>
2003-06-27 10:21             ` Jens Schmidt [this message]
2003-06-27 20:35               ` Harry Putnam
2003-06-24 22:28 Harry Putnam

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=usmpv7rd4.fsf@undis.closed \
    --to=jens.schmidt27@epost.de \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.