Turn off wrapping for a single buffer using ‘M-x toggle-truncate-lines’
.
This is a BufferLocalVariable. You can also use the following in your InitFile, although we don’t recommend it. (set-default 'truncate-lines t)
remove newlines
(defun remove-newlines-in-region ()
"Removes all newlines in the region."
(interactive)
(save-restriction
(narrow-to-region (point) (mark))
(goto-char (point-min))
(while (search-forward "\n" nil t) (replace-match "" nil t))))
(global-set-key [f7] 'remove-newlines-in-region)
(defun unwrap-line ()
"Remove all newlines until we get to two consecutive ones.
Or until we reach the end of the buffer.
Great for unwrapping quotes before sending them on IRC."
(interactive)
(let ((start (point))
(end (copy-marker (or (search-forward "\n\n" nil t)
(point-max))))
(fill-column (point-max)))
(fill-region start end)
(goto-char end)
(newline)
(goto-char start)))
(global-set-key (kbd "M-q") 'unwrap-line)
pabbrev’s main entry point is through the minor mode pabbrev-mode
.
There is also a global minor mode, called `global-pabbrev-mode’, which
does the same in all appropriate buffers.
global-pabbrev-mode
The current user interface looks like so…
p[oint]
pr[ogn]
pre[-command-hook]
pred[ictive]
As the user types the system narrows down the possibilities. The
narrowing is based on how many times the words have been used
previously. By hitting [tab] at any point the user can complete the
word. The [tab] key is normally bound to indent-line
.
pabbrev-mode
preserves access to this command (or whatever else
[tab] was bound to), if there is no current expansion.
tab bound to C-i
components components
http://stackoverflow.com/questions/8095715/emacs-auto-complete-mode-at-startup
(global-auto-complete-mode t)
C-x r m
— set a bookmark at the current location (e.g. in a file)C-x r b
— jump to a bookmarkC-x r l
— list your bookmarksM-x bookmark-delete
— delete a bookmark by name(when (>= emacs-major-version 24)
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/")
t)
(package-initialize))