M-x all-things-emacs

Entries Tagged as 'quick'

Newbie Tip: isearch Word Yank

March 26th, 2007 by Ryan McGeary · 3 Comments

Our newbie tips are our way of expressing emacs features we might otherwise take for granted. We hope they help beginners climb the learning curve faster. This particular tip is one that I wish I knew far sooner when I first started using emacs.

Incremental searching with isearch-forward and isearch-backward (C-s and C-r) is [...]

[Read more →]

Tags:isearch · newbie · quick · tips

Quick Tip: set-goal-column

March 17th, 2007 by Ryan McGeary · 6 Comments

On the surface, it might not sound like editing columns of text is something that happens a lot, but I find myself doing it fairly often. A quick way to enter different values on each line down a column is to use set-goal-column (bound to C-x C-n).

Let’s say we have a block of text [...]

[Read more →]

Tags:quick · tips

Quick Tip: re-builder

March 15th, 2007 by Rob Christie · 5 Comments

Have you ever wanted to test out regular expressions in emacs? Until I found out about re-builder I used to run M-x isearch-forward-regexp (also bound to C-M-s) in a buffer until I figured out the expression I needed. This works but just having M-x re-builder in your bag of tricks helps. In the words of [...]

[Read more →]

Tags:quick · tips

Quick Tip: scroll-all-mode

March 8th, 2007 by Ryan McGeary · No Comments

I don’t use this minor mode very often, but in rare cases, I find it valuable. When you have your frame split with multiple windows, sometimes it’s nice to scroll all the windows in unison. Try running M-x scroll-all-mode. Afterwards, scrolling commands entered in one window apply to all visibile windows. [...]

[Read more →]

Tags:quick · tips

Quick Tip: Highlighting Java .properties Files

March 1st, 2007 by Rob Christie · 1 Comment

Java .properties files are normally formatted using conf-javaprop-mode. Recently, I was frustrated because a single quote in a property was highlighted such that multiple lines were colored like a string until there was another quote on another line. I decided I was going to fix it… It turns out that I didn’t have to look [...]

[Read more →]

Tags:java · quick · tips

Quick Tip: Add occur to isearch

February 27th, 2007 by Ryan McGeary · 9 Comments

Zenspider gives us an excellent tip for extending incremental search. Add this to your emacs initialization:

1
2
3
4
5
6
(define-key isearch-mode-map (kbd "C-o") (lambda () (interactive) (let ((case-fold-search isearch-case-fold-search)) (occur (if isearch-regexp isearch-string [...]

[Read more →]

Tags:elisp · isearch · quick · tips

Quick Tip: Reuse Dired Buffers

February 25th, 2007 by Ryan McGeary · 1 Comment

By default, dired creates new buffers when visiting new directories. Sometimes this is desired, especially when you need to visualize the contents of two separate directories; however, when you’re just navigating around, all the extra buffers tend to clutter your buffer list.

Typical navigation is done with dired-find-file (bound to f, RET, or [...]

[Read more →]

Tags:dired · quick · tips

Newbie Tip: transient-mark-mode

February 20th, 2007 by Ryan McGeary · 5 Comments

Setting a mark (C-SPC) is probably the most frequent command I use besides basic navigation. The mark not only acts as a saved jump-to point, but it also sets the region. A region is what other editors might call a selection. By default, emacs does not highlight the active region, so it [...]

[Read more →]

Tags:newbie · quick · tips

Quick Tip: Defining Mode Specific Key Bindings

February 10th, 2007 by Rob Christie · 3 Comments

Many times I use global key mappings for commands that I use every day. For example, I build java projects daily using ant, so I have the following in my .emacs:

(global-set-key [f5] ‘jde-build)

Less frequently, I use the C-c C-v C-. which is the default key binding for the command jde-complete. Both commands are in [...]

[Read more →]

Tags:elisp · java · quick · ruby · tips

Quick Tip: dired-recursive-deletes

February 8th, 2007 by Ryan McGeary · 3 Comments

By default, dired only deletes empty directories. You know the drill. Put your point on the directory, D, y (yes), “file-error Removing directory directory not empty,” (slam fist on table). Doh!

Fortunately, dired supports deleting directories recursively. Add this to your .emacs:

(setq dired-recursive-deletes ‘top)

The dired-recursive-deletes variable decides whether recursive deletes are allowed. [...]

[Read more →]

Tags:dired · quick · tips