Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A re-implementation of the 'insert matching end' for ruby. #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

A re-implementation of the 'insert matching end' for ruby. #2

wants to merge 7 commits into from

Conversation

ognen
Copy link

@ognen ognen commented Dec 19, 2011

Based on the previous pull request, this one fixes the following issues:

A couple of notes:

Should this be mapped for "source.ruby" and not just "source.ruby.rails"?

It doesn't insert "end" if there is a following "end", even if there is another "opening" keyword. For example:

def bar
|

def foo
"foo"
end

I would expect an "end" keyword after having pressed after "def bar". I guess it finds the "end" keyword for "def foo". This might not be easily fixable, though.

Inserts matching 'end' line whenever the user
enters a ruby statement that marks the beginning of a block statement
that requires and end.

This brings Vico more in line with the behavior of opening quotes,
parenthesis; etc.
Will insert 'end' correctly, only when the currently open "block" has
no matching end. Will ignore 'end' lines on same indent level that
are closing other statements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant