“M” means ALT key. “C” means CTRL key.
For example, “M-x” means pressing ALT and X key together in Emacs.
Download https://github.com/redguardtoo/hello.git and extracted somewhere, say “~/hello/”. It contains sample code files written in different programming languages.
By default, I use vim key bindings. You can “C-z” to toggle into Emacs key bindings.
Error message is always dumped into “\*Messages\*” buffer. You can “C-x C-b” to select buffer named “\*Messages\*” in order to get the error message.
BTW, README at https://github.com/redguardtoo/emacs.d has all the technical information you need.
In bash shell, run comand,
emacs --version
In bash shell, run command,
emacs -nw --debug-init
Please “M-x toggle debug-on-error” after startup.
If there is any error please attached debug information in “\*Messages\*” buffer to your email.
Please back up and remove original ~/.emacs.d.
Download zip or git clone from https://github.com/redguardtoo/emacs.d
Use this as emacs setup.
- Start Emacs, “M-x list-packages”, ignore any error in this step
- restart Emacs, all packages should be downloaded and installed without any problem.
Open ~/hello/hello.org by “C-x C-f”.
For most languages, you need Ctags.
`ctags -e -R` in the shell.
Then `M-x find-tag` in Emacs
`M-x grep`
`M-x helm-imenu`
`M-x goto-last-change` and `M-x goto-last-change-reverse`
`M-x undo-tree-visualize`
Select a region, you can `M-x exchange-point-and-mark` to double check the actual column to insert.
Then `M-x rectangle-number-lines`. `C-u M-x rectangle-number-lines` give you more choices.
Open ~/hello/hello.c
insert single character “i” and press “M-j”, the text should be expanded by yasnippet.
Open ~/hello/hello.lua
Make sure CMake installed and the executable “cmake” exists in environment variable PATH.
Finish One Minute tutorial.
Open ~/hello/hello.js
Insert single character “l” and press “M-j”, the text should be expanded by yasnippet.
Please input some javascript with syntax error intentionally, the error will be highlighted immediately.
Place the cursor inside any function, input “lwf” and press “M-j”, text will be expanded by yasnippet.
“M-x helm-imenu” to display the function list in current buffer. AngularJS code preferred.
Open ~/hello/hello.html
Install “tidy” (check README), then intentionally input some invalid html tag, you should see the tag is highlighted
Install “aspell” and its English dictionary “aspell-en”, input some typo in html tag’s “value” attribute. The typo will be highlighted automatically.
Open an empty HTML file, input “html5” then “M-j”. Input “script” then “M-j”.
Open ~/hello/hello.rb. It shoud be fine to edit the code.
Open ~/hello/hello.py
Input “os.”, you will see the auto-completion of methods in two second. Python 2.x required.
Open ~/hello/hello.pl
Feel free to test any command at any environment. If I may suggest you can start from the commands which is assigned hotkey by “evil-leader/set-key”. These commands are my frequently used commands.
The only exception is tex related stuff. I don’t have tex environment for now.
Email me,
- the environment information (Emacs version, OS details)
- any bug report
- any general issues not covered by this document