osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scala considering significant indentation like Python


On 2017-05-23, Michael Torrie <torriem at gmail.com> wrote:
> On 05/22/2017 02:57 PM, Ethan Furman wrote:
>>> Kind of reminds me of LISP.  Lots of closing parenths, and often then
>>> just all get stuck together on a long.  But I guess that's why they
>>> invented paren matching shortcuts in editors.  To make it easy to see if
>>> you have them matched up.  This works with braces too.  Perhaps there is
>>> a plugin for Vim to jump back and forth between the beginning and end of
>>> a blog?  Wouldn't be too hard to just look at indent.
>
> Sigh.  Missing words, the wrong words!  Block, not blog.  agg.
>
>> It's built-in, no plug-in necessary.
>>
>> I still find white-space indentation easier to read, though.  Is that
> block 20 lines down inside or outside the above
>> if/for/while?  Just put your cursor on it and go straight down and
> you'll find out.  Not so easy if the braces aren't
>> lined up (at least for me).
>
> True enough.  Would still be nice to jump, though.  Sometimes things get
> longer than a page (like a class definition).

A nice folding mode works nicely for that sort of thing.  I normally
use emacs, but it doesn't seem to have a folding mode built-in, and
the add-on one's I've tried didn't seem to work in a very useful way.
I like the folding in Scite, and sometimes I fire it up when I'm
trying to figure out the logic/flow/looping in unfamiliar code.

-- 
Grant Edwards               grant.b.edwards        Yow! Thousands of days of
                                  at               civilians ... have produced
                              gmail.com            a ... feeling for the
                                                   aesthetic modules --