Easiest way to copy filename to clipboard?

I can right-click the file tab and select Copy Path or Copy Reference and get the full drive path or the project-relative path, but I always have to chop the folders off to get just the file name. Is there some way to add this to the menu or create a keymap for it?

5
9 comments

Select a file in Project tool window and hit Ctrl+C - file name will be copied to clipboard

1

First off, selecting a file in PTWindow is an unnecessary click and secondly it doesn't work like you mentioned.

It stupidly yanks the current line in that file into the clipboard.

File Name Grabber Plugin serves this purpose grandly ! (I changed the shortcut to Alt+F)

This needs to be an inbuilt feature in IJ !

0

>it doesn't work like you mentioned. It stupidly yanks the current line in that file into the clipboard.

It does work. But you need to make sure that the Project view is focused, not the editor

0
Avatar
Permanently deleted user

I'm able to select just the filename by clicking on the file in the Project tab then using Ctrl+C (or right-click then Copy), but sometimes a file tab only opens from a search, which doesn't automatically select the file in the Project tab, meaning I have to double-click the parent folder in the breadcrumb trail above to see the file in the file tree.

I thought there was some hotkey to just select the file in the tree or copy the filename just from the open file tab.

0

No, unfortunately there's no such hotkey.

You can either use File Name Grabber Plugin or submit a feature request to implement this action.

1
Avatar
Permanently deleted user

I've just landed here looking for this same easy way to copy the actual filename by a key.

The shortest way I see to do it is.

ctrl + shift + s (open save as with selected filename)

ctrl + c (copy to clipboard)

esc (close the window)

For me it's fast enough 
Hope this helps someone ;)

 

 

 

1
Avatar
Permanently deleted user

Try this: Alt+Shift+S and Ctrl+C

Alt+Shift+S opens 'Save Context...' dialog with selected filename. Just copy it

3

@...  So far the best ANSWER 

0

@Yogi Ghorecha, @Yeagor, Claus 
For Inteliji(Pycharm) works assignement of keyboard shortcut for the command that is available in main menu . 

or check same picture here >> https://prnt.sc/XPyZ6WtG_X8V

0

Please sign in to leave a comment.