Git Product home page Git Product logo

Comments (5)

todb avatar todb commented on May 21, 2024

I'm not really good at explaining this, but here's an example screenshot. The first part is Python's continuation style, the second is Ruby's, both with a tabstop of 4 and with list on.

http://i.imgur.com/tDwIr.png

from vim-ruby.

todb avatar todb commented on May 21, 2024

Here's another example:

class Klass
    some_long_var_name = case value
                         when :a
                             do_a
                         when :b
                             do_b
                         end
end

I do think I found the crux of the problem -- it appears that everyting in ruby-vim is based on the column number, which is great if all your tabs are spaces, but not so great if you (like me) are trying to use hard tabs when writing Ruby.

Because of this ruby-vim may just be unsuited to hard tabs, period. I may have to write my own indentation script after all.

from vim-ruby.

gsinclair avatar gsinclair commented on May 21, 2024

Perhaps that's the case. If you can find a way to make the current indent file work with hard tabs, let us know!

from vim-ruby.

now avatar now commented on May 21, 2024

I am unable to reproduce the first example using any sane settings for tabstop and shiftwidth (4, 4). Tabstop actually doesn’t matter as the only thing that matters here is expandtab and shiftwidth.

The second example is indented correctly.

I suggest that you don’t use tabs, as no one else seems to be using them for Ruby, and that you keep your indentation level to the standard 2.

from vim-ruby.

now avatar now commented on May 21, 2024

I am closing this as I can’t reproduce it.

from vim-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.