The simple but useful copy-file-name Sublime package: Installation quirk

The copy-file-name Sublime package is a simple-but-convenient way to copy a file name (not path) to the clipboard, by right-clicking on the active document or one in the tree-sidebar. However, if you install it properly, as

    AppData\Roaming\Sublime Text 3\Installed Packages\RegReplace.sublime-package

You see the “Copy File Name” option, but it’s greyed out.

However, if you install it as a directory:

    AppData\Roaming\Sublime Text 3\Packages\copy-file-name

It works perfectly.

I only discovered this while starting to take a peek at the plugin’s source code. Thank goodness I don’t have to go any farther, as I’ve not yet worked on Sublime plugins.

(I’m did this with Sublime 3, build 3065.)

Before this plugin, the only easy way to get a file name was to

Right click on a file in the tree > Rename... > Select all > Copy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s