GOTO in Python with Sublime Text 3

Target

Environment at hand

Use Anaconda from Sublime Package.

Assumption

manner

Teach Anaconda the path of virtualenv and the additional path from Sublime Project.

example.sublime-project


{
	"folders":
	[
		{
			"follow_symlinks": true,
			"path": "."
		}
	]
	"settings":
	{
		"extra_paths":
		[
			"/path/to/project/apps"
		],
		"python_interpreter": "/path/to/venv/bin/python"
	}
}

Key binding is your choice

I personally find it difficult to hit the default key

Default.sublime-keymap(User)


[
    {"command":"anaconda_goto","keys":["super+1"]}
]

It may be good to do it. All you have to do is hit the specified key where you want to see the definition.

bonus

My Anaconda settings

Anaconda.sublime-settings(User)


{
    "auto_complete_triggers": [
        {"selector": "source.py - string - comment - constant.numeric", "characters": "."}
    ],
    "pep8_max_line_length": 100,
    "python_interpreter": "/usr/local/bin/python",
    "anaconda_linter_mark_style": "none"
}

Anaconda also checks pep8, but by default the highlights are too intense and it's annoying to set 80 characters per line, so set it appropriately.

Recommended Posts

GOTO in Python with Sublime Text 3
Enable Python raw_input with Sublime Text 3
Read text in images with python OCR
Clustering text in Python
Text processing in Python
Pythonbrew with Sublime Text
Create a python3 build environment with Sublime Text3
UTF8 text processing in python
Scraping with selenium in Python
Working with LibreOffice in Python
Scraping with chromedriver in python
Debugging with pdb in Python
Working with sounds in Python
Scraping with Selenium in Python
Scraping with Tor in Python
Tweet with image in Python
Combined with permutations in Python
Speech to speech in python [text to speech]
Set up a Python development environment with Sublime Text 2
Use python installed with Pyenv with Sublime REPL of Sublime Text 3
Number recognition in images with Python
Testing with random numbers in Python
Working with LibreOffice in Python: import
Scraping with Selenium in Python (Basic)
CSS parsing with cssutils in Python
Text extraction with AWS Textract (Python3.6)
Numer0n with items made in Python
Open UTF-8 with BOM in Python
Text mining with Python ① Morphological analysis
Use rospy with virtualenv in Python3
Extract text from images in Python
Sort large text files in Python
Use Python in pyenv with NeoVim
Heatmap with Dendrogram in Python + matplotlib
Read files in parallel with Python
Speak Japanese text with OpenJTalk + python
Password generation in texto with python
Use OpenCV with Python 3 in Window
Until dealing with python in Atom
Reading and writing text in Python
Get started with Python in Blender
Working with DICOM images in Python
Write documentation in Sphinx with Python Livereload
Get additional data in LDAP with python
Spiral book in Python! Python with a spiral book! (Chapter 14 ~)
Try logging in to qiita with Python
Stress Test with Locust written in Python
English speech recognition with python [speech to text]
Python3> in keyword> True with partial match?
Exclusive control with lock file in Python
Device monitoring with On-box Python in IOS-XE
Try working with binary data in Python
Draw Nozomi Sasaki in Excel with python
Tips for dealing with binaries in Python
Display Python 3 in the browser with MAMP
Page cache in Python + Flask with Flask-Caching
Post Test 3 (Working with PosgreSQL in Python)
How to work with BigQuery in Python
Playing card class in Python (with comparison)
Dealing with "years and months" in Python
Process multiple lists with for in Python