Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Controlling shell indent
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Michael Fultz  
View profile  
 More options Nov 9, 5:25 am
From: James Michael Fultz <croo...@gmail.com>
Date: Mon, 9 Nov 2009 05:25:46 -0500
Local: Mon, Nov 9 2009 5:25 am
Subject: Controlling shell indent
How do I control the indentation in shell scripts when using the
filetype indent plugin?

I have consulted Vim's documentation and found the section on
ft-sh-indent to be confusing.  The documenation found on the Web is the
same as what I have locally.

<http://vimdoc.sourceforge.net/htmldoc/indent.html#ft-sh-indent>

I have tried setting the documented values in
'~/.vim/after/indent/sh.vim' as well as setting values manually with
a shell file loaded.  Both result in undefined variable error when
trying to set dictionary keys.

I have looked in '/usr/share/vim/vim72/indent/sh.vim' and have not found
any references to the variables documented.

I am running Vim 7.2 on Ubuntu 9.04 and have filetype detection, plugin,
and indent enabled.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Johnson  
View profile  
 More options Nov 9, 12:42 pm
From: Gary Johnson <garyj...@spocom.com>
Date: Mon, 9 Nov 2009 09:42:10 -0800
Local: Mon, Nov 9 2009 12:42 pm
Subject: Re: Controlling shell indent
On 2009-11-09, James Michael Fultz wrote:

What aspect of the indentation are you trying to control?  What
variables are you trying to set, how exactly are you trying to set
them, and what exactly happens when you try?

Regards,
Gary


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Michael Fultz  
View profile  
 More options Nov 9, 6:33 pm
From: James Michael Fultz <croo...@gmail.com>
Date: Mon, 9 Nov 2009 18:33:15 -0500
Local: Mon, Nov 9 2009 6:33 pm
Subject: Re: Controlling shell indent
* Gary Johnson <garyj...@spocom.com> [2009-11-09 09:42 -0800]:

> On 2009-11-09, James Michael Fultz wrote:
> > How do I control the indentation in shell scripts when using the
> > filetype indent plugin?

> > I have consulted Vim's documentation and found the section on
> > ft-sh-indent to be confusing.  The documenation found on the Web is the
> > same as what I have locally.

> > <http://vimdoc.sourceforge.net/htmldoc/indent.html#ft-sh-indent>

Have a look at the documentation.  There seems to be conflicting or at
least confusing information whether it is b:sh_indent_defaults or
b:sh_indent_options.

> What aspect of the indentation are you trying to control?  What
> variables are you trying to set, how exactly are you trying to set
> them, and what exactly happens when you try?

I want to change the indent of case statements.  Trying to set any of
the documented dictionary keys results in the same error message.  For
example:

:let b:sh_indent_options['case-labels'] = 0

Results in:

E121: Undefined variable: b:sh_indent_options

Anyway, this may be a wild goose chase since sh_indent_options nor
sh_indent_defaults is referenced in none of the installed plugins.  As
a comparison, look at the documentaton for Python indent.

<http://vimdoc.sourceforge.net/htmldoc/indent.html#ft-python-indent>

The documented variables can be found in the python.vim indent plugin.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Johnson  
View profile  
 More options Nov 9, 12:01 pm
From: Gary Johnson <garyj...@spocom.com>
Date: Mon, 9 Nov 2009 09:01:42 -0800
Local: Mon, Nov 9 2009 12:01 pm
Subject: Re: Controlling shell indent
On 2009-11-09, James Michael Fultz wrote:

What aspect of the indentation are you trying to control?  What
variables are you trying to set, how exactly are you trying to set
them, and what exactly happens when you try?

Regards,
Gary


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Johnson  
View profile  
 More options Nov 9, 8:13 pm
From: Gary Johnson <garyj...@spocom.com>
Date: Mon, 9 Nov 2009 17:13:31 -0800
Local: Mon, Nov 9 2009 8:13 pm
Subject: Re: Controlling shell indent
On 2009-11-09, James Michael Fultz wrote:

OK, I see the problem now.  The most recent version of vim I have is
7.2.264 and it still came packaged (for Cygwin) with indent/sh.vim
revision 2006-04-19, which uses neither b:sh_indent_defaults nor
b:sh_indent_options.  The vim-7.2.184 for Windows that I got from
the Cream project also has the old indent/sh.vim.  Yet, ":help
ft-sh-indent" for all the versions of vim I have describe
b:sh_indent_options.

The problem is that the latest official release of vim is 7.2 with
no patches.  It is up to anyone building a patched version to
download and apply the patches themselves.  The patches, however, do
not include any updates to the runtime files, so one has to also
download and install the latest runtime files.  That apparently
wasn't done by the folks distributing the vim packages that you and
I have.  That, or the new indent/sh.vim didn't make it into the
runtime repository.

I've been lax in keeping the vim installations I build myself up to
date, so I don't know whether the runtime repository currently has
the new indent/sh.vim or not.

There is definitely an error in the current help documentation as
well, but I don't know whether the correct name for the dictionary
is sh_indent_defaults or sh_indent_options.

To find out how to download the latest runtime files, see

    http://vim.sourceforge.net/runtime.php

Regards,
Gary


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Michael Fultz  
View profile  
 More options Nov 9, 9:11 pm
From: James Michael Fultz <croo...@gmail.com>
Date: Mon, 9 Nov 2009 21:11:56 -0500
Local: Mon, Nov 9 2009 9:11 pm
Subject: Re: Controlling shell indent
* Gary Johnson <garyj...@spocom.com> [2009-11-09 17:13 -0800]:
> On 2009-11-09, James Michael Fultz wrote:

[changing indent of case statements in shell files and incongruity of
documented options for 'indent/sh.vim' plugin]

> OK, I see the problem now.  The most recent version of vim I have is
> 7.2.264 and it still came packaged (for Cygwin) with indent/sh.vim
> revision 2006-04-19, which uses neither b:sh_indent_defaults nor
> b:sh_indent_options.  The vim-7.2.184 for Windows that I got from
> the Cream project also has the old indent/sh.vim.  Yet, ":help
> ft-sh-indent" for all the versions of vim I have describe
> b:sh_indent_options.

Vim 7.2.79 here and same revision of 'indent/sh.vim'.

> The problem is that the latest official release of vim is 7.2 with
> no patches.  It is up to anyone building a patched version to
> download and apply the patches themselves.  The patches, however, do
> not include any updates to the runtime files, so one has to also
> download and install the latest runtime files.  That apparently
> wasn't done by the folks distributing the vim packages that you and
> I have.  That, or the new indent/sh.vim didn't make it into the
> runtime repository.

Would this be a packaging bug?

> I've been lax in keeping the vim installations I build myself up to
> date, so I don't know whether the runtime repository currently has
> the new indent/sh.vim or not.

OK, seems the new 'indent/sh.vim' isn't in the runtime repository.  It
is the same revision I already had installed -- 2006-04-19.

> There is definitely an error in the current help documentation as
> well, but I don't know whether the correct name for the dictionary
> is sh_indent_defaults or sh_indent_options.

Should I file a bug report on it?

> To find out how to download the latest runtime files, see

>     http://vim.sourceforge.net/runtime.php

Thanks for your help.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Johnson  
View profile  
 More options Nov 9, 10:56 pm
From: Gary Johnson <garyj...@spocom.com>
Date: Mon, 9 Nov 2009 19:56:45 -0800
Local: Mon, Nov 9 2009 10:56 pm
Subject: Re: Controlling shell indent
On 2009-11-09, James Michael Fultz wrote:

> * Gary Johnson <garyj...@spocom.com> [2009-11-09 17:13 -0800]:
> > The problem is that the latest official release of vim is 7.2 with
> > no patches.  It is up to anyone building a patched version to
> > download and apply the patches themselves.  The patches, however, do
> > not include any updates to the runtime files, so one has to also
> > download and install the latest runtime files.  That apparently
> > wasn't done by the folks distributing the vim packages that you and
> > I have.  That, or the new indent/sh.vim didn't make it into the
> > runtime repository.

> Would this be a packaging bug?

It's a bug somewhere.  If, as you say below, the runtime repository
doesn't contain the version of a plugin that matches the latest
documentation, then there will be an error in the package but it
won't be the fault of the packager.

> > I've been lax in keeping the vim installations I build myself up to
> > date, so I don't know whether the runtime repository currently has
> > the new indent/sh.vim or not.

> OK, seems the new 'indent/sh.vim' isn't in the runtime repository.  It
> is the same revision I already had installed -- 2006-04-19.

> > There is definitely an error in the current help documentation as
> > well, but I don't know whether the correct name for the dictionary
> > is sh_indent_defaults or sh_indent_options.

> Should I file a bug report on it?

I think you should file reports on both bugs.

> Thanks for your help.

You're welcome.

Regards,
Gary


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Wozniski  
View profile  
 More options Nov 10, 6:49 pm
From: Matt Wozniski <m...@drexel.edu>
Date: Tue, 10 Nov 2009 18:49:07 -0500
Local: Tues, Nov 10 2009 6:49 pm
Subject: Re: Controlling shell indent

It's an upstream problem, for sure.

ftp://ftp.vim.org/ftp/pub/vim/runtime/doc/indent.txt  mentions
sh_indent_options and sh_indent defaults

ftp://ftp.vim.org/ftp/pub/vim/runtime/indent/sh.vim  uses neither.

Since those are the latest runtime files from FTP in both cases, the
docs definitely don't match up with the indent script.

~Matt


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Mechelynck  
View profile  
 More options Dec 4, 1:58 am
From: Tony Mechelynck <antoine.mechely...@gmail.com>
Date: Fri, 04 Dec 2009 07:58:36 +0100
Local: Fri, Dec 4 2009 1:58 am
Subject: Re: Controlling shell indent
On 11/11/09 00:49, Matt Wozniski wrote:

I notice that the current indent/sh.vim (which uses that Dictionary) is
dated 2009-11-12, i.e., three days after you posted this. So either the
change was "in the queue for the next update" when you posted this, or
you triggered the fix.

Best regards,
Tony.
--
Don't abandon hope: your Tom Mix decoder ring arrives tomorrow.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Michael Fultz  
View profile  
 More options Dec 4, 2:23 am
From: James Michael Fultz <croo...@gmail.com>
Date: Fri, 4 Dec 2009 02:23:43 -0500
Local: Fri, Dec 4 2009 2:23 am
Subject: Re: Controlling shell indent
* Tony Mechelynck <antoine.mechely...@gmail.com> [2009-12-04 07:58 +0100]:
[ indent/sh.vim help mismatch ]

> I notice that the current indent/sh.vim (which uses that Dictionary) is
> dated 2009-11-12, i.e., three days after you posted this. So either the
> change was "in the queue for the next update" when you posted this, or
> you triggered the fix.

Yeah, I filed a bug report on it, and Bram and Nikolai got right to work
on it.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google