File Management in RubyMine

May 12, 2013 Jared Carroll

As developers, we create, update, and delete files all day long. Managing files from the command-line is one of the first skills we learned. However, constantly switching from your editor to the command-line to execute a simple file command, a command you’ve probably executed thousands of times before, is tedious and slow. Instead, stay in your editor, and let it take care of the boring stuff. In this post, we’ll look at RubyMine’s file commands on OS X.

Creating Files

To create a new file or directory, press control + alt/option + N within the editor or Project tool window.

new in current directory dialog

Copying Files

Use F5 within the editor or Project tool window to copy the current file.

copy dialog

F5 can also be used in the Project tool window to copy directories.

Cloning Files

To create a copy of a file or directory in the current directory, press shift + F5.

clone dialog

Moving Files

Move files and directories with F6.

move dialog

Like the previous file commands, this command works both within the editor and Project tool window.

Renaming Files

Files and directories can be renamed in the Project tool window with shift + F6.

rename dialog

Deleting Files

Delete files and directories in the Project tool window with delete.

safe delete dialog

Locating Files

To locate a file in the Project tool window, press alt/option + F1 in the editor, and then select the Project View option, the default option, from the Select Target dialog.

select target dialog

Select Reveal in Finder to open the file in a new OS X Finder window.

Working with File Paths

Use command + alt/option + F12 to view the complete file path.

file path dialog

Selecting a directory will open the directory in a new OS X Finder window.

Copy the current file path to the clipboard with command + shift + C. Copy a reference, the current relative file path and line with command + alt/option + shift + C.

paste from history dialog

These commands are useful for when you need to work with a file on the command-line.

Relying on Abstractions

A common developer fear is that overreliance on a particular IDE’s features will cause you to forget, or maybe never learn, the underlying commands. I agree that in some cases, e.g., version control, it’s important to know what’s going on under the hood. However, these situations are rare. And when it comes to everyday commands, I’d much rather use higher-level abstractions to free me from the mundane.

About the Author

Biography

More Content by Jared Carroll
Previous
Smelling with your ears: TDD techniques to influence your design
Smelling with your ears: TDD techniques to influence your design

Test Driven Development can be a hard sell. The first pitch is often designed to entice the buyer with safe...

Next
Releasing When It's Ugly
Releasing When It's Ugly

This is yet another post where the tl;dr is “SHIP IT!” but with a Pivotal perspective. It can be easy to ho...

Enter curious. Exit smarter.

Learn More