orschiro
orschiro

Reputation: 21853

How to rename a file in Sublime Text 3?

I wonder if there is a way that allows me to rename an opened file in Sublime Text 3?

Renaming would include that the currently opened file is created under a different name and deleted under the old name.

Upvotes: 35

Views: 44188

Answers (5)

starscream_disco_party
starscream_disco_party

Reputation: 3006

There's way too many people suggesting plugins for something simple and built into Sublime's Package Manager.

In Sublime 3 there is a built in command within Package Manager. So: Shift+(Ctrl|Cmd)+p -> Rename File

Upvotes: 61

Jaskaran Singh
Jaskaran Singh

Reputation: 924

  1. Install AdvanceNewFile package from package manager. Link: https://github.com/skuroda/Sublime-AdvancedNewFile
  2. Use ctr+shift+p to open command window of sublime.
  3. Enter Rename and select ANF: Rename File

Advantage of this package is you can also move and delete the file with rename.

Upvotes: 1

Brian Low
Brian Low

Reputation: 11811

Here is a package for Sublime Text 3 I wrote:

https://github.com/brianlow/FileRename

Upvotes: 30

d.moncada
d.moncada

Reputation: 17402

There's the SideBarEnhancements plugin that does this.

You can find it on GitHub here: https://github.com/titoBouzout/SideBarEnhancements/tree/st3

Upvotes: 14

skuroda
skuroda

Reputation: 19764

I recently added the functionality to AdvancedNewFile. It should rename the currently opened view, assuming you have the appropriate permissions at the source and destination locations. If you try it and run into an issue though, please create an issue on the github page.

Upvotes: 4

Related Questions