PyCon intro tutorial prep/OSX text editor: Difference between revisions

Content added Content deleted
imported>Jesstess
No edit summary
imported>Geography76
No edit summary
Line 1: Line 1:
[[File:Quill.png|100px]]
[[File:Quill.png|100px]]


== Installing Smultron ==
== Installing TextWrangler ==


On OSX, a good free text editor is Smultron.
On OSX, a good text editor is TextWrangler.


To download and install Smultron:
To download and install TextWrangler:


* Download the latest version of Smultron from http://sourceforge.net/projects/smultron/
* Download the latest version of TextWrangler from http://www.barebones.com/products/textwrangler/download.html
* Open the downloaded file from your Downloads directory or the Download bar in your web browser
* Open the downloaded file from your Downloads directory or the Download bar in your web browser
* Drag the icon (it looks like a top-down view of a tomato) to your Dock for easy access
* Drag the icon (it's a lasso shaped like a "W") to your Dock for easy access


To run Smultron:
To run TextWrangler:


* Double-click the Smultron icon from your Dock.
* Double-click the TextWrangler icon from your Dock.


== Configure Smultron to indent with spaces ==
== Configure TextWrangler to indent with spaces ==


* Start up Smultron, and click Smultron -> Preferences. This will pop up a preferences window.
* Start up TextWrangler, and click TextWrangler -> Preferences -> Editor Defaults.
* Check the "Auto-expand tabs" checkbox.
* Click on the Advanced tab, and then on the Really Advanced tab within that tab.
* Make sure the "Tab width" is set to 4 in the box below.
* Check the "Indent with spaces, not tabs" checkbox
* Restart TextWrangler for change to take place.
* Close the Preferences window.


That's it! Now, you can press Tab to indent your code, and that indentation will actually be made of spaces. We do this because Python doesn't like it when we mix tabs and spaces.
That's it! Now, you can press Tab to indent your code, and that indentation will actually be made of spaces. We do this because Python doesn't like it when we mix tabs and spaces.