Comments (4)
Yes, it should and it does. The 'e' in indentkeys does just that. If it’s not working for you I would bet a lot that it’s either your syntax that’s broken or your configuration. Something as basic as that would have been caught a long time ago (I hope). I’m closing this, awaiting an actual example that breaks the indentation function.
The value of indentkeys is correct and why should be obvious from the documentation. If it isn’t, I suggest that you post to vim-dev and ask them (Bram) to clarify the documentation. To answer your question, however, the 0* are there to indent the character listed when it appears as the first non-indent character in the line.
from vim-ruby.
Indeed. The culprit is the neocomplcache plugin in my configuration files. Here is what I use:
let g:neocomplcache_enable_at_startup = 1
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
"let g:neocomplcache_enable_auto_select = 1
" Enable heavy omni completion.
if !exists('g:neocomplcache_omni_patterns')
let g:neocomplcache_omni_patterns = {}
endif
let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
The interesting part is that it works if '=else' is added to indentkeys :)
Regarding the 0* in indentkeys, could you please provide me some simple use case of how can I test them so that I could understand them better?
Best regards!
from vim-ruby.
Well, simply type one of the characters at the start of a line.
The { is there to align the start of hash literals, the } is there to align the end of hash literals and blocks, the ) is there to align the end of method argument lists and other kinds of parenthesis-delimited blocks, and the ] is there to indent the ending of an array literal. I can’t remember why [ isn’t in that list, but I’m sure there was a reason.
[
1,
2,
3
].map{ |i|
i * 2
}
from vim-ruby.
Ok, now I could understand. My tests were failing because of neocomplcache. I've disabled all my user plugins and did see most of the indentkeys options working. The only thing that didn't make any difference is the '0{'. Could you test if there is any situation it helps for you? Try just deleting the '0{' from indentkeys and see the results.
Maybe that is the reason why '0[' is not necessary...
Thank you again!
from vim-ruby.
Related Issues (20)
- 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
- Vim 9.1 again... HOT 3
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.