5

I've been using emacs for years, but I noticed a habit of mine that slows down my workflow. I do a lot of "backtracking" with "forward"-moving commands.

For example, when I use M-f to several times to jump forward a word, but it jumps me to the end of the words, so often when I reach the word I'm trying to get to press M-b to go back to the beginning of the word.

Similar thing happens when I search with C-s to search, when I find the pattern, the cursor is at the end of the matched pattern and I need to press M-b again to go back to the beginning.

Given how frequently I do these sorts of actions, this adds up to a slower workflow. In some cases, using reverse-oriented commands like backward-kill can help, but this requires memorizing more commands and isn't applicable in all cases (for example, if I want to start typing at the beginning of the word).

Is there a better approach to navigation in emacs that avoids these redundant actions?

daj
  • 6,962
  • 9
  • 45
  • 79
  • 2
    For the specific cases you've listed, there is [this](http://stackoverflow.com/questions/1771102/changing-emacs-forward-word-behaviour/1772365) and [this](http://stackoverflow.com/questions/11691313/move-to-start-and-end-of-search-lookup-in-emacs/11692152) – scottfrazer Aug 04 '12 at 10:44
  • @scottfrazer is on point with his links. You should ask one question per post to make it easier to select a "correct" answer. This will also keep SO organized and useful for everyone. – event_jr Aug 04 '12 at 14:41
  • point taken, I figured there was a unifying principle about emacs navigation I must be missing though, but perhaps not. – daj Aug 05 '12 at 04:55

2 Answers2

4

Recently I use Ace Jump mode

"What's ace-jump-mode?

ace-jump-mode is an fast/direct cursor location minor mode. It will create the N-Branch search tree internal and marks all the possible position with predefined keys in current view. Allowing you to move to the character/word/line almost directly." --emacswiki

there is a video http://emacsrocks.com/e10.html

Shihpin
  • 56
  • 1
  • 3
0

I use for navigation in the middle of the words C-u N C-f or C-u N C-b, where N is the number of chars I want to jump.

alinsoar
  • 15,386
  • 4
  • 57
  • 74