![]() There is no problem if you mix local and global minor mode usage. WhiteSpace was tested with GNU Emacs 22 and 23. This will generate whitespace.elc, which will be loaded instead of Lisp : whitespace.el. show-whitespace-mode.el – Aurélien Tisné Simple mode to highlight whitespaces (inspired the idea to use font-lock) whitespace-mode.el – LawrenceMitchell Major mode for editing Whitespace (inspired the idea to use display table) visws.el – MilesBader Make whitespace visible (handle display table, his code was modified, but the main idea was kept)įor good performance, be sure to byte-compile WhiteSpace, e.g. And later blank-mode.el was renamed to whitespace.el. WhiteSpace was inspired by: whitespace.el – Rajesh Vaidheeswarran Warn about and clean bogus whitespaces in the file (inspired the idea to warn and clean some blanks) This was the original whitespace.el which was replaced by blank-mode.el ( BlankMode). (autoload 'whitespace-toggle-options "whitespace" "Toggle local ` whitespace-mode' options." t) For example: (autoload 'whitespace-mode "whitespace" "Toggle whitespace visualization." t) Or autoload at least one of the commands ‘whitespace-mode’, ‘whitespace-toggle-options’, ‘global-whitespace-mode’ or ‘global-whitespace-toggle-options’. To use WhiteSpace, insert in your ~/.emacs: ( require ' whitespace) if global WhiteSpace is turned off, WhiteSpace continues on only in the buffers in which local WhiteSpace is on.if local WhiteSpace is turned off, WhiteSpace is turned off for the current buffer only.WhiteSpace is active in a buffer if you have enabled it in that buffer or if you have enabled it globally. But local WhiteSpace has priority over global WhiteSpace. You can mix the local and global usage without any conflict. The ‘whitespace-global-modes’ variable controls which major-mode will be automagically turned on. That is, if you turn on global WhiteSpace and then create a new buffer, the new buffer will also have WhiteSpace on. Global WhiteSpace affects all current and future buffers.Local WhiteSpace affects only the current buffer.There are two ways of using WhiteSpace: local and global. Also the spaces at beginning of buffer are not highlighted while point is at beginning of buffer and the spaces at end of buffer are not highlighted while point is at end of buffer. The trailing spaces are not highlighted while point is at end of line. When WhiteSpace is on, it takes care of highlighting some special characters over the default mechanism of ‘nobreak-char-display’ (which see) and ‘show-trailing-whitespace’ (which see). Thus, turn on font-lock before WhiteSpace is on, if you want that font-lock continues on after WhiteSpace is turned off. So, if WhiteSpace is turned on and font-lock is off, WhiteSpace also turns on the font-lock to highlight blanks, but the font-lock will be turned off when WhiteSpace is turned off. And WhiteSpace restores the font-lock state when it is turned off. ![]() Note that when WhiteSpace is turned on, WhiteSpace saves the font-lock state, that is, if font-lock is on or off. The ‘whitespace-style’ variable selects which way blanks are visualized. Display table changes the way a character is displayed, that is, it provides a visual mark for characters, for example, at the end of line ( ?\xB6), at SPACEs ( ?\xB7) and at TABs ( ?\xBB).WhiteSpace uses font-lock to highlight blank characters, see FontLockMode. Faces are used to highlight the background with a color.WhiteSpace uses two ways to visualize blanks: Faces and display table. This package is a minor mode to visualize blanks (TAB, (HARD) SPACE and NEWLINE). The screenshots below show when WhiteSpace is turned on using the default setting. Note 1: The source here in EmacsWiki was modified to run on Emacs 21, 22, 23 and 24. This page describes package Lisp : whitespace.el, by ViniciusJoseLatorre.:: v13.2.2 :: part of GNU Emacs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |