Last week’s lecture on Vim (Vi Improved) really changed the way I coded in Ubuntu. I had a little experience with Vi, and I absolutely hated it. There was no syntax highlighting or and the commands were really confusing. For this class, before find out about Vim, I used the GUI gEdit to code, since I really wanted to avoid using Vi. gEdit is great, and there is nothing wrong with the program. However, whenever I use gEdit, I feel like am programming in Windows. The whole point of this class is learn to develop in the UNIX environment, so I decided to give Vim a shot.
Vim allows me to code within the command line. Programming in the terminal helped lower the number of programs and windows on the screen. As began to learn the commands in Vim, I found using this editor was efficient and easier than GUI based editors like gEdit. I was able to go from top of the document to the bottom with a press of a button, or copy 8 lines without using the mouse.
I wonder if there are any more editors like Vim? I am going to do some research and write about it next post.
Emacs is another very popular editor. The strength of emacs is the vast ecosystem of plugins available to add domain-specific commands. For instance, when editing python files, it knows about indenting, so pressing the TAB key a number of times on a line will cycle through the possible indentation levels for that line. There are additional commands to move complete blocks to a different indentation level.
For C and C++ emacs has a great extension for working with gdb, the GNU debugger so that you can debug your program from within the editor.
I tend to use emacs more for involved coding sessions and vim for quick edits to single files.
Thanks for replying Darren! Are you going to be showing the class how to use Emacs? My dad has been trying to get me learn this editor over vim for some reason.