Difference between revisions of "PyCharm"

(Created page with "PyCharm is an awesome IDE originally designed for Python development. It can also work with many other languages, including lua. This is a short tutorial on setting up PyCharm on...")
 
(added metadata)
Line 27: Line 27:
  
 
[[File:pycharm_4_result.png|400px]]
 
[[File:pycharm_4_result.png|400px]]
 +
 +
{{#set:LOVE Version=0.7}}
 +
{{#set:Description=How to set up PyCharm for LOVE2D projects under OSX.}}
 +
 +
[[Category:Tutorials]]

Revision as of 18:29, 28 October 2011

PyCharm is an awesome IDE originally designed for Python development. It can also work with many other languages, including lua. This is a short tutorial on setting up PyCharm on OSX Lion for love2d projects.

I assume you already have PyCharm installed, and love is in your Applications directory.

1. Open PyCharm Preferences and go to the Plugins page. Search the available plugins for lua. Right-click on it and select Download and Install.

pycharm 1 plugin.png

2. Go to the External Tools page in PyCharm Preferences. Add a new tool, give it a name. Fill in the following options:

  • Program: open
  • Parameters: -n -a love "$ProjectFileDir$"

$ProjectFileDir$ is a macro that inserts the project directory. You can find more macros in the "Insert Macro" button.

pycharm 2 external tool.png

At this point, you can launch love2d projects by running your new tool from the Tools menu. I like to have a shortcut key, but the next step is optional.

3. Go to the Keymap page in the PyCharm Preferences. Search for the name of your tool, and click Add Keyboard Shortcut...

pycharm 3 keymap.png

I used the shortcut Ctrl-Command-A.

That's it! You can now make a new project, add a new file called "main.lua" and fill it with all your lovey goodness. Run it simply by hitting your shortcut key or running Love2d from the Tools menu.

pycharm 4 result.png