I am very new to emacs and despite the great online documentation I can't figure out how to customize the face applied to the content between HTML header tags (e.g. <h1>Content here</h1>), so that the content is not displayed underlined nor bold in emacs. In other words, I would like such content to be displayed with no ornament at all, as pure default text.
In a general manner, how can syntactic-based (not keyword-based) highlighting be customized ?
Does anyone know how to proceed ?
it depends on which mode is used to edit html files. But basically, you can put cursor to text, and execute M-x customize-face - Emacs will ask for name of face (font+color+...), and by default it substitutes the name of face for text under cursor, so you can simply press enter. After that, Emacs will open new buffer where you can edit parameters. After that you can press "Apply" (to set only for current session), or "Save" to save these parameters into file with settings.
Related
For some reason in the text editor pane, all lines containing characters have a background color that differs from the normal text editor background (i.e. they appear like they've been selected/highlighted with the cursor). I've tried switching themes, but doesn't seem to be controlled by any that I've tried. At a loss as to what setting might be controlling this. Any tips appreciated.
With no lines selected (the problem)
With a line selected (how it should look normally)
Turns out this was caused by the SQLTools extension highlighting the code block. I uninstalled it for now, but it appears customizing the settings for that extension would also work.
press ctrl + shift + p
type “settings json”
click “Preferences: Open Settings (JSON)
edit file and leave only braces { }
Resetting might help.
I'm able to highlight text but I'd like to use custom highlight colors. Even if I define custom colors, Word seems to use one of the colors in the default palette that it thinks is closest.
myRange.font.highlightColor = "#ffcc00"; // Should be orange. Comes out red
That color should come out orange but it comes out red.
Any ideas?
Word does not support custom highlight colors - only the traditionl, basic sixteen colors. This is a limitation of the Word application, not the Office JS APIs.
It would be possible to apply custom colors using Shading, however (as in borders and shading).
Here's a work-around to the problem of defining custom highlight colors which I discovered quite some time ago ..
If you paste in highlighted text copied from an application from outside of Word (i.e., highlighted text from an AOL email let's say), you can then:
Use the insertion bar to select and highlight an area of the text you just pasted in
Press the FORMAT PAINTER tool to copy the formatting of the area you've selected. The pointer changes to a PAINTBRUSH icon (with an insertion bar attached)
Move the PAINTBRUSH to the existing Word text that you want to highlight using the new color
Press and hold the mouse button (usually the left button) while selecting the specific text
Release the mouse button to apply the new highlighting and formatting
The applied highlighting will also include any other existing formatting; so you MAY have to change the font or adjust some other feature (i.e., turn on/off bold, italics, underline, etc.) But this is easily accomplished. The point is that you can now have ANY color highlighting that you prefer – this hack absolutely DOES work!
Here's, one last thing – when you save the document (by clicking the OFFICE BUTTON in the upper left corner), I would advise that you first select WORD OPTIONS, then SAVE and check the box next to "Embed fonts in the file" under "Preserve fidelity when sharing this document" (I always uncheck the other two boxes). This is to ensure that before you export or print the document, you may be sure that all the fonts and features have been saved within it.
And for the record, this technique is NOT shading.
The highlighting comes from actual HIGHLIGHTED TEXT copied from a document or application from OUTSIDE of Word. So it has nothing whatsoever to do with Word's shading feature. I've even copied highlighted text from non-dedicated word processing applications, and then pasted the text into Word – where it is then available to apply the copied highlighting to text within the existing Word document.
If you think about it – the fact that Word 2007 permits you to define any THEME color you want clearly shows that one should be able to define ANY desired custom HIGHLIGHTING color as well – besides just the 15 basic colors (and excluding the "no color"). And this work-around proves that this is so. The problem is that the Word application itself does not permit you to accomplish this directly.
A little confused at the purpose of the "tab size" in GitHub's markdown editor. When changing the value in the dropdown, it seems to have an effect in the "Edit File" tab but not the "Preview" tab. Nor does it have an effect after saving.
Bottom line, I'd like my tab size to be 2 when displayed in my repository readme, instead of 8 which makes the markup seem disorganized.
Thanks for your help.
You need to manually convert all the existing tabs to spaces in the document.
Changing the setting in your editor/IDE or on GitHub (to use spaces) does not change any existing text in the document. It only affects any new text you add to the document. If the existing content includes tab characters, you need to convert those to spaces for consistency. While you would need to manually change each instance on GitHub, your local editor/IDE should have a function to do that document wide from a single command (usually called something like "convert tabs to spaces").
By way of explanation, when a tab is inserted in a document, all that happens is a tab character is inserted. No information is included indicating how wide that tab character should be. Each document viewer will have its own setting indicating how wide a tab character should be and if those settings do not match, then the document will display differently in each context. For example, the GitHub editor can be configured to be different that the default. However, the rendered preview does not have any settings so you only get the default tab wide (8 chars on GitHub).
For that reason, most editors/IDEs include a setting to insert spaces when you type the tab key. That insures that every tab is exactly the same width across all viewers anywhere. However, the "spaces" feature of editors works by intercepting the press of the tab key on your keyboard and replacing the tab with the set number of spaces. Therefore, actual space characters get inserted into your document and there are no tab characters (the editor hides this by also intercepting backspace key presses). The important thing to note is that this feature works by intercepting and altering key presses on the keyboard. Therefore, it has no effect on text already in the document. Which is why you need to convert the existing text. Fortunately, the "convert tabs to spaces" feature of most editors/IDEs will use the tabs/spaces settings when doing the conversion, so running that command once should fix the entire document as long as your settings are configured properly.
Most editors/IDEs also have a "show whitespace" (or "view whitespace)" feature, which can be used to confirm the conversion was done properly. When "show whitespace" is turned on, tabs display as an arrow and spaces as dots (usually a lighter gray than the surrounding text). If you have converted your entire document. you should see no tab arrows anywhere, only dots for spaces. Once you are satisfied that no tabs exist, you can then turn "show whitespace" off. Unfortuntely, GitHub's online editor does not offer this feature, so you'll need to use your local editor.
After switching to Emacs for editing purposes, I have started missing the way Notepad++ does tag highlighting.
When I move the caret/cursor to an HTML tag, the opposite end of the tag should be highlighted.
The Emacs plugin called hl-tags-mode does this, but how can I change it so that
the highlighting happens only when cursor is at an
HTML tag. Right now the plugin highlights even when cursor
is inside some plain text inside a parent tag.
Only the opposite end should be highlighted.
So if I'm at a <div> tag, only the matching </div>
should be highlighted. And vice versa.
show-paren-mode would probably be the right mode for that, but it currently doesn't do it for HTML tags. Try M-x report-emacs-bug asking for that new feature.
Is there a shortcut for color chooser in NetBeans?
I found this same query on NetBeans website, it was said that this was possible but I can't find an actual answer how to do it.
I mean this: when I am in a CSS file and I am editing a property that involves a color, the color chooser pops up automatically. I would like to have the color chooser pop up on demand when I am editing any file (e.g. a PHP file). It would be very helpful.
I already looked in Options -> Keymap and there seems to be no shortcut containing the word "color".
Thanks.
In the editor, click the text representing the color (you don't even have to highlight the whole thing), then hit Ctrl+Spacebar.
While it's not ideal in Netbeans 8.0.2 you can do the following:
open any CSS file that contains a rule with a property that takes colour as value and place the cursor inside the declaration block of that rule,
in the top menu click on Window -> Web -> CSS Styles,
click on the dropdown with colour values and scroll right to the top,
click on Choose Color and a colour chooser will appear.
You can now close the CSS file (if you like) and open any type of file - the CSS Styles window will stay and you can repeat the above procedure starting from step 3.
P.S. Netbeans has a bug tracker that is not just for reporting bugs:
Issues = Bugs, Feature Requests, and Enhancements