Philadelphia Python Workshop/Setup/OSX text editor: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Abatula
imported>Geography76
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Our Recommendation ==
== Our Recommendation ==


On OSX, we suggest using Sublime, or Komodo Edit. Sublime and Komodo Edit are both available for free, but Sublime has an indefinite free trial period and requests that you purchase a license (you can ignore this for now).
On OSX, we suggest using Sublime. Sublime has an indefinite free trial period, but it will prompt you to purchase a license (you can ignore this for now).


== Sublime ==
== Sublime ==


Sublime Text is available from [http://www.sublimetext.com Sublime's web page]. It as a (non-free) lisence, but you can use the free trial period for as long as you like.
Sublime Text is available from [http://www.sublimetext.com Sublime's web page]. It has a (non-free) license, but you can use the free trial period for as long as you like.


=== Installation ===
=== Installation ===
Line 26: Line 26:
* Save the settings by pressing <code>Command+s</code> or clicking on File, then Save.
* Save the settings by pressing <code>Command+s</code> or clicking on File, then Save.
* Now every time you press the tab key, it should insert four spaces instead of a tab.
* Now every time you press the tab key, it should insert four spaces instead of a tab.

== Komodo Edit ==

Komodo Edit is a free editor available from [http://www.activestate.com/komodo-edit Active State].

=== Installation ===

* Go to the [http://www.activestate.com/komodo-edit/downloads downloads page] and click on the blue button that says "Download Komodo Edit 8.0.1 for Linux".
* Save the file to your desktop (or another convenient location).
* Double click on the file to extract it, then open the extracted folder.
* The official instructions are in the install.html file.
** If you are comfortable with using a command prompt you can follow those instructions to install the program.
** Otherwise, open the INSTLLDIR folder, then open the bin folder. Double-click the file komodo to start the program.
* If the program does not run, ask a staff member for assistance.

=== Setup ===

* Once Komodo is running, click on Edit in the menu, then select Preferences.
* On the left-side menu, click on Editor to expand it, then click on Indentation
* In both Global Indentation Settings and Per Language Indentation Settings, make sure Prefer Tab characters over spaces is UNchecked, and make sure both fields for Number of spaces per indent and Width of each Tab character are 4.
* Click on OK. Now the editor should add four spaces instead of a tab character when you press the tab button.
* To open a file, click on the New File label in the lower right. Select Python (not Python3) from the menu.
* A new file should open with <code>#!/usr/bin/env python</code> as the first line. This is a comment, and can be deleted or ignored.
* If a new file doesn't open, ask a staff member for assistance.




== Success! ==
== Success! ==


If you prefer a different editor for text, check with an instructor before moving on to make sure it will work for the weekend.
If you prefer a different editor for text, check with an instructor before moving on to make sure it will work for the rest of the workshop.


[[Philadelphia Python Workshop/Setup|&laquo; Back to the Friday setup page]]
[[Philadelphia Python Workshop/Setup|&laquo; Back to the Friday setup page]]

Latest revision as of 00:14, 25 July 2013

Our Recommendation

On OSX, we suggest using Sublime. Sublime has an indefinite free trial period, but it will prompt you to purchase a license (you can ignore this for now).

Sublime

Sublime Text is available from Sublime's web page. It has a (non-free) license, but you can use the free trial period for as long as you like.

Installation

  • Go to the main page and click on the blue button that says "Download for OS X".
  • Save the file to your desktop or downloads folder (or another convenient location).
  • Double click on the file (Sublime Text 2.0.1.dmg) to extract it.
  • In the newly opened window, drag the file Sublime Text 2.app into the Applications folder (a shortcut to your computer's Applications folder).
  • To run Sublime:
    • Search for Sublime Text 2 in the Spotlight.
    • OR Start Finder, select Applications from the left menu, then find and double-click on Sublime Text 2.
  • If a text-editor window doesn't pop up, let a staff member know.

Setup

  • Start the Sublime Text editor.
  • With Sublime as the active window, click on Sublime Text 2 in the top menu, scroll the mouse over Preferences, then click Settings - Default. A new tab will open with text and options in it.
  • Scroll down until you see the line "translate_tabs_to_spaces": false,
  • On that line, change false to true so that it reads "translate_tabs_to_spaces": true,
  • Save the settings by pressing Command+s or clicking on File, then Save.
  • Now every time you press the tab key, it should insert four spaces instead of a tab.

Success!

If you prefer a different editor for text, check with an instructor before moving on to make sure it will work for the rest of the workshop.

« Back to the Friday setup page