You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which can be obtained by removing empty lines between method, but that's bad practice, and as I navigate within vim with {/} a lot, I got to keep it :)
This seems like something that would be better done at a more general level with a plugin that removes whitespace between fold regions.
It also has unacceptable ramifications for any other code expecting end to end at the end of end and for color schemes that highlight the background specifically for that syntax group.
To deal with your specific issue, however, you can add something like the following to your ~/.vim/after/syntax/ruby.vim
syn region rubyMethodBlockFold start="\<def\>" end="\<end\_s*\n" contains=rubyMethodBlock keepend transparent fold
Activity
dkearns commentedon Apr 4, 2019
This seems like something that would be better done at a more general level with a plugin that removes whitespace between fold regions.
It also has unacceptable ramifications for any other code expecting end to end at the end of end and for color schemes that highlight the background specifically for that syntax group.
To deal with your specific issue, however, you can add something like the following to your ~/.vim/after/syntax/ruby.vim
syn region rubyMethodBlockFold start="\<def\>" end="\<end\_s*\n" contains=rubyMethodBlock keepend transparent foldguyzmo commentedon Apr 6, 2019
thank you for the tip, maybe could such a line be enabled within ruby.vim with a config option, to fit all situations?