IT박스

Sublime Text 2 및 3에서 프로젝트 제거

itboxs 2020. 6. 6. 08:59
반응형

Sublime Text 2 및 3에서 프로젝트 제거


Sublime Text 2 및 3의 프로젝트 창 ( Ctrl+ Alt+ P) 에서 프로젝트를 어떻게 제거 합니까?

Delete아무 효과가 없습니다, 거기에는 상황에 맞는 메뉴도없고, 관련 파일을 삭제 *.sublime-project하고 *.sublime-workspace하나의 목록에서 프로젝트를 제거하지 않습니다.

어떤 생각? 이 창이 어수선 해지기 때문에 ...


Sublime Text가 최근 프로젝트 목록에서 삭제 한 프로젝트를 제거하면 좋을 것입니다. 불행히도, 그렇지 않으며 더 이상 존재하지 않는 프로젝트로 인해 목록이 흩어질 수 있습니다.

Sublime Text가이 기능을 제공 할 때까지 프로젝트를 제거 할 수있는 몇 가지 수동 방법이 있습니다.

옵션 1 : 빠른 방법 (모두 지우기) :

목록을 정리하는 가장 빠른 방법을 찾고 있다면이 옵션이 적합합니다.

양해하여 주시기 바랍니다 이 최근 목록에있는 모든 프로젝트를 취소합니다 . 여기에는 삭제하지 않은 것이 포함됩니다.

Sublime Text 메뉴에서 goto :

프로젝트> 최근 열기> 품목 지우기

여기에 이미지 설명을 입력하십시오

옵션 2 : 수동 방법 (그러나 제거 할 프로젝트 제어) :

  1. 숭고한 텍스트 닫기
  2. Session.sublime_session아래 경로를 사용 하여 파일을 찾고 다른 코드 편집기로 파일을여 십시오 . * 변경 내용을 덮어 쓰므로 Sublime Text로 열지 마십시오. *

    Session.sublime_sessionOS 및 ST 버전으로 나열된 파일 경로 :

    Windows x64 :

    숭고한 텍스트 2

    C:\Users\[Username]\AppData\Roaming\Sublime Text 2\Settings\Session.sublime_session

    숭고한 텍스트 3

    C:\Program Files\Sublime Text 3\Data\Local\Session.sublime_session

    맥 OS X:

    숭고한 텍스트 2

    ~/Library/Application Support/Sublime Text 2/Settings/Session.sublime_session

    숭고한 텍스트 3

    ~/Library/Application Support/Sublime Text 3/Local/Session.sublime_session

    리눅스 (우분투) :

    숭고한 텍스트 2

    ~/.config/sublime-text-2/Settings/Session.sublime_session

    숭고한 텍스트 3

    ~/.config/sublime-text-3/Local/Session.sublime_session

    기대할 것 :

    이 파일의 맨 아래에 다음과 같은 내용이 표시되어야합니다.

    여기에 이미지 설명을 입력하십시오

  3. 이 파일에서 원하지 않는 프로젝트를 제거하십시오

    project3을 삭제 한 후의 파일 모양 :

    여기에 이미지 설명을 입력하십시오

  4. Sublime Text 2/3 저장 및 다시 시작

Option 3: The plugin way

You can check out the Sublime Text plugin Project Manager.

Option 4: The Node.js way

You can check out: clean-sublime-text-project-history


Just to clarify something in Valjas' solution above.

When he says: "Go to Sublime Preferences folder..." he means: "Go to the USER folder", not the Program folder.


Attention: Use a different editor to modify the "Session.sublime_session" file:

Although obvious for many, it may not be for others:

You HAVE to edit the Session.sublime_session file with a different text editor, and Sublime Text itself has to be closed.

DO NOT use Sublime Text itself, or leave the program running while making the changes.

If you do it'll overwrite your changes when closing the app.


Sublime Text 3:

WINDOWS x64:

C:\Users\[Username]\AppData\Roaming\Sublime Text 3\Local\Session.sublime_session

Linux (Ubuntu):

~/.config/sublime-text-3/Local/Session.sublime_session

Mac OSX/Sierra:

~/Library/Application Support/Sublime Text 3/Local/Session.sublime_session

Portable Installation (It might work for ST2 as well but I haven't tested):

/folder-where-you-have-ST3-installed/Data/Local/Session.sublime_session

--

Sublime Text 2:

WINDOWS x64:

C:\Users\[Username]\AppData\Roaming\Sublime Text 2\Settings\Session.sublime_session

Mac OSX:

~/Library/Application Support/Sublime Text 2/Settings/Session.sublime_session" then find the section "recent_workspaces".

Linux (Ubuntu):

~/.config/sublime-text-2/Settings/Session.sublime_session


Where To Edit The File

Easy, look for the "recent_workspaces" section, it's usually at the bottom of the file.

It should look similar to this:

여기에 이미지 설명을 입력하십시오


Credits

  1. ST3 Linux (Ubuntu) / Build 3047 path added from @ezrepotein4's comment.

  2. ST2 Linux (Ubuntu) path added from @0x4a6f4672's comment.

  3. Windows x64 and Mac paths taken from this post.


Sublime Text 2: To clean up sublime file history, project history, autocomplete history and find/replace history do the following

  1. Close all instances of sublime text 2.
  2. Delete the file Session.sublime-session in Settings directory.
  3. Start up sublime

When you close sublime again and look up the settings directory, it will still have a Session.sublime-session file because sublime re-created it but its size shall be smaller than the one you had earlier cos it doesn't contain any junk data from previous projects history etc.

I hope this shall improve startup times for sublime text 2. You may choose to take a backup of Session.sublime-session to a different folder incase you want to remember the project paths etc. and then copy paste the once you need using a file comparison software. Just remember to close sublime whenever you deal with Session.sublime-session i.e. if you need to make any changes in that file, you'd be making them in some other text editor like notepad++ etc.


for MacOS High Sierra

you need to modify Session.sublime_session file which can be found with 3 approaches

via terminal

cd ~/Library/Application Support/Sublime Text 3/Local/

via Sublime Text 3

click on the first menu

Sublime Text > Preferences > Browse Packages...

it will open the location in Finder which is

Macintosh HD > Users > username (with home icon) > Library > Application Support > Sublime Text 3 > Packages

한 폴더 위로 이동하여 로컬 폴더를 클릭하십시오.

파인더에서

Macintosh HD >> 사용자 >> 사용자 이름 (홈 아이콘 사용)> 라이브러리 (기본적으로이 폴더는 숨겨져 있음 command + shift + .) >> 응용 프로그램 지원> 숭고한 텍스트 3> 로컬

숭고한 텍스트 편집기 이외 의 파일 Session.sublime_session편집하십시오.

 


리눅스에서 다음 명령을 실행하면 숭고한 텍스트의 작업 공간이 깨끗해집니다.

echo ''>$(locate Session.sublime_session)

참고 URL : https://stackoverflow.com/questions/11744365/removing-projects-in-sublime-text-2-and-3

반응형