Skip to content

zonuexe/right-click-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emacs Right Click Context menu

A customizable context menu, call it from right-click of mouse. You can also use the context menu from keyboard.

MELPA: right-click-context MELPA stable: right-click-context

Demo

demo.gif

Install

Cask

(depends-on "right-click-context" :git "git@github.com:zonuexe/right-click-context.git")

Setup

Easy way (use minor-mode)

(right-click-context-mode 1)

;; If want to use context menu by keyboard
;(define-key right-click-context-mode-map (kbd "C-c :") 'right-click-context-menu)

Use keymap

If you do not need the minor-mode, you can add a command to global keymap.

(global-set-key (kbd "<mouse-3>") 'right-click-context-menu)

(bind-key "C-c <mouse-3>" 'right-click-context-menu)
(bind-key "C-c :" 'right-click-context-menu)

Hide lighter

You will feel mode line is that it is complicated.

;; Use emoji
(setq right-click-context-mode-lighter "🐭")

;; hidden
(setq right-click-context-mode-lighter "")

Customize Menu

DSL

(require 'datetime-format nil t)
(let ((right-click-context-local-menu-tree
       (append right-click-context-global-menu-tree
               '(("Insert"
                  ("FooBar" :call (insert "FooBar"))
                  ("Current Time" :call (insert (datetime-format 'atom)) :if (fboundp 'datetime-format)))))))
  (right-click-context-menu))

Region Convert (region-convert.el)

That repository has moved to zonuexe/region-convert.el.