Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 1.19 KB

linux_text_editor.mkd

File metadata and controls

36 lines (22 loc) · 1.19 KB

Setting up a text editor on Linux

Lucky for us, Linux comes with a good, free text editor called GEdit.

Finding GEdit

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

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

  • 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!

If you prefer a different editor for writing code, that's also great. Just make sure you've configured it to insert spaces instead of tabs.


Questions? Please don't hesitate to reach out to the author (me, Jessica!) at: jesstess@mit.edu.