GithubHelp home page GithubHelp logo

matkalinowski / pycharm-python-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hoffmann/pycharm-python-templates

0.0 1.0 0.0 170 KB

Python Templates for the PyCharm IDE

Python 100.00%

pycharm-python-templates's Introduction

#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: <your home directory>\.<productname><versionnumber>\config\templates
Linux: ~\.<product name><version number>\config\templates
MacOS: ~/Library/Preferences/<product name><version number>/templates

Example

MacOS, 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<TAB>", meaning you type the letters "fnpdoc" and then press the button <TAB> and it will fill the live template, in this case with the numpy docstring template for a function. Visually,

fnpdoc<TAB>

will become:

Parameters
----------


Returns
-------


Raises
------

pycharm-python-templates's People

Contributors

haikoschol avatar hoffmann avatar luw2007 avatar mpontillo avatar olgabot avatar ramiroluz avatar tiborsimon avatar vfedyk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.