In sublime text 3, you can add folders to create a project / workspace. You can then use goto anything ( ctrl + p ) to goto a file across a project. I know they are using fuzzy search, which I like very much. But, I could not understand the numbers that are displayed at the left of file listing. As shown in the image. How it is calculated. A ranking algorithm ? Even if it's ranking, what is the use of showing it to users.
Related
Very often while coding, I need to search for keywords which are common and happen throughout a large file, but I am looking for an instance within a function.
The default search functionality often gives me all results starting from the top. Is there any way/workflow to search only within a specific method/function or block of code?
Update
Do Ctrl + F
Then Ctrl + Alt + E
Type the text to search
On MacOS, it's cmd instead of Ctrl
Original Post
You can do it like this (mentioned keymaps are for Linux):
Let's take as an example the following code, where we will be searching for the word "key" inside the method "clear". As you can see there are many occurrences of that word (in red, highlighted the ones we want in our results, and in blue other occurrences, which we do not want to appear in our search results)
1- Select the area you want to limit the search scope to.
2- Press Ctrl+Shift+F. It will pop up a search window with the selected text pre-filled in the search box.
3- Select the options "Scope" and, in the combo next to it, "Selection" (if they are not selected by default)
4- Type the word(s) you want to search (in this example, the key word).
5- The results shown will be limited to the selected area. Notice how there are only 9 matches in the upper right corner ("Match case" option is checked), despite in the same file there are many other occurrences of the same word.
However, I was neither able to find a key combination in order to do this as a single action nor assign a new one. Also, notice how the search includes the text in the method documentation.
Tested using IntelliJ IDEA 2018.1.4 (Ultimate Edition), Build #IU-181.5087.20 on Ubuntu 18.04
Looks like we're finally getting this feature in IDEA 2019.3:
https://blog.jetbrains.com/idea/2019/09/whats-new-in-intellij-idea-2019-3-eap-2/ (Ctrl-F for subtitle "Ability to search in a selected area when using the Find action")
It’s now possible to search only in a selected area using the Find action (cmd+F / Ctrl +F). Simply select the code piece you need in the editor and invoke the Find action and the IDE will perform the search only in the selected area.
Screenshot from the article (was a GIF originally)
There is a way to search inside a method, however, it doesn't seem to work for other scopes.
When searching in file as usual, click "Find all"
You'll get a list of results in the bottom panel. If you enable "Group by file structure" (I had it disabled by default), you can get a list of matches for a particular method.
On IntelliJ in Mac:
In a file select the specific block in which we want to find
something
Press CMD + F
Press CTRL + OPTION + G
Notice that the cursor has automatically landed in the find toolbar's text field
Type in what is intended to be found
Press enter to move the cursor
to the first occurrence.
I am trying to edit a .srt file, and I am stuck on a specific task. I am sure there may be an easier way, but after searching for a couple hours, I am unable to find anything that helps me. I am trying to select all occurrences of the string "1" and then use the column editor to increment those occurrences by 1.
The first picture here shows the main issue in my .srt file. I am wanting to Select, not highlight all of the values that are currently highlighted in green. The find and replace box doesn't seem to help any because I need to do my increment operation using the column editor on the selected string. I have also tried the mark feature and that didn't do any good either.
Once I have them selected I can do These operations.
I know that I can hold the ctrl key down and manually select the lines that I need to edit, but that would take forever. It is kind of frustrating knowing that the text I need to select is already highlighted in green, but not selected. I am only a novice user when it comes to Notepad++ so I don't know all the features. Any help would be much appreciated. Thanks.
This is not possible to select that text easily. However, if you have PythonScript plug-in, this is easily done with Python script like
counter = -1
def increment_whole_line_number(match):
global counter
counter += 1
return str(int(match.group())+counter)
editor.rereplace(r'(?m)^\d+$', increment_whole_line_number)
The (?m)^\d+$ regex matches a whole line that consists of digits only (1 or more digits).
Here are the instructions on how to install the working PythonScript version (as the built-in does not work for me for some reason).
Here is my test:
I want to add dictionary on powerpoint 2013.I searched and found "adding custom.dic files" for a solution but it is too pointless to create word files which includes all english words with their meaining in my native language.
Is there any ready to use way to do that ?
I want to have a dictionary like in mozilla firefox dictionary add-on (when you point a word with the mouse cursor,a pop-up box appears and shows the selected word with their meaning in your language like english to french translation)
Any help will be appreciated!
This functionality already exists (at least in PowerPoint 2010). Position your cursor in the middle of a word (or select it) and right click. Translate is one of the options. The following shows what I got when doing so while the curoosr is positioned in Walls:
Not a fan of the "updated" search box in VS 2012. When I perform a search, I'd like to keep that search box visible as I'm clicking through my file tab well. Right now, it seems like the search box can only be visible for one file at a time.
For example, I'm have 2 files open. I search for the word "eyepatch" in the current file. I next want to perform this same search on the next file. But when click on the next file, the search box disappears and I have to do a ctrl + f and type "eyepatch" again.
Anyone know how to make this easier?
Hit F3 (Find Next). It keeps the search text from the previous search upon next invocation.
Select [All Open Documents] from the drop down menu at the bottom of the Search Box
I have a search people search page that makes use of RefineSearchResults where I can define which field I want the search refined by. This is setup and works to some extent, but I am experiencing problems whenever the column contains values with spaces in it.
Say I wanted to refine the search by OfficeNumber (from AD, not really a number) and I choose to refine the search by "Main" it works just fine, I only get people who have that OfficeNumber. However, if I try to refine the search by "Next door" I get no results and in the search box it shows: officenumber:Next door, which seems to indicate that it searches by Next instead of Next door, but I can't make any group markers such as " stick - it's gone when I hit enter.
Is there any way to fix this so that it can refine the search by values with spaces in them?