When coding, it's natural that you'd need a code editor! Below I've listed some of my (and others) favorites:

VSCode

Overall, VSCode is the recommended code editor for C2S2. If you don't have it already, you can download it here. Some advantages include:

  • Extensibility through extensions, including code formatting/highlighting
  • Ability to directly interface with the server through the Remote-SSH extension

VSCode is fairly simple to get started with once installed, and doesn't need much of a tutorial on its own - you learn as you go. To open up a file in VSCode, the general syntax is:

code <path-to-file>


Nano

Nano is a very beginner-friendly code editor, with basic shortcuts that are always displayed as a reminder. It is certainly not a bad one to start with for basic editing of text files. It operates entirely within the terminal itself

To get started, you can find a good but very basic tutorial here (although it has links at the bottom to point you in the right direction!). Another good tutorial is here

To edit a file using nano, the general syntax is

nano <path-to-file>

Nano is installed on the C2S2 server and is open-source

Vim

Vim is a low-level code editor that comes as part of Linux (well, strictly speaking, vi comes with Linux; vim stands for Vi Improved, and often comes as well). Since it operates entirely within the terminal, similar to Nano, it is very fast.

Its functionality is centered around operating in two modes; insertion mode (for editing text) and command mode (for running higher-level commands)

Luckily, Vim comes with its own tutorial! From the command line, simply run

vimtutor

The general syntax to edit a file using Vim is:

vim <path-to-file>

Vim is installed on the C2S2 server and is open-source

Emacs

Emacs was a popular code editor back in the late 80's, and is often seen as an antithesis to Vim. It is known for its high extensibility through the use of the Control and Meta (Alt) keys. While it is somewhat slow on the server due to its graphical installation, feel free to install your own version; it can also be compiled to run entirely from the terminal like other editors.

The best way I've found to get started is to simply type:

emacs

This will load a welcome screen the first time, on which is a link to a build-in tutorial for Emacs

The general syntax to edit a file using Emacs is:

emacs <path-to-file>

Emacs is installed on the C2S2 server and is open-source

It is recommended that you learn either Vim or Emacs at some point, as they are often build into systems, allowing you to code without needing extra installations (useful if you're on a protected server). Additionally, they are useful to know due to a long-going nerd war about which editor is better; many long-time coders have strong, over-the-top preferences regarding Vim vs. Emacs (Note to self: don't ever suggest to Prof. Batten that Emacs is anything less than great)

  • No labels