unused v0.6.0.0 Release Notes

Release Date: 2016-07-19 // almost 8 years ago
  • 📚 In addition to improved documentation and safer file-reads, this prepares custom configuration for vim-projectionist style aliases. This is very much an alpha feature, and allows for matching terms present and not present in ctags.

    0️⃣ One example introduced into the default configs is Rails validators, which follow the pattern:

    class AbsoluteUriValidator \< ActiveModel::EachValidator# ...endclass Whatever \< ActiveRecord::Basevalidates :url, presence: true, absolute\_uri: trueend
    

    In this case, absolute_uri isn't captured by ctags since it's a key in a Hash; however, the use of AbsoluteUriValidator can be probabilistically determined by whether this key is present in the codebase. This introduces the alias format in the config file as:

    - name: Railsaliases: - from: "\*Validator"to: "{snakecase}"
    

    This will match AbsoluteUri with *, and swap the value out, performing a transformation to snakecase, and link results together so their aggregate counts towards usage.

    This also works for non-transformed values, where it's a direct replacement:

    - name: Railsaliases: - from: "\*?"to: "be\_{}" - from: "has\_\*?"to: "have\_{}"