Sublime Forum

How to specify the full path of a newly created file in Subl

#1

Is there a package that will let me specify the full path of a file that hasn’t been saved yet? I know I can use the AdvancedNewFile package to specify the full path where a file should be saved, but I would like to do the same for a file that has already been created (but not yet saved).

0 Likes

#2

May be, that I understand you wrong.
But if you create a new file in ST (a new buffer) without saving, this file not really exists. It has no name, no scope and so a lot of plugins doesn’t work because they need a scope.
So i don’t see the sense behind this. :confused:

0 Likes

#3

Specify where? And what for?

0 Likes

#4

It’s stored in the Sublime session, which is in the app folder (OS dependant) and cannot be changed. The portable version probably puts the session file in the install folder though.

0 Likes

#5

@FichteFoll. This is a common use case:

  1. create new file
  2. start typing
  3. realize that I want to save the file in a specific location: “/my/specific/path/my.file”
    4a. pull up the save dialog, where I can’t just paste the path because it’s not in the current directory
    4b. copy text, pull up ANF: New File, paste the path, paste the text in this new file
    4c. a better alternative?
0 Likes

#6

AdvancedNewFile should help.

0 Likes

#7

Well, I can say that the Windows “save” dialog allows entering absolute paths. Other than that I only know that it is at least possible to change where a view points to (i.e. which file) on the API side.

0 Likes

#8

this works:
superuser.com/a/1021414/295075

0 Likes