Boston Python Workshop 8/Friday/Linux text editor
We need a good text editor for writing code. Fortunately, Linux comes with a great text editor call GEdit!
GEdit should already be installed on your computer.
Start GEdit: click Applications, point to Accessories, and click Text Editor. If you don't have this option, let a staff member know.
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. We do this because Python doesn't like it when we mix tabs and spaces.
Now you have an editor that you can use to open any text file, including Python programs.