Search all pascal camel-case words in .ts files - visual-studio-code

I would like to use a regular expression in the Search panel in Visual Studio Code. In my particular case, I need to find all Pascal Camel-case words in *.ts files.
I use \b([A-Z0-9][a-z0-9]+)* regex and the result is not what I expect:
This is what I get:
This is what I expect:
It looks like I use Search panel in a wrong way or it doesn't work properly.
Any bits of advice, folks?
UPD:
Correct regular expression \b([A-Z][a-z0-9]+)\w+

Related

How to hard-wrap lines in VS Code at a specific character (NOT word wrap)

I have a Base64 encoded string in a text file that is one line. In other words it contains no line breaks. I want to insert a line break every 78 characters.
None of the "wrap" extensions I have found do this, since they're geared for word wrapping and use word boundaries. Running any of these functions does nothing since the string contains no spaces or word boundaries.
I can do it on Unix using something like fold -w 78 but this seems like something that should exist in VS Code or at least an extension.
I'm not aware of an extension that does specifically what you're asking for, but what I would do is use the Edit with Shell Command extension, and use it to run fold -w 78 on the text in question from within VSCode. The extension even has a "quick command" feature you can use to save that command for quick use if it is something you do often.
I use that extension fairly often for one-off transformations with things like sort, sed, tr, and fmt. It's really handy when you know how to express the desired transformation as a shell command.

Regex works in "Find" but not "Find in Files" - Why? How to fix?

From a previous question I have this nice regular expression:
\[.*\]\((?!http)(?!.+\.md).+\)
It matches all internal Markdown links that do not have a .md file extension. You can see some matches of it here: https://regex101.com/r/0uW1cl/6
This regex works just fine in an opened file via Edit -> Find (or Ctrl + F) when I enable "Use Regular Expression" in the find input field.
But it does not work in the Edit -> Find in Files functionality:
As you can see on the screenshot it gives me this nice error message:
Error parsing regex near `]\((?!http' at character offset 9: Unrecognized flag: '!'. (Allowed flags: i, m, s, U, u, x.)
Blockquote
As far as I know those use the same code behind the scenes to execute regular expression searches.
Why does it work in "Find", but not "Find in Files"?
Is there a way to fix this or a workaround?
(For now I am using Notepad++ which seems to handle this regex fine, but of course I would prefer to keep working in VS Code)
As far as I know those use the same code behind the scenes to execute regular expression searches.
Yeah, I shouldn't assume things like that:
Rust Regex in the Find/Replace in Files Sidebar
JavaScript Regex in the Find/Replace in File Widget
via https://stackoverflow.com/a/42184299/252627
And Rust Regex can not handle negative lookaheads as it doesn't support lookaround at all:
Its syntax is similar to Perl-style regular expressions, but lacks a few features like look around and backreferences. In exchange, all searches execute in linear time with respect to the size of the regular expression and search text.
https://doc.rust-lang.org/regex/regex/index.html

Notepad++ and autocompletion

I'm using mainly Notepad++ for my C++ developing and recently i'm in need for some kind of basic autocompletion, nothing fuzzy, just want to type some letters and get my function declaration instead of having a manual opened all of the time..
The integrated autocompletion feature of my Notepad++ version (6.9.2) gives the declaration of basic C functionality like say fopen and parses my current file user defined functions, but without declaration.
I guess it's normal for a text editor to not give easily such information since it has nothing to parse i.e. other files where your declarations are (as it's not an IDE), but i don't want either to mess again with MSVC just for the sake of autocomplete.
Is there an easy, not so-hackish way to add some basic C++ and/or user defined autocomplete?
UPDATE
Adding declarations the "hard way" in some file cpp.xml is a no-no for me as i have a pretty big base of ever changing declarations. Is there a way to just input say some list of h/cpp files and get declarations? or this falls into custom plugin area ?
Edit the cpp.xml file and add all the keywords and function descriptions you'd like. Just make sure you add them in alphabetical order or they will not show up.
Another option is to select Function and word completion in the Auto-Completion area of the Settings-->Preferences dialog. NPP will suggest every "word" in the current file that starts with the first N letters you type (you choose a value for N in the Auto-Completion controls).

How to get wordforms in sphinx?

How i can get all morphology forms of the word?
For example, searching keyword is:
runner
Result should be:
run,running ... etc
You usually don't need one. Use a stemmer, which can do the reverse. ie it removes the "ending", so that matching works, rather than trying to figure out all the possible endings.
https://en.wikipedia.org/wiki/Stemming
ie use morphology, rather than worforms.
http://sphinxsearch.com/docs/current.html#conf-morphology

Only autocomplete on an exact match in Sublime Text 2

I'm making a custom .tmLanguage file to highlight the syntax I'm using correctly and generally make coding with it easier. I'm almost done, and I got the autocompletion working using a .sublime-completions file.
There's just one minor flaw I'd like to change. I have a pretty long list of functions, and almost all of them contain an abbreviation of the word 'parameter', PAR. When I start typing that word, the following are all in the list of completions:
PAR command
DEFPAR command
JDATA command (because the description contains PAR)
SPAA command (because there's a P in the command and an A and an R in the description)
What I want is only for the commands that begin with PAR to show up, so from the list above, only the first item.
So, like this:
In other words, I want the completions to show up based on the literal string I'm typing, and only from the trigger part of my completions file, before the \t only.
That completions file looks like this:
Highlighted in orange is what I want my completions list to be based on.
I hope this is understandable. Any help is greatly appreciated.
This is not possible. By design Sublime's autocomplete feature uses fuzzy matching, so if there are a number of options that all contain the same pattern, but you don't quite remember which one you want, you can type the pattern and have all of the options available. The more you type, the smaller the list of possible options becomes. This is a good thingĀ®, otherwise you'd have to remember the exact command you're looking for, which kind of defeats the purpose of autocomplete and code hinting.