coloring user defined function in CodeBlocks - colors

How can I color "user defined function" in CodeBlocks for c++ ? searched syntax highlighting but found nothing helpful for udf ...

Related

Vscode Haskell syntax highlighting color suddenly not working or missing

My Haskell isn't showing any more syntax highlight and color, but I can still write it with suggestions and snippets. This is the first time it happened, and it works without a problem before, that it shows color and syntax highlighting
I've already tried uninstalling vscode and reinstalling again, installing GHCup again, and restarting my Mac. But still, I can't get the syntax color back. Tried changing the theme too, reinstalling Haskell related extension but nothing works.
Before this happen, I was reopening my vscode, and it pops out some message error on the right bottom, that says: "Error with calling Haskell server 3 times, so not calling again" or something along those lines, because I remember it only vaguely and now it doesn't reappear anymore.
How do I fix this syntax color highlighting issue with Haskell?
There was a bug in the language-haskell extension, introduced in 3.5.0. It has been fixed today, with 3.6.0 out.

How can I find out exactly which rule is applying syntax highlighting to a particular code element in VS2022 with Resharper?

I'm running Visual Studio 2022 with Resharper (EAP) and the "Cyberpunk" theme from the VS marketplace (https://marketplace.visualstudio.com/items?itemName=T0uchM3.CTVS19)
Something is applying a white background to the syntax highlighting, but only on strings in JavaScript code which contain jQuery/CSS selectors - see this example:
Regular strings (e.g. the "click" in event handler declarations) are fine. I've been through the VS color list looking for anything with a white background but haven't found out where this is coming from.
Any way to highlight a code snippet and see what rules/plugins are applying syntax highlighting to that specific code snippet?
The specific setting here is Resharper Injected Language Background in Visual Studio Options > Environment > Fonts and Colors:
(Thank you #buhakmeh for figuring this one out!)

Can Sublime text build/compile real time (like xcode) as I type codes so it can show my code errors?

Is there way to have sublime text to build/compile real time as I type code so it can show my code errors if there's any? xcode has this feature.
for example, if i'm writing in a ruby file and in the first line i type:
print(hello)
and as i enter to the second line, sublime will tell me there's an undeclared variable "hello" in the first line?
This feature is not specific to the build/compilation process. What you're really looking for is linting.
You can use SublimeLinter coupled with SublimeLinter-ruby for ruby linting. There are also many more packages available for linting other languages at packagecontrol.io.

Custom Sublime Text Buildfile, GHCi, Haskell

I'm trying to create a custom sublime-build file in MacOS Yosemite, that will execute ghci on console with my code preloaded. That will make my Haskell learning process faster and enjoyable. However, since I'm new to Haskell and Sublime Text, I have no idea what to write in the file.
I know that this code does the same for gnome-terminal:
{
"selector": "source.haskell",
"working_dir": "$file_path",
"cmd": ["gnome-terminal","-x","ghci", "$file"]
}
I found the code here.
check this: https://github.com/SublimeHaskell/SublimeHaskell
USAGE (From their Readme.md):
In short: Press Shift-Ctrl-P and type haskell to explore all commands.
When editing Haskell source files that are part of a Cabal project, automatic error highlighting and enhanced auto-completion are available.
Each time you save, any errors in your program will be listed at the bottom of the window and highlighted in the source code.
All source files in the project are scanned when the change. Any symbols that they export are provided in the auto-complete suggestions.
To use cabal-dev instead of cabal, set use_cabal_dev to true (or use command "Switch Cabal/Cabal-Dev") and specify cabal-dev absolute path. Completion list will be rescanned and build will use cabal-dev.
Stylish-haskell can be used to stylish file or selected text.
Use Ctrl-Shift-R to go to declaration and Ctrl-K-I to show symbol info with documentation. These command are also available through context menu with right-click.
Command 'SublimeHaskell: Browse module' is similar to ghci's browse command
To show inferred types use Show type (ctrl-k ctrl-h ctrl-t) command.
To insert inferred type use Insert type (ctrl-k ctrl-h ctrl-i).
You can jump between the errors and warnings with F4 and Shift-F4. To show hidden error output, use command Show error panel (ctrl-alt-e)

Visual C++ doesn't show both redefinition error

VC++ now give me C2371 redefiniton error but it doesn't show me two definitions.
It just show me one! I want to see other definition too.
Is there a way to see both definitions?
For some reason Visual Studio doesn't show secondary info lines in the Error List view, which is available from the actual compiler output. Try double clicking the error in the "Error List" view, then switch to "Output" view and the corresponding output line should be highlighted. Here, in the output, you should see a second line saying "something.something.h(123) : see declaration of 'foo'". Double click that line and you'll end up at the first declaration.

Resources