Watts, thanks for the response.

You're right in that what I meant was smart indenting. I just could
not recall the term.

I find it to be a great feature of a text editor. And I think it's
certainly not a crutch. It's like all the other hundreds of features
in BBEdit and any text editor: hundreds of little crutches, all of
them to improve the way we write software, prose, etc.

Cheers,
Diego

On Apr 22, 3:19 am, Watts Martin <[email protected]> wrote:
> On Apr 19, 2012, at 17:42 , Diego wrote:
>
> > I didn't create any CSS Rules. I'm not sure how I would do that
> > either. What I was seeing is just the BBEdit default behaviour as far
> > as what happens with braces when I'm entering CSS.
>
> > But, as you suggest, running Markup->CSS->Format places the braces
> > where I want them. Although, doing a format for evert bit of CSS I
> > type is not something I want to do.
>
> What you're looking for is "smart" indenting -- i.e., syntax-aware, 
> context-sensitive, where an editor knows that a closing brace should be 
> de-indented in some languages, that a line after a line that ends with a 
> colon should be indented in Python, etc. Basically, BBEdit doesn't do that.
>
> This seems to be a kind of polarizing topic -- some people get very adamant 
> that editors "shouldn't" do that, just like they "shouldn't" automatically 
> close parentheses or braces because that's just a crutch for lazy 
> programmers. Personally I think that's a rather bogus argument; the same 
> logic suggests that BBEdit's formatting palettes and, for that matter, syntax 
> highlighting are also crutches, right?
>
> At any rate, you could try installing the "Editor Actions for BBEdit" package 
> and assigning a key like Control-Return to Smart New Line, or just install 
> Kendall Conrad's original Smart New Line script which the one in Editor 
> Actions is a slight fork of.
>
> http://www.ranea.org/bbedit_editoractions.htmlhttp://www.angelwatt.com/words/2011/04/11/bbedit-smart-newline-open-l...
>
> Both of these essentially try to make a smart-indenting alternate when you 
> need it. So if you're on a line like this:
>
> p.style {
>
> And you typed Control-Return (or whatever invoked the smart new line script), 
> you'd get
>
> p.style {
>     |
>
> }
>
> With the pipe indicating where the cursor would be.
>
> Kendall's script does a couple things my Editor Actions package doesn't and 
> vice-versa, I think, but they're pretty similar, with one distinction that 
> turned out to be very important to me: my version respects the expand tabs 
> setting.

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to