Editing file in VI Emacs
In this lesson, we will introduce the Emacs editor. Emacs like vi is a powerful editor. Some people prefer vi, others prefer Emacs.
To edit a file with Emacs , run
emacs [file], the file is the file name that you wish to edit.
When you look at the Emacs documentation, you will see C-<char> , this means to hold down the Ctrl key while pressing that <character>. For example, C-h means to hold down the Ctrl + h.
When you see the M-<char> "Meta" key ( This is Alt key ) while pressing that <character>.
|C-h||Ctrl + h||Help|
|C-x C-c||Ctrl + x followed by Ctrl + c||Exit|
|C-x C-s||Ctrl + x followed by Ctrl + s||Save the file|
|C-h t||Ctrl + h followed by t||Built-in tutorial|
|C-h k <key>||Ctrl + h followed by k <key>||The help on key|
|C-p||Ctrl + p||Previous line|
|C-n||Ctrl + n||Next line|
|C-b||Ctrl + b||Backward one character|
|C-f||Ctrl + f||Forward one character|
|M-f||Alt + f||Forward one word|
|M-b||Alt + b||Backward one word|
|C-a||Ctrl + a||Go to the beginning of the line|
|C-e||Ctrl + e||Go to the end of the line|
|M-<||Alt + <||Go to the beginning of the file|
|M->||Alt + >||Go to the end of the file|
Emacs - Deleting Text
|C-d||Ctrl + d||Delete a character|
|M-d||Alt + d||Delete a word|
Emacs - Copying, Pasting, and Undo
|C-k||Ctrl + k||Kill (cut)|
|C-y||Ctrl + y||Yank (paste)|
|C-x u||Ctrl + x followed by u||Undo|
Emacs - Searching
|C-s||Ctrl + s||Start a forward search|
|C-r||Ctrl + r||Start a reverse search|
Emacs - Repeating Commands
Like vi Emacs provides a way to repeat Commands.
|C-u N <command>||Ctrl + u followed by N <command>||Repeat <command> N times.|
For example, to kill three lines of text, enter Ctrl + u followed by 3 followed by Ctrl + k.
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync