Comments (5)
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.
from vim-ruby.
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.
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.
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.
I am closing this as I can’t reproduce it.
from vim-ruby.
Related Issues (20)
- inconsistent indent for if statements HOT 2
- tags turn off HOT 2
- eruby filetype plugin leaks memory HOT 4
- Incorrectly indenting next line after an endless method HOT 4
- Incorrect highlighting of quoted symbols
- Vim-ruby is changing path variable HOT 8
- Folding with single line method definitions HOT 1
- "gf" mapping broken by command-line abbreviation HOT 6
- Issue with ctags (ctrl + ] )
- Visual selection not working with treesitter on Neovim HOT 3
- Incorrect indentation for `case/in` statements
- Release for Ruby 3 and Vim 9 HOT 4
- Complex string incorrectly highlights as quoted symbol HOT 2
- End-less methods aren't recognized when they are class methods HOT 3
- Incorrect auto indentation with string interpolation HOT 5
- ruby 1.9 style hash does not highlight { in matchparen.vim HOT 1
- with cursorline enabled, eruby tends to lose highlighting (no 'syntax sync') HOT 2
- [Neovim/Vim] Replaying macro broken HOT 2
- Vim 9.1 HOT 4
- Nice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-ruby.