Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zonuexe/right-click-context

Emacs Right Click Context menu
https://github.com/zonuexe/right-click-context

Last synced: 15 days ago
JSON representation

Emacs Right Click Context menu

Awesome Lists containing this project

README

        

* 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.
#+BEGIN_HTML
MELPA: right-click-context
MELPA stable: right-click-context
#+END_HTML
** Demo

[[file:demo.gif]]

** Install

*** Cask

#+BEGIN_SRC emacs-lisp
(depends-on "right-click-context" :git "[email protected]:zonuexe/right-click-context.git")
#+END_SRC

** Setup

*** Easy way (use minor-mode)

#+BEGIN_SRC emacs-lisp
(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)
#+END_SRC

*** Use keymap

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

#+BEGIN_SRC emacs-lisp
(global-set-key (kbd "") 'right-click-context-menu)

(bind-key "C-c " 'right-click-context-menu)
(bind-key "C-c :" 'right-click-context-menu)
#+END_SRC

*** Hide lighter

You will feel mode line is that it is complicated.

#+BEGIN_SRC emacs-lisp
;; Use emoji
(setq right-click-context-mode-lighter "🐭")

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

** Customize Menu
*** DSL
#+BEGIN_SRC emacs-lisp
(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))
#+END_SRC

* Region Convert (=region-convert.el=)
That repository has moved to [[https://github.com/zonuexe/region-convert.el][zonuexe/region-convert.el]].