diff --git a/_commands/editors/emacs.md b/_commands/editors/emacs.md new file mode 100644 index 000000000..2f1d5c8f2 --- /dev/null +++ b/_commands/editors/emacs.md @@ -0,0 +1,56 @@ +--- +--- + +Emacs +----------- +Terminal-based text editor initially developed in 1976 by Carl Mikkelsen, Richard M. Stallman, and Guy Steele Jr. Known for its powerful keystroke commands and user-customizable interface. + +**Usage** +~~~bash +* Open empty document +$ emacs + +* Open new or saved file +$ emacs +~~~ +To begin, simply open a file with the emacs command, and the editor will appear in the terminal window. Adding text to a file is similar to most GUI editors (no Insert/Command mode similar to vim): can simply start typing. However, emacs is also known for its powerful navigation and text editing techniques with its keystroke commands. Included below are some essential commands, helpful for basic navigation in the editor. + +#### Key +`C-` Ctrl Key +`A-` Alt Key +  + +#### Essential Commands +`C-x C-f` Open new/existing file +`C-x C-s` Save file +`C-x C-c` Quit Emacs +`C-x u` Undo last change +`C-g C-x u` Redo last change +  + +Once basic navigation through a file is managed, these additional commands help navigating and editing the file quick and efficiently. +  + +#### Helpful Editing Commands +#### Copying/Pasting Text +- `C-Space + Arrow Keys` Select text +- `C-w` Cut text +- `A-w` Copy text +- `C-y` Paste text +  + +#### Multiple Windows/Files (Split Screen) +- `C-x 2` Split screen horizontally +- `C-x 3` Split screen vertically +- `C-x o` Switch windows +- `C-x 0` Remove window/ Close file +  + +#### For more available commands and help: +`(prefix) C-h` + +(e.g.) `C-x C-h` (Provides all commands staring with C-x) + +##### or + +`C-h` General Help