

In many case you would prefer not to hardwire the absolute path but manage use through the normal shell PATH environment variable. So, instead of modifying TM_PYTHON, you can specify the path to the interpreter to be used by including a first line like this: #!/usr/local/bin/python3.1 The Run command in TextMate's Python bundle appears to respect a shebang line in the file being run. There is another approach that may be easier to use for some projects.
#Textmate m1 full
To change the Python version used globally within TextMate:įrom the TextMate menu bar, open TextMate -> PreferencesĮnter TM_PYTHON in the Variable field and the full path to the python in the Value field (perhaps /usr/local/bin/python3.1)Īs Alex points out, you may break other TextMate functionality by changing the Python version globally so the per-project change is probably a better solution. For bigger projects, you'll want to create a separate TextMate project for it anyway. You might want to save a Python 3 project, say, for running ad-hoc scripts under Python 3. Then you can add files as needed to the project and they will be run under the chosen python with TextMate Python bundle's Run Script command. A Project Information pane appears.Įnter TM_PYTHON in the Variable field and the full path to the desired python in the Value field (for example, /usr/local/bin/python3.1).Ĭlose the Information window and save the Project ( File -> Save Project As). Open a new or existing TextMate Project ( File -> New Project or File -> Open)ĭe-select any file in the project list sidebar.Ĭlick on the Get Info ( i) icon in the sidebar. A good solution is to take advantage of TextMate's ability to define variables like TM_PYTHON on a per-project basis: TextMate uses the value of the TM_PYTHON variable to find the path to the Python interpreter.


How do you configure it to use 3.1 instead? I've already installed the 3.1 package and I can use IDLE for interactive sessions, but I need to use TextMate now. # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.TextMate seems to use the built-in Python version I assume (sys.path doesn't work). Add An Alias (Permanent Alias) vi ~/.zshrc. plugins=( git docker )Īfter you satisfied, press ‘Esc’ and type ‘:wq’ which means you save a file and exit immediately. # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. In this case, I’ll add docker plugin, just add “docker” to our parentheses. In this case I want to enable plugin ‘docker’ on my zsh, so I’ll run this command vi ~/.zshrcĪnd type “/plugin” (without quotes) press enter, type ‘i’ character and insert the plugin that you want to add. Dracula theme is also good click see more.
