all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Re: indentation - always a pita
Date: Thu, 26 Jun 2003 11:35:26 -0700	[thread overview]
Message-ID: <m38yro8z69.fsf@newsguy.com> (raw)
In-Reply-To: ud6h1mca7.fsf@undis.closed


> 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.

I may have missed the boat on that.  In fact after testing a little
bit more it appears the only way both editors display the code ok is
if I leave emacs defaults in place.  But it seems like awfully deep
indentaition. 

I may never have actually left a shell script in default format.  So
what I was seeing in vim may have been of my own creation.

I wondered if you have a chance, if you might test out your settings
by formatting the enclosed code with emacs.  Then open the file in
vim. (vanilla) and see if it looks ok.  I suspect you may have more
customization in place than I do.  I might want to plaguerize some.

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.  But seems to have unnecessarily deep indentation.
So I may have been beating myself up for nothing.  Maybe just leaving
it alone will be the best solution.  Maybe emacs maintainers had the
right idea to start with.

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-26 18:35 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 [this message]
     [not found]           ` <mailman.8693.1056654403.21513.help-gnu-emacs@gnu.org>
2003-06-27 10:21             ` Jens Schmidt
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=m38yro8z69.fsf@newsguy.com \
    --to=reader@newsguy.com \
    /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.