Difference between revisions of "Skeleton"

From WikEmacs
Jump to navigation Jump to search
m (cat)
(native -> built-in)
Line 32: Line 32:
  
 
[[Category:Minor Mode]]
 
[[Category:Minor Mode]]
[[Category:Native Package]]
+
[[Category:Built-in Package]]
 
[[Category:Editing]]
 
[[Category:Editing]]
 
[[Category:Template System]]
 
[[Category:Template System]]

Revision as of 15:29, 5 April 2012

Skeleton
Description Insert the complex statement skeleton SKELETON describes very concisely.
Author name of author
Maintainer FSF
Source http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/skeleton.el
Part of Emacs yes

Skeleton library can be used to create documents based on templates.

Keep some chars always balanced

Use the below setting to insert paired characters with just a single keystroke.

For example, typing '(' will automatically insert '()' in to the buffer. Similarly typing '{' will automatically insert '{}'. This way parenthesis, quotes etc will always remain balanced. This setting is quite useful if you are editing Emacs Lisp, C etc.

(require 'skeleton)
(setq skeleton-pair t)
(global-set-key "\"" 'skeleton-pair-insert-maybe)
(global-set-key "(" 'skeleton-pair-insert-maybe)
(global-set-key "[" 'skeleton-pair-insert-maybe)
(global-set-key "{" 'skeleton-pair-insert-maybe)