Click on Edit in gedit's menu bar, then click on Preferences. You should see something like this:
Here are the options you want to make sure are turned on.
Display line numbers will help you compare the code you type in with the original, and make it easier to see which line is causing an error if there is a bug.
Highlight current line makes it easier to see which line you're on, when you have to go back and forth a lot.
Highlight matching brackets helps you make sure you didn't leave out a bracket by accident.
In gedit's Preferences dialog, click on the Editor tab. You should see something like this:
Got a comment? Spotted an error? Found the instructions unclear? Send feedback about this page.