Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoffmann/PyCharm-Python-Templates
Python Templates for the PyCharm IDE
https://github.com/hoffmann/PyCharm-Python-Templates
Last synced: 3 months ago
JSON representation
Python Templates for the PyCharm IDE
- Host: GitHub
- URL: https://github.com/hoffmann/PyCharm-Python-Templates
- Owner: hoffmann
- Created: 2010-11-26T15:48:23.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T10:13:56.000Z (over 7 years ago)
- Last Synced: 2024-04-05T13:46:06.312Z (7 months ago)
- Language: Python
- Homepage:
- Size: 166 KB
- Stars: 142
- Watchers: 16
- Forks: 68
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#About
PyCharm lets you define live templates that expand a word into a snippet of
code with some input fields. They work similar to textmate snippets and
snipmate for vim.You can either add your on snippets via File/Settings/Live Templates or select
a region and add the text with Tools/Save as Live Template.Live templates are stored in the following location:
Windows: \.\config\templates
Linux: ~\.\config\templates
MacOS: ~/Library/Preferences//templates
## ExampleMacOS, PyCharm 3
```
git clone [email protected]:hoffmann/PyCharm-Python-Templates.git
cp PyCharm-Python-Templates/user.xml ~/Library/Preferences/PyCharm30/templates/
```You could also copy/paste the template XML to the `Python.xml` file but that's more work.
If you have not defined any user templates yet, you can copy the user.xml to
the templates location, otherwise you have to merge the files or add the
templates by hand.See http://peter-hoffmann.com/2010/python-live-templates-for-pycharm.html for
more information.## How to use
Now you should be able to type "fnpdoc``", meaning you type the letters "fnpdoc" and then press the button `` and it will fill the live template, in this case with the numpy docstring template for a function. Visually,
fnpdoc
will become:
Parameters
----------
Returns
-------
Raises
------