Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8331545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:26:51+00:00 2026-06-09T02:26:51+00:00

DocBlockr for SublimeText2 lets you declare your custom variable type rules based on the

  • 0

DocBlockr
for SublimeText2
lets you declare your custom variable type rules based on the name of the variable.

From the README:

"jsdocs_notation_map": [{
  "regex": "tbl_?[Rr]ow", // any arbitrary regex to test against the var name
  "type": "TableRow"      // you can add your own types
}]

I want to catch variables that start with the $ character

example:

"jsdocs_notation_map": [{
  "regex": "^[$].+",      // any word that starts with $
  "type": "HTMLElement"   // That is its type
}]

So that the $header will be caught from the above regex.

Unfortunately the above does not work. The plugin won’t recognize my $header variable
as an “HTMLElement”.

I have tried the following regex strings:

  • $ – It matches everything, even varnames with no $ inside them.
  • \\$
  • \\\\$
  • $$
  • \\$$
  • \\\\$$
  • [$]
  • [\\$]

Sidenote: The editor won’t let me insert odd numbers of \.

All of them match nothing, except for the first that matches everything.

This is not a RegEx question. The RegExs that should work, (ex: ^[$].+) simply do not work because of the $ character. I think it has to do with the plugin settings mechanism and how the $ is used by the python parsing mechanism.

Sidenote: The "^[.].+" RegEx works as expected.

Any help is most welcome

PS: If anyone can be of help, i would like the “^” in the start of the regex string. I don’t think that it won’t work out of the box, but if not, please share the knowledge on that as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:26:53+00:00Added an answer on June 9, 2026 at 2:26 am

    Oh hey… so what the plugin does is strip any leading $ or _ from the variable/function name and then apply the regex. This was added so that _foo $foo and foo could all be recognised with the same regex, since at the time, I didn’t think about those characters having special meaning. Looks like it’s actually a complete misfeature in the end. Looks like you’ve spent a bit of time hacking on it, sorry ’bout that.

    I’ve added it to the issue tracker now. In the future, that would be a good way to get my attention, too 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want read custom annotations like @Route for Controllers. I will use it for
I am in the process of upgrading from Doctrine 1.1.4 to Doctrine 2.0.6 in
I'm using Symfony 2 with doctrine. I've set up a custom repository with a
Schema and table name in Postgres are case sensitive. How can I specify correct
Is it possible to generate Doctrine 2 entities, with the relevant docblock annotations, from
I'm looking for a way to make PHPStorm hide some methods from code completion.
According to wikipedia the format for @param docblock parameters is type [$varname] description where
I was wondering if there is a way to interact with the Page-level DocBlocks.
I'm using NetBeans as my IDE. Whenever I have some code that uses another
I have 2 entities Item and Itemimage. The relationship between Item to Itemimage is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.