highlighting

IntelliJ: How to auto-highlight variables like in Eclipse

十年热恋 提交于 2019-11-28 15:46:05
My employer wants me to use IntelliJ for Java development. Previously, I've always used eclipse. One of my favorite features in eclipse was being able to click on a variable, method parameter, class field, etc and see the usage of those variables highlighted throughout the class. Is there a way to enable this feature in IntelliJ IDEA? I'm using Ultimate version 9.0.3. CrazyCoder File | Settings ( Preferences on Mac) | Editor | General | Highlight usages of element at caret . I think Intellij does not do this by default for a reason. If you click in a symbol on your code, you can hit Ctrl+Shift

How to highlight all occurrences of a word in an Emacs buffer?

心已入冬 提交于 2019-11-28 15:22:43
Notepad++ has a convenient feature: if you select a word in your text (not necessarily a keyword), the word is highlighted throughout the text. Can this be done in Emacs as well? And if so, how? It doesn't necessarily have to work exactly like Notepad++ (i.e., via selection); ideally, I would like to set up a key binding that causes all occurrences of the word under cursor to be highlighted. It would be great if the highlights were permanent, i.e., moving point away from a highlighted word should not cause the highlight to be removed. Also, it would be useful if there was a solution that made

How to do hit-highlighting of results from a SQL Server full-text query

邮差的信 提交于 2019-11-28 10:12:37
We have a web application that uses SQL Server 2008 as the database. Our users are able to do full-text searches on particular columns in the database. SQL Server's full-text functionality does not seem to provide support for hit highlighting. Do we need to build this ourselves or is there perhaps some library or knowledge around on how to do this? BTW the application is written in C# so a .Net solution would be ideal but not necessary as we could translate. Expanding on Ishmael's idea, it's not the final solution, but I think it's a good way to start. Firstly we need to get the list of words

Slow highlighting in Firefox

二次信任 提交于 2019-11-28 09:30:45
问题 We need to add anchors and highlights for some keywords/sentences in the html page. It turns out the highlighting is really slow in Firefox. In the following code, all ranges which need to be highlighted are stored in array hiliteRanges : for (var i = 0; i < hiliteRanges.length; i++){ document.designMode = "on"; var selHilites = window.getSelection(); if (selHilites.rangeCount > 0) selHilites.removeAllRanges(); selHilites.addRange(hiliteRanges[i]); var anchorId = 'index'+i; var insertedHTML =

How to highlight all occurrences of a word on a page with Javascript or jQuery?

耗尽温柔 提交于 2019-11-28 08:02:21
问题 I have a list of keywords and then a list of sentences containing those keywords on a page. I'd like to make the keyword list clickable. When a user clicks on a keyword, all occurrences of that keyword would highlight in the sentences. How can I do this with jQuery or raw Javascript? The only way I can think is to wrap every word on the page with a class containing itself as the class name. Then make the keywords buttons that add a highlight class to the matching word classes. This may work,

Android webview: highlight a specific word in a page using javascript?

我是研究僧i 提交于 2019-11-28 07:52:38
i am using a webview inside my android application. I would like to know if it is possible to highlight or underline a specific word/sentence/paragraph in a loaded page using code done in javascript? thanks You should look at this page . Do a view source. They use pure Javascript--not even jQuery--to highlight particular words on the webpage. Basically they load all of the text they want to search through into a variable and continuously find the indexOf the search term they want to highlight. When they find the index of the term, they build a new string with everything before that index + a

Emacs: highlighting TODO *only* in comments

泪湿孤枕 提交于 2019-11-28 06:28:10
This question is related to another one, Emacs :TODO indicator at left side . I recently came across a minor mode I like a lot called FixmeMode . It supports auto highlighting of TODO marks, and navigating between them. However, I think it makes more sense to recognize the "TODO" strings only in comments, rather than polluting the whole file. Is it possible? Trey Jackson Check out the library fic-mode.el , it has been verified in C++ and Emacs-Lisp. It was written specifically to answer this question. The installation is like any standard package: (require 'fic-mode) (add-hook 'c++-mode-hook

Monitor text that is highlighted

自古美人都是妖i 提交于 2019-11-28 01:41:15
问题 This is more of a hypothetical question, I'm brainstorming some ideas for a project that I'm planning, and was curious if anyone knew of any APIs or methods of getting any highlighted text instantly on any window, for example from a browser or word processor. It could also have possibly a key command that would only read when pressed (Akin to CTRL+C adding the selected text to a clipboard) Any knowledge in what APIs exist for this would be greatly appreciated. 回答1: You can use JNA to actually

Highlight Part of a text in a cell of datagridview

心不动则不痛 提交于 2019-11-28 01:41:12
问题 How can i Highlight Part of a text in a cell of datagridview ? I am using C#. For example user searches book. on of cells contains bookmark. I want to highlight "book" in bookmark. Thanks. Edition. Is this code ok? Private Sub DataGridView1_CellPainting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting If e.RowIndex >= 0 And e.ColumnIndex >= 0 Then e.Handled = True e.PaintBackground(e.CellBounds, True) Dim sw As

How does one change the color for text highlighting in Xcode 4 for warnings and errors? [duplicate]

偶尔善良 提交于 2019-11-27 20:11:15
Possible Duplicate: Fix for Xcode's indiscernible highlighting of inline errors? Does anyone know how to change the color of the in-line highlighting for warnings and errors in Xcode 4? With almost every theme, the yellow warning highlight makes the underlying code impossible to read. Example picture Just came across this, which seems to be able to modify some of Xcode's behaviors by creating some sort of plugin. Maybe one can be developed to change text highlight color. http:/github.com/davekeck/Xcode-4-Fixins Update: I've finally managed to implement a Xcode "fixin" to do it. You just need