GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Experimental Vim9 support by AndrewRadev · Pull Request #443 · vim-ruby/vim-ruby

Conversation

@AndrewRadev

@AndrewRadev AndrewRadev commented Dec 22, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Not planning to merge this, just playing around. Changes were mostly mechanical, so it wasn't a big deal to apply. I might do something like keep both versions of the code in separate files and if-clause them, which might actually make it mergeable.

Performance-wise, I tested on a particularly annoying edge case, a list of 199 entries that looks like this:

[
  'Test',
  'Test',
  # ...
  'Test',
]

Every indent needs to find the "most significant line" with a linear search, going through every line above until the [. Anyway, here's a result of profile func GetRubyIndent on master:

FUNCTION  GetRubyIndent()
    Defined: ~/.vim/bundle/ruby/indent/ruby.vim:189
Called 201 times
Total time:  16.409863
 Self time:   0.055199

And here it is when it calls the vim9 function:

FUNCTION  GetRubyIndent()
    Defined: ~/.vim/bundle/ruby/indent/ruby.vim:53
Called 201 times
Total time:  11.736142
 Self time:   0.003108

It's nothing too dramatic, but it's not nothing, I guess.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dkearns reacted with eyes emoji
All reactions
  • 👀 1 reaction
AndrewRadev added 6 commits December 19, 2021 18:02
@AndrewRadev
WIP Initial work on Vim 9 rewrite
335282e
@AndrewRadev
Fix vim9 issues
94d0e10
@AndrewRadev
Extract vim9 logic to a separate file
9f49c88
@AndrewRadev
Leftover vim9 fixes to pass the test suite
68bf954
@AndrewRadev
Merge branch 'master' into vim9-support
2555e4e
* master:
  Add a spec for case-in pattern matching
  Only consider `in` at the beginning of a line
  Fix indentation for `in` keyword
  Fix tag maps
  Include "" and "." in 'path'
  Avoid recursively triggering in tag/file maps
  Prevent endless defs from starting a method region
  Add highlighting for shareable_constant_value
@AndrewRadev
Fix Vim9 features
bd3aaa2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@AndrewRadev
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.