Difference between revisions of "Linux text editor"

From OpenHatch wiki
Jump to navigation Jump to search
imported>Jesstess
(Created page with '== How to find gedit in the Applications list == On Linux, we suggest the GEdit text editor. GEdit should already be installed on your computer. To start GEdit: click Applicat…')
 
 
Line 27: Line 27:
  
 
Now you have an editor that you can use to open any text file, including Python programs.
 
Now you have an editor that you can use to open any text file, including Python programs.
 
[[Getting started with Python|« Back to the main page]]
 

Latest revision as of 14:45, 25 January 2013

How to find gedit in the Applications list[edit]

On Linux, we suggest the GEdit text editor.

GEdit should already be installed on your computer. To start GEdit: click Applications, point to Accessories, and click Text Editor. If you don't have this option, let a staff member know.

How to find GEdit from a terminal[edit]

If you prefer to start applications from a terminal, you can type the following into a terminal to launch GEdit:

gedit &

Configure gedit to indent with spaces[edit]

  • Click Edit -> Preferences
  • Select the tab labeled "Editor"
  • In the "Tab width" field, set it to 4 (the default is 8)
  • Check the box labeled "Insert spaces instead of tabs"
  • Check the box labeled "Enable automatic indentation"
  • Click Close.

That's it! Now, you can hit tab to indent your code, and that indentation will actually be made of spaces. This change will help you use spaces consistently, so that Python doesn't get confused about whitespace.

Success![edit]

Now you have an editor that you can use to open any text file, including Python programs.