Sublime text volatile find next - sublimetext2

I am trying to replicate Eclipse volatile find next functionality (I think that is what it is called).
This is where the search term for find next will automatically be set to whatever text is highlight.
In sublime text, when I hit find next, if will jump to the next occurrence of the last term searched for. If I selected over a different term, it still will search for the last term entered when I pressed ctrl+F.
In eclipse it will always set the current search term to the current highlight text at the time find next is hit. I am a pretty big fan of this functionality.
To do something similar in sublime, I have to select the text then hit ctrl+F, esc, then find next.
Is there a way to set the search at to the current highlighted text at when find next is hit?

Similar functionality exists as "Quick Find" in Sublime Text 3 (Ctrl+F3 shortcut on Windows). It is possible to create a sublime-keymap file to remap the "Find Next" binding (F3) to this if you desire, see the documentation here: http://docs.sublimetext.info/en/latest/customization/key_bindings.html. Looking at the default mapping, the sublime text "command" for this is called find_under.
EDIT: Sublime Text has a "Use Selection for Find" feature (Ctrl+E, command slurp_find_string), which affects "Find Next" (F3) and "Find Previous" (Shift+F3). Unfortunately, Sublime Text does not allow binding one key to multiple commands, which means that it is not possible to rebind F3 to execute the slurp_find_string command when the selection is not empty, and then perform a find_next as normal. It may be possible by creating a plugin, however. Someone has already done something similar here which may be helpful as a starting point: https://www.sublimetext.com/forum/viewtopic.php?f=5&t=8677

Related

Labview pop up requesting folder/file

I just encountered an issue with a Labview project.
Background
The software in question is usually a standalone application, but for the sake of debugging purposes we found a way to run it in the Labview environment with the source files.
Issue
When we press the run command (which is not broken btw), it starts processing the files I guess, and at some point a folder explorer will pop up without further detail on what it is requesting. We have been trying to select the MAIN folder (where the MAIN.VI is), the SOURCE folder which contains all the VIs and subVIs of the project, but either way it just updates a log tab with the text "The application has stopped"(which I assume is due to us not selecting the correct file/folder).
I guess my main questions are,
Is there a way to tell what this pop up is expecting us to select?
Are there known function blocks which could be asking for a file/folder path?
Additional information*
A couple of months ago, someone knew this path and we have run it correctly, but he just forgot it, so that is why I am certain that it works this way. It runs in a Labview 13 environment.
Any help is greatly appreciated.
Greetings.
Try searching the VI Hierarchy by name for likely culprits:
Open a VI or project and select View»VI Hierarchy to display the VI
Hierarchy window.
Initiate a search by typing the name of the item
you want to find anywhere in the window. As you type the text, the
search string appears, displaying the text as you type. LabVIEW
highlights one item at a time whose name begins with the search
string.
If there is more than one item with a name that begins with
the search string, press the Enter key to search for the next item
that matches the search string. Press the Shift-Enter keys to find
the previous item that matches the search string.
I'm pretty sure all the LabVIEW primitives that can display a file or folder dialog have either file or folder in their names but if that doesn't help you could also try save or write.
If you find more than one result, set breakpoints on them before running the code. When execution reaches the breakpoint it will halt and highlight the breakpoint position; you can then use the Step In / Step Over to check whether that's the node that triggers the dialog (and the Pause button to continue execution if not).

PhpStorm keymap for Sublime Text 3

I want to have PhpStorm keyboard shortcuts inside Sublime Text 3. Is it possible? How can I do it? I use Linux Mint if there is any difference.
I use these shortcuts the most:
reformat code
comment
PHPDoc comments
duplicate line/selected word/selected sentence ... (with one single shortcut Ctrl+D),
select word/line/childs (Ctrl+W),
I like the last one a lot -- you can select whatever is inside a tag or braces or other things with Ctrl+W and if you press it more than once the current parents whole childs and then current parent and then current parents parent and so on will be selected.
I want actually all of PhpStorm's shortcuts inside SublimeText 3.
As far as I know there is no possibility to export keys from phpstorm into sublime, but you can specify your keys in sublime with same values like in phpstorm, for example:
After that, you can export: settings.jar from phpstorm and save Sublime Text 3/Packages/User/Default (OSX).sublime-keymap from sublime somewhere on drive or cloud so you will have this keys forever. You can loosely import this keys in different versions of phpstorm and copy-paste keys from sublime-keymap into different versions of sublime.

Split selection into lines in PHPStorm

In Sublime I was quite fond of the "Split selection into lines" shortcut (super+shift+l). However I cannot find an equivalent of that in PHP Storm 8, I've found a "Split into lines" function in the Edit menu but feeding it either \n or \r doesn't seem to work. Does that function exist in PS ?
By default on PHPStorm 10+, you can toggle the Column Selection Mode with:
CMD + SHIFT + 8
Of course, you can configure any stroke you like. I like to keep the original one and add the one that matches Sublime which is CMD + SHIFT + L. Here is how:
Another option would be to use column selection mode:
https://stackoverflow.com/a/30031481/672989
There is a "Split Selection into Lines" action in the Extra Actions plugin.
Compatible with: Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
If I have a 200 line selection I don't want to have to create a cursor at the end of every line.
You do not have to "create a cursor at the end of every line" -- just create cursor on the beginning of each line (on Windows it would be Alt+Mouse drag Down/Up) and then just press End button. This is not that straightforward as separate dedicated action .. but still does the same job and pretty easy to execute.
In any case: there is no such exact action currently available in PhpStorm, unfortunately.
Please follow this ticket (star/vote/comment) to get notified on progress: http://youtrack.jetbrains.com/issue/IDEA-122181

Set syntax for a specific file name in Sublime Text 2/3

I have a program that uses a file called user.cfg to get its user defined configuration settings. The odd thing is that they chose the syntax for this file to be Tcl (it's not odd that it is Tcl, it's odd they chose the .cfg extension instead of .tcl). So, when I open this file in Sublime Text, it doesn't know what syntax highlighting scheme to choose.
What I would like to do is set the syntax highlighting for user.cfg to Tcl, but not all .cfg files to Tcl.
I have seen this question which is very similar to mine, except in that case the special file name had no extension so Sublime Text knew to assign Ruby highlighting to only that one file. Unfortunately, I have an extension so the solution given there will not work for me.
Is there any known way to get Sublime Text base a highlighting scheme on the full filename?
Take a look at the ApplySyntax plugin.
The previous answer is completely true; however, I thought it would be better to have it here all in one place rather than going on another webpage to find the list of procedure to apply it
Sublime text 3
This is found here
Ensure Package Control is installed. Instructions are found here.
In Sublime Text, press Ctrl+Shift+P (Win, Linux) or Cmd+Shift+P (macOS) to bring up the quick panel and start typing Package Control: Install Package.
Select the command and it will show a list of installable plugins.
Start typing ApplySyntax; when you see it, select it.
Restart to be sure everything is loaded proper.
Enjoy!

Sublime text 2 tab through multiple selection

Lets say that I have selected the word 'test' three times using ctr + d.
Is there a way to tab through the selections. So for example if I wanted to go to the second word and only change that one.
I seem to need this quite often but I cannot find it anywhere.
And I also know about the skipping with ctr + d and ctr + k but this is not what I mean.
The MultiEditUtils package supports this.
Just install the package and bind a key to the selection_fields command, e.g.
{ "keys": ["alt+d"], "command": "selection_fields" },
To use it just create your multiple selection and press the keybinding. Then you can use tab and shift+tab to tab through the selection. If you tab behind the last one or press escape, then the multiple selection will be restored.
Demo:
It sounds like what you want is search. Sublime's search is accessed via Control+F (Windows/Linux), or Command+F (Mac). Sublime's search behaves similarly to many other applications, often web browsers have this feature. You can use this to cycle through instances until you find the one you were looking for. If you then hit enter, search will exit and the cursor will stop at the currently selected instance of your word.
See Sublime's unofficial docs for more details about its full search capabilities.
Hit Control+F to bring up the search
Type the term you want to replace
Put your cursor at the beginning of your document
Hit Control+G to select one
instance after the other and change it