Just a few weeks until the 2021 JavaScript Full-Stack Bootcamp opens.
Signup to the waiting list!
emacs
is an awesome editor and it’s historically regarded as the editor for UNIX systems. Famously vi
vs emacs
flame wars and heated discussions caused many unproductive hours for developers around the world.
emacs
is very powerful. Some people use it all day long as a kind of operating system (https://news.ycombinator.com/item?id=19127258). We’ll just talk about the basics here.
You can open a new emacs session simply by invoking emacs
:
macOS users, stop a second now. If you are on Linux there are no problems, but macOS does not ship applications using GPLv3, and every built-in UNIX command that has been updated to GPLv3 has not been updated. While there is a little problem with the commands I listed up to now, in this case using an emacs version from 2007 is not exactly the same as using a version with 12 years of improvements and change. This is not a problem with Vim, which is up to date. To fix this, run
brew install emacs
and runningemacs
will use the new version from Homebrew (make sure you have Homebrew installed)
You can also edit an existing file calling emacs <filename>
:
You can start editing and once you are done, press ctrl-x
followed by ctrl-w
. You confirm the folder:
and Emacs tell you the file exists, asking you if it should overwrite it:
Answer y
, and you get a confirmation of success:
You can exit Emacs pressing ctrl-x
followed by ctrl-c
.
Or ctrl-x
followed by c
(keep ctrl
pressed).
There is a lot to know about Emacs. More than I am able to write in this little introduction. I encourage you to open Emacs and press ctrl-h
r
to open the built-in manual and ctrl-h
t
to open the official tutorial.
Download my free Linux Commands Handbook
The 2021 JavaScript Full-Stack Bootcamp will start at the end of March 2021. Don't miss this opportunity, signup to the waiting list!
More cli tutorials:
- The Bash shell
- Introduction to Bash Shell Scripting
- The Fish Shell
- Shell, watch file content as it populates
- How to exit Vim
- UNIX Editors
- The UNIX Filesystem Commands
- Unix Shells Tutorial
- How to set an alias in a macOS or Linux shell
- A practical guide to Homebrew
- How to fix the xcrun invalid active developer path error in macOS
- The Command Line for Complete Beginners
- Introduction to Linux
- How to find the process that is using a port
- Linux commands: mkdir
- Linux commands: cd
- Linux commands: pwd
- Linux commands: rmdir
- Linux commands: ls
- Linux commands: mv
- Linux commands: cp
- Linux commands: less
- Linux commands: tail
- Linux commands: touch
- Linux commands: cat
- Linux commands: find
- Linux commands: ln
- Linux commands: ps
- Linux commands: echo
- Linux commands: top
- Linux commands: kill
- Linux commands: killall
- Linux commands: alias
- Linux commands: jobs
- Linux commands: bg
- Linux commands: fg
- Linux commands: type
- Linux commands: which
- Linux commands: whoami
- Linux commands: who
- Linux commands: clear
- Linux commands: su
- Linux commands: sudo
- Linux commands: chown
- Linux commands: chmod
- Linux commands: passwd
- Linux commands: open
- Linux commands: wc
- Linux commands: history
- Linux commands: du
- Linux commands: umask
- Linux commands: grep
- Linux commands: man
- Linux commands: uname
- Linux commands: sort
- Linux commands: uniq
- Linux commands: diff
- Linux commands: nohup
- Linux commands: df
- Linux commands: xargs
- Linux commands: gzip
- Linux commands: gunzip
- Linux commands: ping
- Linux commands: traceroute
- Linux commands: tar
- Linux commands: export
- Linux commands: crontab
- Linux commands: dirname
- Linux commands: basename
- Linux commands: printenv
- Linux commands: env
- A short guide to the ed editor
- A short guide to vim
- A short guide to emacs
- A short guide to nano
- Linux, no space left on device
- How to use Netcat
- How to use pm2 to serve a Node.js app