Not signed in (Sign In)

Categories

Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorccblaisdell
    • CommentTimeJul 25th 2008 edited
     permalink

    Most of my work is in Ruby on Rails which has a 2-space indentation convention, but when opening almost any Rail model or controller, Intype detects a 4-space indentation.

    Anyone else experiencing this?

    •  
      CommentAuthorbaael
    • CommentTimeJul 25th 2008
     permalink

    wrong category :| !!

    • CommentAuthordangdang
    • CommentTimeJul 25th 2008
     permalink
    oh man! I thought there was new news to read. yep, this should go in the UNSTABLE Releases category.
  1.  permalink

    I’m a doofus, sry :( How the crap do I change the category on this thing??

    • CommentAuthorcenti
    • CommentTimeJul 25th 2008
     permalink

    If ccblaisdell thinks this behaviour is a bug, then this is the right category for it (I see it in Troubleshooting & Bugs, maybe Martin or Juraj moved it already).

    ccblaisdell: Can you post a sample file? I created a small .rb file, with 2 spaces indentation, and Intype detects it right.

    • CommentAuthordangdang
    • CommentTimeJul 25th 2008
     permalink
    @centi Yes it has already been moved, it was originally in the News section. Thanks Martin.
    • CommentAuthorIngwar
    • CommentTimeJul 26th 2008 edited
     permalink

    Anyone else experiencing this?

    Yes, I’m having the same issue with Python. In Python the standard is to use 4 spaces for indentation, but most of the time Intype incorrectly detects the indentation as 8 spaces wide. I’m using the latest Unstable. Here’s short Python code that triggers the bug: http://pastebin.com/f44c84ad5.

  2.  permalink

    This bit of acts_as_ferret is detected as 4-space indentation: http://pastie.org/241634

    • CommentAuthorcenti
    • CommentTimeJul 26th 2008
     permalink

    Thanks guys, I see it now too. We’ll take a look at it.

    • CommentAuthorhvge
    • CommentTimeJul 31st 2008 edited
     permalink

    Hello guys, at first, sorry for my late respond. Bugfix will be available in the next release but you should use emacs like meta-comments and setup exactly what type of indentation you want:

    # -*- indent-tabs-mode:nil; tab-width:2; -*- ..for spaces(2) # -*- indent-tabs-mode:t; tab-width:4; -*- ..for tabs(4)

    or you should use simple form if the tabs or spaces aren’t mixed in the file:

    # -*- tab-width:4; -*-

    The comment must be available at the first or at the last line of the file.

  3.  permalink

    This is the first I’ve seen of this type of command in Intype. What else can it control?

    • CommentAuthorhvge
    • CommentTimeJul 31st 2008 edited
     permalink

    ccblaisdell: nothing else, it detects only indentation’s width and type at this time. The feature is implemented in the metacrawler plugin (metacrawler.dll) and this module is mainly used for testing the prototype of the intype’s plugin api (it looks like that it works:) We are planning release MC and few other external plugins as open source examples for the community and thus it will be open for any good ideas.