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

Content added Content deleted
imported>Abatula
imported>Abatula
mNo edit summary
Line 9: Line 9:
=== Installation ===
=== Installation ===


# Go to the [http://www.sublimetext.com main page] and click on the blue button that says "Download for Linux".
* Go to the [http://www.sublimetext.com main page] and click on the blue button that says "Download for Linux".
# Save the file to your desktop (or another convenient location).
* Save the file to your desktop (or another convenient location).
# Double click on the file to extract it, then open the extracted folder called Sublime Text 2.
* Double click on the file to extract it, then open the extracted folder called Sublime Text 2.
# To run Sublime, double-click on the executable file sublime_text.
* To run Sublime, double-click on the executable file sublime_text.
# If a text-editor window doesn't pop up, let a staff member know.
* If a text-editor window doesn't pop up, let a staff member know.


=== Setup ===
=== Setup ===


# If it's not running, double-click on sublime_text.
* If it's not running, double-click on sublime_text.
# From the top menu, click Preferences, then click Settings - Default. A new tab will open with text and options in it.
* From the top menu, click Preferences, then click Settings - Default. A new tab will open with text and options in it.
# Scroll down until you see the line <code>"translate_tabs_to_spaces": false,</code>
* Scroll down until you see the line <code>"translate_tabs_to_spaces": false,</code>
# On that line, change false to true so that it reads <code>"translate_tabs_to_spaces": true,</code>
* On that line, change false to true so that it reads <code>"translate_tabs_to_spaces": true,</code>
# Save the settings by pressing <code>Ctrl+s</code> or clicking on File, then Save.
* Save the settings by pressing <code>Ctrl+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 ==
Line 30: Line 30:
=== Installation ===
=== 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".
* 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).
* Save the file to your desktop (or another convenient location).
# Double click on the file to extract it, then open the extracted folder.
* Double click on the file to extract it, then open the extracted folder.
# The official instructions are in the install.html file.
* 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.
** 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.
** 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.
* If the program does not run, ask a staff member for assistance.


=== Setup ===
=== Setup ===


# Once Komodo is running, click on Edit in the menu, then select Preferences.
* 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
* 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.
* 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.
* 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.
* 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.
* 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.
* If a new file doesn't open, ask a staff member for assistance.


== GEdit ==
== GEdit ==