📖
Resources
  • 👋Welcome!
  • Semesters
    • 🚀S1 & S2
      • 🔍Focus
      • âš—ī¸Chemistry
      • 🔭Physics
      • 📊LAC
      • 📈VCD
      • đŸ˜ī¸BCE - BME
      • 🔌BEE
      • 📐Graphics
      • âš™ī¸Mechanics
      • đŸ–Ĩī¸CP
      • â›ˇī¸Life Skills
      • 🧑‍đŸ’ŧPC
    • 📚S3
      • 📉DS
      • âš™ī¸DE
      • 📊DMS
      • 🧑‍đŸ’ģOOP
      • đŸ–Ĩī¸OOP Lab
      • đŸ—ī¸LSD
      • 🌱SE
      • 🔍Extras
    • 📓S4
      • 📊GT
      • 💾COA
      • đŸĒŖDBMS
      • đŸ’ŊOS
      • 😃PE
      • đŸ‡ŽđŸ‡ŗCOI
      • đŸĨŧDE Lab
      • đŸ’ģOS Lab
      • 🔐Number Theory
    • âœī¸S5
      • 💾FLAT
      • 🛜CN
      • đŸ’ŊSS
      • đŸ•šī¸MM
      • đŸ’ģMOSS
      • â˜ĸī¸DM
      • đŸĨŧSS&M Lab
      • đŸĒŖDBMS Lab
      • Cryptographic Algorithms
    • 📖S6
      • CD
      • CGIP
      • AAD
      • PIP (Elective)
      • IEFT
      • CCW
      • Networking Lab
      • Mini Project
    • 📝S7
    • 🎓S8
  • Resources
    • Git
      • Git installation
      • What is Git?
    • Linux
      • Introduction
        • History of Operating System
        • Rise of GNU Project
        • Basic Terminologies
      • Linux shell
      • Commands
        • The Linux man command
        • The Linux ls command
        • cd command
        • The Linux pwd command
        • The Linux mkdir command
        • The Linux rmdir command
        • mv command
        • cp command
        • open command
        • touch command
        • find command
        • Cat command
        • grep command
        • Echo command
        • Vim Editor
        • Emacs Editor
        • Nano editor
        • whoami command
        • who command
        • su command
        • sudo command
        • passwd command
        • clear command
        • History command
    • DSA
      • 1.2 Concepts of Sliding Window Technique
      • 2.2 Characteristics of Sliding Window Problems
      • 1.3 Introduction to Deque and Monotonic Stack
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Resources
  2. Linux
  3. Commands

Emacs Editor

PreviousVim EditorNextNano editor

Last updated 1 year ago

Was this helpful?

The Linux emacs editor command

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 have 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 (). We'll just talk about the basics here.

You can open a new emacs session simply by invoking emacs:

Screenshot-2019-02-10-at-12.14.18

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.

You can also edit an existing file by calling emacs <filename>:

You can now start editing. Once you are done, press ctrl-x followed by ctrl-w. You confirm the folder:

and Emacs tells you the file exists, asking you if it should overwrite it:

Answer y, and you get a confirmation of success:

There is a lot to know about Emacs, certainly 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.

This is not a problem with Vim, which is up to date. To fix this, run brew install emacs and running emacs will use the new version from Homebrew (make sure you have installed).

Screenshot-2019-02-10-at-13.12.49
Screenshot-2019-02-10-at-13.14.29
Screenshot-2019-02-10-at-13.14.32

You can exit Emacs by pressing ctrl-x followed by ctrl-c. Or ctrl-x followed by c (keep ctrl pressed).

Homebrew
https://news.ycombinator.com/item?id=19127258
Screenshot-2019-02-10-at-13.14.35