Skip to content

ValentijnvdBeek/bm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MELPA

Visible bookmarks in buffer for GNU Emacs 22.x / 23.x / 24.x (XEmacs 21.x).

This package provides visible, buffer local, bookmarks and the ability to jump forward and backward to the next bookmark.

It was created because I missed the bookmarks from M$ Visual Studio in GNU Emacs. I think they provide an easy way to navigate in a buffer.

Features:

  • Auto remove bookmark after jump to it by bm-next or bm-previous:
  • Cycle through bookmarks in all open buffers in LIFO order
  • Toggle bookmarks. Jump to next/previous bookmark.
  • Setting bookmarks based on a regexp. (Useful when searching logfiles.)
  • Mouse navigation.
  • Annotate bookmarks.
  • Different wrapping modes.
  • Different bookmarks styles, line-only, fringe-only or both.
  • Persistent bookmarks (buffer local), also in non-file buffers (info) and indirect buffers.
  • List bookmarks (in all buffers) in a separate buffer.
  • Cycle through bookmarks in all open buffers.

Installation:

To use bm.el, put it in your load-path and add the following to your .emacs

(require 'bm)

or

(autoload 'bm-toggle   "bm" "Toggle bookmark in current buffer." t)
(autoload 'bm-next     "bm" "Goto bookmark."                     t)
(autoload 'bm-previous "bm" "Goto previous bookmark."            t)

Configuration:

To make it easier to use, assign the commands to some keys.

M$ Visual Studio key setup.

(global-set-key (kbd "<C-f2>") 'bm-toggle)
(global-set-key (kbd "<f2>")   'bm-next)
(global-set-key (kbd "<S-f2>") 'bm-previous)

Click on fringe to toggle bookmarks, and use mouse wheel to move between them.

(global-set-key (kbd "<left-fringe> <mouse-5>") 'bm-next-mouse)
(global-set-key (kbd "<left-fringe> <mouse-4>") 'bm-previous-mouse)
(global-set-key (kbd "<left-fringe> <mouse-1>") 'bm-toggle-mouse)

If you would like the markers on the right fringe instead of the left, add the following line:

(setq bm-marker 'bm-marker-right)

If you would like to cycle bookmark in LIFO order, add the following line:

(setq bm-in-lifo-order t)

If you would like to cycle through bookmarks in all open buffers, add the following line:

(setq bm-cycle-all-buffers t)

If you would like to remove bookmark after jump to it by bm-next or bm-previous:

(setq temporary-bookmark-p t)

or if you want use this feature in your library:

(bm-bookmark-add nil nil t)

Reviews and comments:

About

bm.el -- Visual Bookmarks for GNU Emacs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 100.0%