How do you turn this off?
Ive tried turning off all html highlighting, but it now hightlights all instead of this.
It's very annoying, it highlights till the end.
Ok I got it,
File/Preferences > Settings > Search for Injected Language Fragment and then untick the background color.
Related
WebStorm 2017.3 is stripping trailing whitespace from the current line when the editor loses focus. For example, I type "hello" and then a space; I Alt+Tab to another window and then back to WebStorm; then I type "world" and the result is "helloworld". This happens with all file types. Is there an editor setting somewhere that controls this?
I do have the "Strip trailing spaces on Save" option in Editor > General set to "All" and this is what I want, but I only want it to happen on save, not lost focus. (I don't think this setting is the issue here.) I also do not have any of the "Virtual Space" settings enabled, nor do I want them. I looked through all the other settings and didn't find one that seemed relevant, but I probably missed it.
WebStorm saves files on losing focus by default, that's why white spaces are stripped. Please try disabling Save files on frame deactivation in Settings | Appearance & Behavior | System Settings
Why privateand publicinclass holdis not highlighted?
First finish the programme, then save the file as a .cpp file with the following vim command :
w your_programme_name.cpp
Vim might be applying the current color settings. Try to override the current
color settings with defaults using the below vim command :
syntax on
Occasionally though, I have seen vim getting confused on what to apply where.
Below is the help text from Vim Documentation. This might be the last resort.
The colors are wrong when scrolling bottom to top. Vim doesn't read
the whole file to parse the text. It starts parsing wherever you are
viewing the file. That saves a lot of time, but sometimes the colors
are wrong.
A simple fix is hitting CTRL-L.
Or scroll back a bit and then forward again.
For a real fix, see |:syn-sync|.
Some syntax files have a way to make it look further back, see the help for
the specific syntax file. For example, |tex.vim| for the TeX syntax.
I am having an annoying behavior in Sublime.
When I start typing out the line...
using namespace SomeNamespace;
The keywords 'using' and 'namespace' are properly colored the keyword coloring. Then when I add the semicolon to the end of the line, the namespace keyword goes white (default text color). I know this is not that significant, but it really annoys me.
Has anyone noticed this behavior before? The code compiles without errors or warnings, so I know sublime is not detecting some so of code problem.
Does anyone have any suggestions on how to fix this problem?
The problem is in this particular regex in the C++ syntax definition:
\b(namespace)\s+([A-Za-z_][_A-Za-z0-9:]*\b)?+(?!\s*?(;|=|,))
At the very end, in the negative lookahead - (?!...) - we see that semicolons are excluded from the match, meaning that if a semicolon is present at the very end of the line, there's no match.
To fix it, you'll need to install the very useful PackageResourceViewer plugin from Package Control. Then, open the Command Palette, type prv to bring up the PackageResourceViewer options, select the Extract Package one, then scroll down and select C++. There will now be a C++ directory in the directory opened by choosing Preferences -> Browse Packages.... Go into that directory and you'll see a bunch of files. Depending on what version of Sublime Text 3 you're using, you'll want to open either C++.tmLanguage or C++.sublime-syntax in Sublime. The .tmLanguage format is XML, so you can pick that for syntax highlighting if you wish, while the .sublime-syntax file is in YAML.
Once the appropriate file is open (you'll either have one or the other, not both), search for the regex above, or just search for namespace, you should find it pretty easily. Delete the ;| from near the end, making the whole thing:
\b(namespace)\s+([A-Za-z_][_A-Za-z0-9:]*\b)?+(?!\s*?(=|,))
Save the file, and that's it! Your C++ source files should update their behavior immediately - if not, just close and reopen them, and in the worst case you can just close them, restart Sublime, then reopen them.
Right now in sublime text 2 when I start an if statement in Coldfusion and hit enter it will automatically indent the next line like this:
<cfif this eq that>
|
When I turn auto indent off it will leave the cursor back at the far left, which would be great, but a lot of times my code is already indented:
<cfif this eq that>
|
What I want is it to leave it where it is currently indented to, no more, no less. Like this:
<cfif this eq that>
|
Any suggestions? Thanks!
There may be other ways to make this work for you.
But, you can edit the regex string in ColdFusion.tmPreferences file under
<key>increaseIndentPattern</key>
Just add cfif and cfelse to the list
|link|meta|param|cfif|cfelse
When there is an update to the ColdFusion package though, you may have to edit again.
Edit: Make sure to update the package to the latest version. The single line tags like cfargument should not indent as expected in the updated version.
Although what you would like does not seem to be possible at the moment, see ST2 forum (maybe you posted that?)
A slightly absurd workaround that may work for you, (seems to work for me). Go to View>Syntax>Java now the auto indention should do as you please - you may lose bracket tag matching (+other things?), syntax checking may be a bit nuts (you can always flip back if necessary, try other syntax stuff), and the colour scheme will change a little, but it seems to work.
Take a look at the settings in Sublime, there is one called 'smart_indent'.
The description for this setting is:
Makes auto indent a little smarter, e.g., by indenting the next line
after an if statement in C. Requires auto_indent to be enabled.
Found some more info in the Sublime Documentation.
I'm moving to Dreamweaver from Notepad++, and while Dw does have many better features than Notepad++, there are a few that I'm really missing.
Is there a way to make the "Home" key on the keyboard take you to the front of where the code starts, instead of the very front of the line? In Notepad++ this is how it works by default, and I don't know why anyone would want to go to the very front of the line instead of the front of the code. I use tabbing to keep it more organized, so this feature is really important to me.
How do I duplicate a line in Dw? In Notepad++ I can select the line and press ctrl + d and it automatically duplicated the code. This is awesome for something like a gallery or a table where I don't want to have to type out every line because it's so similar.
Less important, as I don't use this that often, but can you vertically select in Dw? In Notepad++ you can hold down alt and select lines vertically. Ex:
http://dl.dropbox.com/u/12147973/vert-select.jpg
Thanks in advance.
For #2, check out the Code Extras extension for Dreamweaver
No Longer works in DW5.5; Try here - http://yoropan.com/en/archives/544
I was also wanting some of this features... I discovered that, at least in CS6, #2 is already in Dreamweaver, but the shortcut is Ctrl+Alt+Down ou Up, depending on the direction that you wanna duplicate the code.
Note that I had to disable the shortcut that turns your screen view for that to work. (It's an intel default, press Ctrl+Alt+f12 to open the options)
And tãa dãaa... IT WORKS! :D
I want to say one thing different. My Dreamweaver theme (Users who use Dreamweaver after use Notepad++). Download Dreamweaver.xml
"Dreamweaver.xml" file is in here for windows: C:\Program Files\Notepad++\themes\Dreamweaver.xml
The answer to #1 = Ctrl+Home in anything in windows will take you to the absolute start of the documents, same as Ctrl+End, Home and End to start and finish of lines, Ctrl+Left or Right arrow to jump entire words...
I too am on the quest for duplicating lines in DW. #3 your image no longer shows.
If I want to duplicated a line I click on the line number, then CTRL+C to copy and CTRL+V to paste. Is that what you're looking for or am I being simple?