I use the Arduino IDE for quick edits. For more extensive new code or changes I use GNOME gedit. (I use Ubuntu LInux as an O/S.) I use the Arduino IDE for compiling and uploading.
NOTE: For anyone who uses an editor other than the IDE’s built in one:
In the IDE you can select:
File > Preferences
Use external editor
Your sketch code will then be greyed out (read only) in the IDE and changes made and saved with any external editor will instantly be brought into the IDE when its window is selected. This makes it easy to verify/upload your changes using the IDE.
Also, if you associate .ino, .h, .cpp and .c files with the editor that you use, then with a sketch opened in the IDE you can use:
Sketch > Show Sketch Folder
and from there you can easily open your sketch file(s) in your editor.