Shortcuts and workspace

Hi all,

I'm new to PHPStorm and really like it. There are two things I haven't found yet and couldn't find online.

1. Normally I make new files with the shortcut (ctrl + n / command + n), is there a fast way in PHPStorm to make a new file, so I don't have to use my mouse?
2. Is it possible to make a 'workspace', so I can view multiple projects (in the 'project-tab') at once in the same workspace?

Thanks a lot!

Comment actions Permalink

Hi Werner,

1) You can create your own shortcuts in File | Settings | Keymap. I do not think that is it possible to create shortcut for the actual "New File" action, but you can alter existing shortcut (Alt+Insert by default on Windows, depends on keymap) for the "File | New..." action (this will bring "Create New" popup-kind-of menu, where "File" entry will be on a top.

Actually, try this one (have not tried myself, but may work):
*) File | Settings | Keymap
*) in search box (under list of keymaps, next to "filter" & "bin" icons type "New File..." (with quotes)
*) in main area, under "Other" one single entry will be highlighted. Try assigning shortcut to this action. In theory this should be it.

2) Not really (as PhpStorm currently supports only one project in single window), but by using File | Settings | Directories you can add additional Content Roots (folders which can be located outside main project folder) which may solve your needs. You may also look at Settings | PHP -- you can add "Include paths" -- they will be listed in the project under "External Libraries" branch.

Comment actions Permalink

What i do to create a new file in PhpStorm is to go to a location where i want the new file and open a file of the filetype that i want.

if i want a new php file in

I open

and hit shift+F5  which is (clone a file)  it creates the same file, asks you to give it another name. then shift+a select all the code, DEL.  and you have a new file in the location you are working of the file type that you need.

In a real world example, im usually working in some smarty .tpl file when i realize i need a new .tpl file and "Clone a file" sets it up in the same location im actually working.

if its a full html file i need then i use the zen coding to do the structure setup. html:5+tab sets up all the head/body structure.  Havent used the file menu option for a long time.


Please sign in to leave a comment.