How to create a file in a specific directory in Rubymine/PHPStorm/other JetBrains IDEs without leaving the home row - intellij-idea

Currently, I am doing the following:
cmd-1 to go to the project structure view
Move to the arrow keys (not on the home row - I want to avoid this step), or, (horrors!) the mouse to navigate to the folder I want to create the file in
ctrl-alt-n to open the new file dialogue, which always created the file in the selected directory
Is there a better way to specify/move to the directory without having to use the arrow keys/mouse so that I can stay on the home row?
I have tried:
Moving to the root of the project structure pane using pageupand typing the name of the directory - this is good, but pageup is way off the home row. Also it often selects the wrong folder (e.g. the one in /spec, not the one in /app) and I can only get to the right one with the arrow keys again. There seems to be no way to type app/controllers as it doesn't process the slash as a directory separator for some reason.
Using the navigation bar via option-pageup, moving all the way left with the left arrow, then either navigating to the right directory with other arrow keys, or using ctrl-alt-n from the roor and typing the full path, but this is also way off the home row and no faster.

Type ⌘+SHIFT+O (or CTRL+SHIFT+N if you are using Linux/Windows keymap) to open the Navigate to file dialog (or hit SHIFT+SHIFT to open the Search Everywhere dialog).
Type the name of the directory you want to create the file in. Note that the directory name must end with / in order for IntelliJ to know that you want to open a directory not a file.
You can type just part of the path, such as webapp/resources/
Hit Enter and the selected directory will be opened in Project view.
Then you can use ⌘+N (ALT+Insert) to create new file as usual.

Related

How do I open a file with a specific application rather than its default application?

I am trying to open files using a specified executable; just like as if you were to right mouse click on a file then scroll to "Open with"
I tried what kaymaf said and reviewed the docs, but I cannot seem to get this to work.
Dim FI As New FileInfo(GetFileNameFromListViewItem(ListViewCollection.SelectedItems(0)))
Dim GetExif As Process = System.Diagnostics.Process.Start("C:\Users\*username*\Downloads\exiftool.exe", FI.FullName)
This just ends up open the executable and rather than opening the file with the executable.
You would like to open a file with your program using the Windows context menu; and do you want to get an entry in that menu? If that is not correct, the answer can be deleted.
I found this in a German forum, and they refer to this site:
This is the translated text:
One possibility would be that you register your file extension and your program in the system to open this file extension. As soon as the system knows everything, you only need to right-click on the file(s) and in the context menu, in addition to the standard entries, another menu item for opening these files is displayed. If you select this menu item, your program will start automatically if it has not yet started, and you can read out / determine the path to this file or several files in your program and process it accordingly. How it all works is described here: ookii.org/Blog/opening_files_via_idroptarget_in_net
On this page there is also a sample for download (start text files with your own program via an additional entry in the context menu / display paths to the files). It is not a VB, but it should be translatable without any problems. Corresponding information on the page and the comments should be observed.

Intellij vcs plugin, view changed files AND file changes in the same window

I normally do git diff for this but want to leverage the intellij gui.
The Version Control tab just shows me all the files that changed:
To view the actual changes I have to select a file and choose "Show Diff".
This opens another window. Now from this other window if I want to see changes for another file I have to click this button then open the other file:
I don't like that. Is there a way to have this in the same pane? Where on the left I see a list of the changed files and I just have to select the file to see its changes? Otherwise its very clunky and unusable for being able to see a tree of changed files and selecting the one's changes I want to see
Just found it, I wanted "preview diff"

Can't find location of dsmodel.mof - Dymola

I cant find the location of the generated dsmodel.mof file from my Translated and Simulated model.
Where can i see the save location of the file without searching through every folder on my computer?
It should be in your working directory.
You can find (and change) the location of your working directory of it using either the GUI:
- File -> Working Directroy -> Browse
or by typing
cd into your command line in the Simulation view.
Adding a parameter to the cd command will change the location, like in cd("C:/Temp/DymolaWD") (the path has to exist before using cd)
Alternatively you can use the folder-like looking button in you command window in the simulation view to open it directly in the Windows Explorer, by clicking the small arrow next to it and selecting Open in File Browser.

IntelliJ IDEA: how to search for a folder / directory / package name?

I wish to search just directory (folder) names and packages within the modules of my current project.
How can I do this?
CTRL+Shift+N allows me to find a
class
CTRL+Shift+Alt+N allows
me to find a symbol
Is there a function for that allows me to search just directories, folders and package names?
I'd like the result of this search to be that the directory / package sought is highlighted in the "Project" box.
For example, if I type in "model.feed" then then I get this:
and preferably while I'm typing that a list of any directories matching would be shown in real time (in the same way as classes are when you do CTRL+Shift+N).
I'm using IntelliJ IDEA 12.0.4 (Ultimate).
In IntelliJ IDEA 13, you can use Goto File (Ctrl+Shift+N) and enter the directory/package name with a slash afterwards. Then you'll see all the matching directories in your project.
I propose this as a partial solution to your query.
The following steps will allow you to find a file or directory or package name or jar name that is visible in the project view.
Caveats stated explicitly below, but give this a go.
Click on the root folder in the Project View.
Start typing words that you want to search on to find packages/files/folders/jars in the project view
A tool tip will appear that contains the text Search For: along with the text that you have
entered.
The Project View will then highlight the first folder or file that matches the text that you have entered.
This may be close to what you are looking for.
The only caveat is that this search is constrained to those entities currently visible in the Project View so if you want to search a particular part of the project it appears that you have to expand those folder within the Project View. (From my testing of this in IntelliJ Ultimate Version 11.)
One way to work around this is to go to the root element in your project. Perform a partial traversal of where you want to go then by pressing enter you open the folder that you have landed on and then that search is completed.
Starting typing text again after pressing Enter will recommence the search from the current item in the Project View.
So by experimenting with this feature you can interactively walk around your project in the Project View in a dialog-box-free manner.
As a side note you can use the letters Camel Case style to traverse and find classes in the ProjectView
WINDOWS:
CTRL + SHIFT + N
MACOS:
⌘ command + ⇧ shift + O
If you try
CTRL + SHIFT + F
You can do a global file search (like eclipse CTRL + H).
In the file search, you can select which folder to search for, what file type to search for, case sensitive etc, all the normal stuff.
Global Replace is
CTRL + SHIFT + R
(Mac replace CTRL for CMD)
On mac it is
CMD + Shift + O
at least for intellij 14.1
If you have the file open in the editor and can't figure out the location in the project view
WINDOWS:
ALT + F1
From Select In... pick the first item, Project View
It seems IntelliJ doesn't directly support this. Here are the best alternatives I've thought of so far:
I suggest these steps if there is nothing in the folder yet (Windows):
Windows:
Right click on the project root, and choose "show in explorer"
In the search box on the top right, search for the folder you want (e.g. META-INF)
Right click, "open folder location"
Linux/Unix/Cygwin:
Copy the path instead, (in the right-click menu),
cd to the directory using a console or cygwin,
use the 'find' utility. E.g. type find . -iname 'SomeFolderName*'
If there is already something in the folder, I suggest you do this:
Ctrl-Shift-F to search for files
Enter the directory name inside a wildcard pattern (eg. */META-INF/*)
open the first file that occurs in that folder
Click on the circular target icon to "scroll from source" (at the top of the project panel).
If you find yourself wanting to search for folders/packages often, you can use the Go to File command (Ctrl + Shift + N) and set a filter on Directories so that you can quickly search for directories and packages. The filter will be saved for the next time you use Go to File. As a demonstration:
Use Go to File (Ctrl + Shift + N) and click on the filter icon (funnel-shaped) on the top right of the search box. Disable/unselect all other selections and only keep Directories selected.
Try searching -- you should only see directories and packages in the result.
Try using Go to File again -- you should find that the filter still exists

jedit navigating file system with keys when opening a file

How to make jedit navigating file system with left, down keys. So when in the ctrl-o form, if I press left key after the cursor is at the first character of file name, it should jump up the file browser tree and every left key press would move up higher in directory. It used to work out of the box with 5-6 old jedit, but these newer versions, I can't get it to work.
This alone made me love jedit for so many years.
An alternative usage is to type .. into the filename label then enter ( or ../.. to go up two levels ). To go down into a directory or open a file name, type the few characters of the file or directory then hit tab to autocomplete the name of the node then enter. Once you autocomplete the name you can use the up and down arrows to select in the current directory hierarchy.
Not a direct answer, but I find this to be a rather quick mode.
Alternatively, you can switch focus to the file hierarchy pane with shift+tab , shift+tab and then use the arrow keys. Not sure if this is exactly what you're looking for, because I don't use this navigation mode.
I prefer my previous answer.