Skip to content

Instantly share code, notes, and snippets.

ST3 hot_exit but keep old sessions

Sublimes hot_exit feature is awesome: Don't prompt me, remember the state of my open and unsaved files.... whatever. However, if most of the time you launch sublime with subl directory/i/want/to/open I get two windows: one for your previous session and one for the directory you want to work on. It's a pain to have to close what you were previously working on every time, so some people prefer to disable hot_exit and have sublime ask them if they want to save changes every time they close it.

I wanted to save the previous sessions in case I want to access them, but prevent them from opening when I just want to move on to something new. The last session is saved when you exit sublime to $SUBLIME_CONFIG_DIR/Local/Session.sublime_session. To get this effect I modifies the script that launches sublime /usr/bin/subl and /usr/bin/X11/subl (I'm on linux Mint, and have sublime installed to /opt/sublime_text, should be similar on Ubuntu, etc.) to look like the followi

@spelufo
spelufo / ipn
Last active August 29, 2015 13:56
IPython/IJulia Notebook Launcher with tmux

IPython/IJulia Notebook Launcher with tmux

sudo apt-get install tmux

then create this shell scripts somewhere in your $PATH and chmod +x them.

#!/bin/bash