Profile

Cover photo
1,911 followers|1,771,392 views
AboutPostsPhotosVideos

Stream

ErgoEmacs

Shared publicly  - 
 
simple Emacs Lisp Examples, each command is useful, and less than 10 lines
http://ergoemacs.org/emacs/elisp_examples.html
This page shows very simple and useful emacs lisp functions. They show you the basic programing in elisp. To see a function's documentation, call describe-function 【 Ctrl + h f 】. To see a variable's documentation and value, call describe-variable 【 Ctrl + h v 】.
3
Add a comment...

ErgoEmacs

Shared publicly  - 
 
#Emacs simple code to Select Line, between Quotes, Extend Selection.
http://ergoemacs.org/emacs/modernization_mark-word.html
This page shows many useful emacs commands for text selection. Select Text in Quote. Select text inside quotes is one of the most frequently needed operation in programing languages code. (defun xah-select-text-in-quote () "Select text between the nearest left and right delimiters.
1
Add a comment...

ErgoEmacs

Shared publicly  - 
 
#emacs M-x text-scale-adjust, then press + or - or 0. And other font tips
http://ergoemacs.org/emacs/emacs_list_and_set_font.html
How to change font size? Call text-scale-adjust . Call it, then press 【 + 】 to increase, 【 - 】 to decrease, 【 0 】 to set it back to default size. Or, call text-scale-increase . (text-scale-increase 2) ; 2 steps larger (text-scale-normal-size) ; default size (text-scale-decrease 2) ...
2
Add a comment...

ErgoEmacs

Shared publicly  - 
Emacs: Set Font by Major Mode and Quickly Switch Fonts? By Xah Lee. Date: 2010-04-10 . Last updated: 2015-12-17 . This page shows you how to switch between fixed-width font (monospaced font) and variable-width font. Also commands to cycle among fonts.
3
Add a comment...

ErgoEmacs

Shared publicly  - 
 
Often, #Emacs keyboard macro takes 3 minutes, writing elisp to do same
task takes 30 minutes. Here's an example.
http://ergoemacs.org/emacs/emacs_key_macro_example_add_url_title.html
Here's a example of keyboard macro use. I use macro about few times a month. When you need it, it is extremely convenient. Today, i have about 60 lines, each line is a URL, like this: http://xahlee.info/3d/3D_inputs.html. I need it to be like this: * Mathematical Models of 3D Inputs Control ...
1
Add a comment...

ErgoEmacs

Shared publicly  - 
This page is a basic tutorial for vi or vim. vi is one of unix's fsckup. Sometimes in a emergency situation you are forced to deal with vi, and fscking unix admins refuse to install emacs. Here's your help. vi man. To open a file named “myfile.txt”, type in the shell prompt: vi myfile.txt ...
4
Ruslan Berebnev's profile photo
 
I used vim before I learned about emacs.
Add a comment...
In their circles
1,329 people
Have them in circles
1,911 people
Glenn Ryan's profile photo
Jian Jiang's profile photo
Bob Forgey's profile photo
Daniel Moore's profile photo
Greg Copeland's profile photo
缥缈风's profile photo
Karl Kedrovsky's profile photo
赵明洋's profile photo
Robert Boone's profile photo

ErgoEmacs

Shared publicly  - 
 
Emacs: Edit Column Text, Rectangle Commands
http://ergoemacs.org/emacs/emacs_string-rectangle_ascii-art.html
try change this 3c21 646f 6374 6874 6d6c 3e3c 2063 6861 7273 202f 3e0a 3c6d 6965 7770 6f72 2277 6964 7468 to this 3c21 cat 6374 6874 cat 3e3c 2063 cat 7273 202f cat 3c6d 6965 cat 6f72 2277 cat 7468. Put your cursor before “646f”. Call set-mark-command 【 Ctrl + Space 】.
2
Add a comment...

ErgoEmacs

Shared publicly  - 
How to filter elements from a list? You can use the cl-remove-if or cl-remove-if-not in CL library, like this: (require 'cl-lib) (cl-remove-if-not 'numberp '(1 "a" 2)) ;; (1 2). Note: emacs 24.x renamed remove-if to cl-remove-if. If you want to avoid the controversial CL lib, you can write your ...
1
Add a comment...

ErgoEmacs

Shared publicly  - 
This page shows you how to use a elisp function in your regex replacement. For example, replace “_” to space in matched pattern. In the replace string prompt, give \,( function_name ) , where function_name is your elisp function. The function's return value will be used as the replacement string ...
1
Add a comment...

ErgoEmacs

Shared publicly  - 
 
#Emacs using isearch to jump cursor, and set it to next/prev by Arrow Keys. This is major efficiency improvement
http://ergoemacs.org/emacs/emacs_isearch_by_arrow_keys.html
Here's very convenient keys for isearch. Put it in your emacs init. (progn ;; set arrow keys in isearch. left/right is backward/forward, up/down is history. press Return to exit (define-key isearch-mode-map (kbd "") 'isearch-ring-retreat ) (define-key isearch-mode-map (kbd "") ...
1
George Jones's profile photoErgoEmacs's profile photo
2 comments
 
😁 😂 😀 
Add a comment...

ErgoEmacs

Shared publicly  - 
This page shows you how to use emacs keyboard macro feature. geek vs non geek repetitive tasks (original bitmap drawing by Bruno Oliveira. Used with permission). Emacs keyboard macro (kmacro) feature lets you record and playback keystrokes. The key strokes can include calling any emacs commands.
9
Add a comment...

ErgoEmacs

Shared publicly  - 
 
Emacs Lisp: Run Elisp Code When File Opens
http://ergoemacs.org/emacs/elisp_run_elisp_when_file_opens.html
You can set a file to automatically eval elisp code when the file opens. Here's a example. When opening a file, some words or lines are automatically colored. add this to the end of file: /* Local Variables: */ /* eval: (highlight-phrase "\\bJane\\b" (quote hi-pink)) */ /* eval: ...
1
Add a comment...
People
In their circles
1,329 people
Have them in circles
1,911 people
Glenn Ryan's profile photo
Jian Jiang's profile photo
Bob Forgey's profile photo
Daniel Moore's profile photo
Greg Copeland's profile photo
缥缈风's profile photo
Karl Kedrovsky's profile photo
赵明洋's profile photo
Robert Boone's profile photo
Contact Information
Contact info
Email
Story
Tagline
Emacs tips & tricks + ErgoEmacs news.
Introduction
One or two emacs tips per day.

• Tips in using emacs
• Tips in coding emacs lisp.
• Occasional news/tips about ErgoEmacs.

Spread emacs. Join us.