How do I open a new tab when searching in Aptana Studio 3? - search

Kind of a newbie question.
Sometimes I use the project-wide search feature, and my search results appear listed in the window below, along with the related hierarchy placement.
Let's say I double click a file. It opens. Fine.
However, if I double-click again on another file in the search results window, it will replace the file I just opened. It's impossible for me to open multiple search results, short of manually opening them from the project view.
It wasn't always this way - it worked when I first installed the program, but something changed about three days in and I can't do it anymore.
Thanks!

Go to Preferences > General > Search and uncheck Reuse editors to show matches.

Related

In vscode, how to put editor regions inside tabs, and not the other way around?

I've been trying Visual Studio Code for a few days, and it's the first editor that I used in years that makes me feel I could switch from my beloved vim.
Now, it's hard to get used to new habits when you have years of muscle memory, but I'm trying to keep an open mind. There's one thing that's bugging me, though, and I could not find a way to get around: it's the fact that editor regions and tabs are "swapped". Let me explain:
In vscode, you define editor regions by splitting your screen, then each region can contain as many tabs as you want.
My problem is, that does not fit my workflow. Here's what my workflow used to be with vim, where regions are inside a single set of tabs (I mainly work with Django):
In a first tab, I've split my editor in half and I'm editing my models.py and forms.py side by side.
In a second tab, I've split the editor in half, I'm editing my views.py on the left hand side, and the right hand side is again split horizontaly, allowing me to edit multiple templatetags files.
In a third tab, I'm editing my main template, and I don't split the editor since the file may contain very long lines.
In a fourth tab, I'm editing several html files and the editor is split multiple times.
Etc.
That way, I can very quickly go to edit my models, then my views, then the templates, and start over in quick iterations.
With vscode, where the tabs are inside the fixed regions, not so much.
So my question is, what solution could I use? Am I missing a big feature here? Are there any extension that would allow me to get my old workflow back?
I'm also open to suggestions about new workflows.
As #romainl pointed out: the workflow is different, it doesn't work that way with VS Code (and I know, I'm a vim user, too).
The best you can get that is vaguely close to what you're used to is to consider VS Code windows as you did with vim tabs.
To give you an idea using your example:
You open a VS Code window and open side by side models.py and forms.py
You hit Ctrl+Shift+N (or Command+Shift+N on a Mac) and open a new window. There you open your views.py on the left and split the right one horizontally for the templates.
You open a new window again and repeat.
This way you can switch between different layouts with Alt+Tab
(or Command+Tab).
You could speed this up a bit by saving different workspace files for different files that you want open, because I think (not 100% sure) that saving the workspace also saves the layout.
There's a couple of annoying things with this approach though:
If you have multiple windows open in general (say, a browser, slack app and so on), they'll also appear in the list when you try to switch.
I'm not sure if the open folder will be remembered when opening a new window, but you can work around that by saving the workspace and opening it.
It's annoying but at least there's already a feature request about this ( https://github.com/Microsoft/vscode/issues/41486 )

Preference - How to prevent duplicate tabs from being opened?

I like to work in multiple columns when working on a project.
I will often switch back and forth between the columns and open other files using cmd+p.
If one column has the file open already then it will just refocus on that tab (good!). However, if I am in a column where the file isn't opened, instead of switching focus to that column, it will open a new tab and clutter my workspace(bad!).
Is there a setting I can change so I can achieve the desired behavior I described above? Chrome has an extension that can do this
There's a plugin for Sublime text 3 for this as well, it's called Open in relevant window and it works just like you just described.
Installation is simple and just like any other ST3 plugin, through package control.
Hope this helps!

Sublime Text 3 Project

I am trying to use sublime for editing and making rainmeter skins, I have installed a plugin that recognizes rainmeter code nice.
In my code I have an #include=\somelocation...
at that location the file has things like colour=something
In the actual file being loaded fontColor=#colour#
How do I get it so that if I change the name of colour inside the location file it would update everywhere else?
You can use the Find in Files... functionality, located in the Find menu. In the Find: box, enter what you'd like to look for (the buttons to the left allow you to search by regex, respect capitalization, and other options - just mouse over for a description). In the Where: box, enter where you'd like to search. If nothing is entered, the search will run in all open files and folders. Click on the ... button for some extra options. Finally, enter what you'd like to replace the found values with (if anything, you can also use this dialog to simply search files).
Clicking Find will first perform the search for you, so you can verify its results. Clicking Replace will do all the replacements.

Sublime Text 3: do not close tabs automatically

I am navigating the code of a big JavaScript library using Sublime Text 3. So I need to open a lot of tabs and switch between them to capture the code co-reference. However, Sublime closes 'unused' tabs automatically for me.
How to disable it? I googled but cannot find a solution. I find a shortcut ctrl+shift+t to restore the most recent closed file, but that is not enough. I need to disable the automatic closing, and that would be better if someone shows me the short key to "display and select a file from all open files". Thanks.
When you single-click on a file in the sidebar, Sublime displays it in a "temp" view that is overwritten the next time you single-click on a file. To open a file in a "permanent" tab that stays open even when other files are opened, you simply need to double-click on the file in the sidebar.
A more direct solution that I find mildly preferable, at least until I can retrain myself to double-click when I want a tab to stay open:
In the Settings, set preview_on_click to false.
This is not quite what I want since it all it does is disable the behavior to open a preview tab on single click -- thereby forcing the user to always double click. But perhaps by working this way for a week or so I will be able to retrain my ingrained assumptions and can go back to the default behavior.
Double click that file on left sidebar you do not want to close automatically.

How to force IntelliJ to always search in "Whole Project"

I like to use the Find in Path function CTRL+SHIFT+F, that searches for text strings in several files.
One thing I often run into though, is that I search for something that I know exists in at least one file, I get zero results or I find just some of the files that contain the search term.
Then I realise that the Scope setting in the Find Dialog box has been set to Module or Directory for some reason rather that "Whole project" which is what I almost always want.
What fools me here is that this only seems to happen occasionally - often I'll have the scope set to Whole project like I want to, but sometimes it will be something else.
How does IntelliJ decide which scope to use?
Also, is there some setting that can be used to force IntelliJ to always select "Whole project" as the default?
Just collapse the project tab before: Command + 1 or Alt + 1
The default selection depends on the context which launched the search. If you have the project tab open with a folder/file selected it will search in that folder or the parent of that file.
To search by default just close that panel (this will make the context be the whole project) and press the search shortcut and it will be scope properly.
Not really a solution, but how to avoid using the mouse for this:
When the dialog is open, press Alth before pressing enter. This will cause the scope to be set to Whole project.

Resources