- Spacemacs inspired Emacs configuration file.
Packages
Package installation done with use-package.
; using "use-package" to install and configure our packages
(require 'package)
; to not load any packages before starting up
(setq package-enable-at-startup nil)
; define the repositories
(setq package-archives '(
("org" . "https://orgmode.org/elpa/")
("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
;("marmalade" . "https://marmalade-repo.org/packages/")
)
)
(package-initialize)
; bootstrap "use-package"
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package)
)
(require 'use-package)
; Non-Melpa Packages
(add-to-list 'load-path "/usr/share/emacs/site-lisp/emms")General
More convenient method for binding keys in Emacs.
(use-package general
:ensure t
)General Settings
General Emacs configuration settings.
General
; First we load our libraries
(org-babel-load-file "~/.emacs.d/myLisp.org")
(load "~/.emacs.d/myLibraries/help-fns+.el")
; general tweaks
(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(tooltip-mode -1)
(menu-bar-mode -1)
; highlight current line, pick color and keep syntax highlighting
(global-hl-line-mode 1)
; setting the color does not work with the doom theme
;(set-face-background 'hl-line "#ffffff")
(set-face-foreground 'highlight nil)
; set the font
(set-frame-font "Input Mono-10.5" nil t)
; silent error bell
(setq ring-bell-funtion 'ignore)
; show matching parens
;(setq show-paren-delay 0)
;(show-paren-mode 1)
; enable "winner-mode" to be able to undo and redo window configurations
(winner-mode 1)
; to outomatically kill the region when inserting a key
(delete-selection-mode 1)
; set the theme
(use-package doom-themes
:ensure t
:config
(load-theme 'doom-vibrant t)
)
; save all the backup files in a specific folder instead of in the current one
(setq backup-directory-alist '(("." . "~/.emacsBackups")))
(setq backup-by-copying t
; delete excess backup versions
delete-old-versions t
; number of newest version to keep when a new numbered backup is made
kept-new-versions 6
; number of oldest versions to keep when a new numbered backup is made
kept-old-versions 2
; make numeric backup versions
version-control t
)Line numbers
; Line numbers
; doesn't work
(add-hook 'org-mode-hook
(lambda () (setq-local display-line-numbers 'visual)))
(add-hook 'lisp-interaction-mode-hook
(lambda () (setq-local display-line-numbers 'visual)))Key Bindings
(general-define-key
(general-chord "jk") (lambda ()
(interactive)
(call-interactively (key-binding (kbd "C-g"))))
)Ergo Mode
Ergo Text
(add-hook 'my/ergo-text-mode-hook
(lambda ()
(if (bound-and-true-p my/ergo-text-mode)
(progn (setq-local cursor-type 'bar)
(if (bound-and-true-p my/ergo-motion-mode)
(my/ergo-motion-mode -1)
)
)
(setq-local cursor-type 't)
)
))Ergo Motion
(add-hook 'my/ergo-motion-mode-hook
(lambda ()
(if (bound-and-true-p my/ergo-motion-mode)
(if (bound-and-true-p my/ergo-text-mode)
(my/ergo-text-mode -1)
)
)
))Key Bindings
SPC Keys
(general-create-definer gen-SPC-def
"a" '(my/alternate-buffer :which-key "Alternate Buffer")
"SPC" '(:ignore t :which-key "Local Keys")
"E" 'my/ergo-motion-mode
; Windows
"w" '(:ignore t :which-key "Windows")
"ws" '(my/split-window-right-and-focus :which-key "Split Right")
"wS" '(my/split-window-below-and-focus :which-key "Split Below")
"wj" '(windmove-left :which-key "Focus Left")
"wk" '(windmove-down :which-key "Focus Down")
"wl" '(windmove-up :which-key "Focus Up")
"w;" '(windmove-right :which-key "Focus Right")
;"wH" '(evil-window-move-far-left :which-key "Move Left")
;"wJ" '(evil-window-move-very-bottom :which-key "Move Down")
;"wK" '(e-window-move-very-top :which-key "Move Up")
;"wL" '(evil-window-move-far-right :which-key "Move Right")
"wd" '(delete-window :which-key "Delete Window")
"wD" '(ace-delete-window :which-key "Delete Other Window")
"wf" '(follow-mode :which-key "Follow Mode")
"wF" '(make-frame :which-key "Make New Frame")
"wo" '(other-frame :which-key "Focus Other Frame")
"wu" '(winner-undo :which-key "Undo Window Layout")
"wU" '(winner-redo :which-key "Redo Window Layout")
"ww" '(ace-window :which-key "Focus Other Window")
"w TAB" '(my/alternate-window :which-key "Alternate Window")
"w=" '(balance-windows :which-key "Balance Windows")
"wm" '(maximize-window :which-key "Maximize Window")
"wr" '(hydra-window-resize/body :which-key "Resize Hydra")
; Buffers
"b" '(:ignore t :which-key "Buffers")
"bb" '(ivy-switch-buffer :which-key "Switch Buffer")
"bd" '(kill-this-buffer :which-key "Delete Buffer")
"bD" '(my/delete-buffer-and-window :which-key "Delete Buffer and Window")
"bj" '(evil-next-buffer :which-key "Next Buffer")
"bk" '(evil-prev-buffer :which-key "Previous Buffer")
"br" '(revert-buffer :which-key "Revert Buffer from File")
"bR" '(read-only-mode :which-key "Toggle Read-Only Mode")
"bB" '(hydra-buffers/body :which-key "Buffers Hydra")
; Files
"f" '(:ignore t :which-key "Files")
"ff" '(counsel-find-file :which-key "Find File")
"fb" '(counsel-bookmark :which-key "File Bookmarks")
"fc" '(copy-file :which-key "Copy File")
"fD" '(my/delete-file-and-buffer :which-key "Delete File")
"fE" '(my/sudo-edit :which-key "Find File (sudo)")
"fL" '(counsel-locate :which-key "Locate File")
"fR" '(my/rename-current-buffer-file :which-key "Rename File")
"fs" '(save-buffer :which-key "Save File")
;"fS" '(evil-write-all :which-key "Save All Files")
"fr" '(counsel-recentf :which-key "Find Recent File")
"fe" '(:ignore t :which-key "Emacs Files")
"fei" '(my/find-user-init-file :which-key "Init")
"fec" '(my/find-user-config-file :which-key "Config")
"fel" '(my/find-user-lisp-file :which-key "My Lisp")
"feg" '(my/find-gtd-file :which-key "GTD")
"fep" '(my/find-gtd-periodically-file :which-key "Periodically")
; Help
"h" '(:ignore t :which-key "Help")
"hi" '(info :which-key "Info")
"hw" '(which-key-show-top-level :which-key "Which-key's top level bindings")
"hg" '(general-describe-keybindings :which-key "General Keybindings")
"hn" '(view-emacs-news :which-key "Emacs News")
; Describe
"hd" '(:ignore t :which-key "Describe")
"hdb" '(counsel-descbinds :which-key "Bindings")
"hdf" '(describe-function :which-key "Function")
"hdk" '(describe-key :which-key "Key")
"hdK" '(describe-keymap :which-key "Keymap")
"hdm" '(describe-mode :which-key "Mode")
"hdp" '(describe-package :which-key "Package")
"hdv" '(describe-variable :which-key "Variable")
; Apropos
"ha" '(:ignore t :which-key "Apropos")
"hac" '(apropos-command :which-key "Command")
"had" '(apropos-documentation :which-key "Documentation")
"hav" '(apropos-value :which-key "Value")
; Find "hf" '(:ignore t :which-key "Find")
"hff" '(find-function :which-key "Function")
"hfv" '(find-variable :which-key "Variable")
"hfl" '(find-library :which-key "Library")
; Jumping
"j" '(avy-goto-char-timer :which-key "Jump")
; Exit
"e" '(:ignore t :which-key "Exit")
"ee" '(my/prompt-kill-emacs :which-key "Exit Asking")
"eE" '(kill-emacs :which-key "Force Exit")
"er" '(restart-emacs :which-key "Restart Emacs (Restore Frames)")
; Region
"r" '(:ignore t :which-key "Region")
"rc" '(downcase-region :which-key "DownCase")
"rC" '(upcase-region :which-key "UpCase")
"ri" '(indent-region :which-key "Indent")
; Misc
"m" '(:ignore t :which-key "Misc")
"mr" '(ivy-resume :which-key "Resume Ivy")
; Insert
"i" '(:ignore t :which-key "Insert")
"ik" '(my/insert-line-below :which-key "Line Below")
"il" '(my/insert-line-above :which-key "Line Above")
; Org
"o" '(:ignore t :which-key "Org")
"oa" '(org-agenda :which-key "Agenda")
"oc" '(org-capture :which-key "Capture")
; EMMS
"s" '(emms-playlist-mode-go :which-key "EMMS")
; Packages
"p" '(:ignore t :which-key "Packages")
"pE" '(emms-smart-browse :which-key "EMMS")
"pe" '(emms-browse-by-artist :which-key "EMMS Browser")
"pd" '(dired :which-key "Dired")
)Ergo Motion
(general-define-key
:keymaps 'my/ergo-motion-mode-map
; RIGHT HAND
"y" 'kill-ring-save
(general-chord "yy") 'my/save-line
"u" 'backward-word
"i" 'forward-word
"o" (lambda () (interactive) (set-mark-command 4))
"M-o" 'my/unpop-to-mark-command
"pp" '((lambda () (interactive) (recenter))
:which-key "Recenter"
)
"pl" '((lambda () (interactive) (recenter 2))
:which-key "Recenter Top"
)
"pk" '((lambda () (interactive) (recenter -2))
:which-key "Recenter Bottom"
)
"h" 'my/mark-command
(general-chord "hh") 'my/mark-line
"M-h" 'er/expand-region
"C-h" 'rectangle-mark-mode
"gh" '(:ignore t :which-key "Mark")
"ghb" '((lambda ()
(interactive)
(goto-char (point-min))
(push-mark nil nil t)
(goto-char (point-max)))
:which-key "Mark Buffer")
"ghp" '(mark-paragraph :which-key "Mark Paragraph")
"j" 'left-char
"M-j" 'move-beginning-of-line
"k" 'next-line
"M-k" (lambda () (interactive) (next-line 30))
"gk" '(end-of-buffer :which-key "End of Buffer")
"l" 'previous-line
"M-l" (lambda () (interactive) (previous-line 30))
"gl" '(beginning-of-buffer :which-key "Beginning of Buffer")
";" 'right-char
"M-;" 'move-end-of-line
;"n" 'isearch-forward
;"M-n" 'isearch-backward
"n" 'phi-search
"M-n" 'phi-search-backward
"gn" '(swiper :which-key "Swiper")
;"m" repeat iserch forward
;"M-m" repeat isearch backward
; LEFT HAND
"t" (lambda () (interactive) (my/kill-command "t"))
"r" (lambda () (interactive) (my/kill-command "r") (my/ergo-text-mode))
"e" 'delete-forward-char
"M-e" 'my/replace-command
"ge" '(upcase-char 1 :which-key "Upcase char")
"w" 'company-complete
;"q" 'query-replace
"a" "TAB"
"M-f j" (lambda () (interactive) (move-beginning-of-line 1) (my/ergo-text-mode))
"M-f k" (lambda () (interactive) (my/insert-line-below) (next-line) (my/ergo-text-mode))
"M-f l" (lambda () (interactive) (my/insert-line-above) (previous-line) (my/ergo-text-mode))
"M-f ;" (lambda () (interactive) (move-end-of-line 1) (my/ergo-text-mode))
"f" (lambda () (interactive) (my/ergo-text-mode))
"x" '(:ignore t :which-key "Multiple Cursors")
"xx" '(mc/edit-lines :which-key "Edit Lines")
"xk" '(mc/mark-next-like-this :which-key "Mark Next")
"xl" '(mc/mark-previous-like-this :which-key "Mark Previous")
"xa" '(mc/mark-all-like-this :which-key "Mark All")
"c" 'kmacro-end-and-call-macro
"M-c" '(:ignore t :which-key "Macros")
"M-c s" '(kmacro-start-macro :which-key "Start Recording")
"M-c e" '(kmacro-end-macro :which-key "End Recording")
"M-c l" '(apply-macro-to-region-lines :which-key "Apply to Lines")
"M-c n" '(name-last-kbd-macro :which-key "Name Last")
"M-c i" '(insert-kbd-macro :which-key "Insert Macro")
"v" 'undo
"M-v" 'undo-tree-redo
"b" 'yank
;"M-b" registers
)
(gen-SPC-def
:keymaps 'my/ergo-motion-mode-map
:prefix "SPC"
)Ergo Text
(general-define-key
:keymaps 'my/ergo-text-mode-map
; RIGHT HAND
(general-chord "jk") 'my/ergo-motion-mode
(general-chord "kj") 'my/ergo-motion-mode
"M-u" 'backward-kill-word
"M-i" 'kill-word
"M-;" 'right-char
"M-f ;" 'move-end-of-line
"M-j" 'left-char
"M-f j" 'move-beginning-of-line
"M-l" 'previous-line
"M-k" 'next-line
; LEFT HAND
"M-w" 'company-complete
"M-e" (lambda () (interactive) (delete-char -1))
"M-a" "TAB"
"M-d" "RET"
"M-s" 'indent-for-tab-command
"M-b" 'yank
)
(gen-SPC-def
:keymaps 'my/ergo-text-mode-map
:prefix "M-SPC"
)Dired
Directory Editor.
General
; To be able to delete and copy directories
; 'alsways' is to not ask
(setq dired-recursive-deletes 'always)
(setq dired-recursive-copies 'always)
; if there's a dired buffer on another window, it would be the default target for copying, renaming(moving), etc.
(setq dired-dwim-target t)Mode Hook
(defun my/dired-mode-hook ()
(dired-hide-details-mode)
(setq dired-hide-details-hide-symlink-targets nil)
(setq dired-hide-details-hide-information-lines nil)
)
(add-hook 'dired-mode-hook 'my/dired-mode-hook)
(defun my/wdired-mode-hook ()
(setq wdired-mode-map evil-normal-state-map)
)
(add-hook 'wdired-mode-hook 'my/wdired-mode-hook)Isearch
Key Bindings
(add-hook 'isearch-mode-hook (lambda () (general-define-key
:keymaps 'isearch-mode-map
"M-;" 'my/isearch-exit-other-end
"M-g" 'isearch-abort
"M-k" 'isearch-repeat-forward
"M-l" 'isearch-repeat-backward
"M-u" 'isearch-delete-char
)
))Org
Here are the Org Mode settings.
General
; never leave empty lines between headlines, all of them belong to the subtree
(setq org-cycle-separator-line 0)
; show point when editing an invisible part of the buffer (e.g. with 'u')
(setq org-catch-invisible-edits 'show)
; make 'M-RET' not split the line
(setq org-M-RET-may-split-line '((default . nil)))
; allow using 'a.', 'a)', 'A.' and 'A)' for unordered lists
(setq org-list-allow-alphabetical t)The ‘org-indent-mode’
; turn on 'org-indent-mode' by default
(setq org-startup-indented t)
; make less indentation, default value: '2'
(setq org-indent-indentation-per-level 0)TO-DO and Tags
; TO-DO keywords
(setq org-todo-keywords
'((sequence "TODO" "PENDING" "DONE")))
; tags
(setq org-tag-alist
'(("daily" . ?d)
("weekly" . ?w)
))
; set the tag position to match "fill-column"
(setq org-tags-column -57)Agenda
; agenda files, for GTD
(setq org-agenda-files '("~/Documents/GTD/gtd.org"))
; capture templates
; remember that when campturing and using more than one line, leave one blank at the end so it doesn't affect the headline below
(setq org-capture-templates '(("w" "Work" entry
(file+headline "~/Documents/GTD/gtd.org" "Work")
"* TODO %i%?")
("p" "Projects" entry
(file+headline "~/Documents/GTD/gtd.org" "Projects")
"* TODO %i%?")
("r" "Reading" entry
(file+headline "~/Documents/GTD/gtd.org" "Reading")
"* TODO %i%?")
("g" "General" entry
(file+headline "~/Documents/GTD/gtd.org" "General")
"* TODO %i%?")
))
; refile targets
;(setq org-refile-targets '(("~/Documents/GTD/gtd.org" :maxlevel . 2)))Undo Tree
(use-package undo-tree
:ensure t
:config
(global-undo-tree-mode)
)Key Chord
To bind commands to consecutive key presses.
(use-package key-chord
:ensure t
:config
(key-chord-mode 1)
(setq key-chord-two-keys-delay 0.2) ; default 0.1
)Spaceline
Spacemacs’ mode-line.
(use-package spaceline
:ensure t
:init
:config
(spaceline-emacs-theme)
; changes the color for every Evil state
;(setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)
; Segments
;(setq spaceline-evil-state-p t)
(setq spaceline-buffer-size-p nil)
)Ivy
A generic completion mechanism for Emacs.
(use-package ivy
:ensure t
:config
; ensures that any Emacs command using completing-read-function uses ivy for completion (and ivy functions)
(ivy-mode 1)
; displays the index and the count for each candidate in "ivy-read"
(setq ivy-count-format "(%d/%d) ")
)
(use-package swiper
:ensure t
)
(use-package counsel
:ensure t
)
(use-package ivy-hydra
:ensure t
)Key Bindings
(general-define-key
:keymaps 'ivy-minibuffer-map
; doesn't select directories
"M-;" 'ivy-alt-done
"M-:" 'ivy-immediate-done
"C-M-;" 'ivy-call
;"C-M-l" 'ivy-insert-current
"RET" 'ivy-done
"TAB" 'ivy-partial
;"TAB" 'ivy-partial-or-done
"M-k" 'ivy-next-line
"M-l" 'ivy-previous-line
"M-K" 'ivy-next-history-element
"M-L" 'ivy-previous-history-element
"M-j" 'ivy-backward-kill-word
"M-J" 'ivy-kill-line
"C-M-k" 'ivy-scroll-down-command
"C-M-l" 'ivy-scroll-up-command
"C-M-g" 'ivy-beginning-of-buffer
"M-G" 'ivy-end-of-buffer
)
(general-define-key
:keymaps 'ivy-minibuffer-map
:prefix "M-SPC"
"r" '(ivy-reverse-i-search :which-key "Reverse i-search")
"?" '(ivy-help :which-key "Help")
"h" '(hydra-ivy/body :which-key "Hydra")
"R" '(ivy-restrict-to-matches :which-key "Restrict")
"i" '(ivy-toggle-ignore :which-key "Toggle Ignore")
"o" '(ivy-occur :which-key "Occur")
"s" '(ivy-rotate-sort :which-key "Rotate Sort")
"k" '(ivy-kill-whole-line :which-key "Kill Whole Line")
"c" '(ivy-kill-ring-save :which-key "Copy the Candidates")
"a" '(ivy-read-action :which-key "Read Action")
)
(general-define-key
:keymaps 'ivy-switch-buffer-map
"M-d" 'ivy-switch-buffer-kill
)Avy
Jump to things in Emacs tree-style.
(use-package avy
:ensure t
)Prescient
Simple but effective sorting and filtering for Emacs.
Prescient
(use-package prescient
:ensure t
:config
; to save user statistics between Emacs sessions
(prescient-persist-mode)
)Ivy Prescient
(use-package ivy-prescient
:ensure t
:config
(ivy-prescient-mode)
)Company Prescient
(use-package company-prescient
:ensure t
:config
(company-prescient-mode)
)Company Mode
A text completion framework for Emacs. The name stands for “complete anything”. It uses pluggable back-ends and front-ends to retrieve and display completion candidates.
(use-package company
:ensure t
:config
(global-company-mode)
)Key Bindings
(general-define-key
:keymaps 'company-active-map
"M-a" 'company-complete-common
"M-;" 'company-complete-selection
"M-j" 'company-complete
"M-k" 'company-select-next
"M-l" 'company-select-previous
)Ace Window
Selecting windows avy-style.
(use-package ace-window
:ensure t
:config
; more ergonomic than using numbers (default)
;(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
(setq aw-keys '(?a ?s ?d ?f ?j ?k ?l ?\;))
)Restart Emacs
To restart Emacs for within Emacs.
(use-package restart-emacs
:ensure t
:config
(setq restart-emacs-restore-frames t)
)EMMS
Emacs MultiMedia System.
(use-package emms
; we don't use ':ensure t' since it's not a MELPA package
:config
; we now have to use 'require' since we don't have ':ensure t'
(require 'emms-setup)
(emms-all)
(emms-default-players)
(setq emms-source-file-default-directory "~/SHARE1/SSDext4/SSD/Music/")
(setq emms-info-asynchronously t)
(setq emms-playlist-buffer-name "Music")
(setq emms-tag-editor-rename-format "%n - %t")
(require 'emms-mode-line)
(emms-mode-line 1)
(setq emms-mode-line-format " [%s]")
(require 'emms-playing-time)
(emms-playing-time 1)
(setq emms-player-list '(emms-player-vlc))
(require 'emms-info-libtag) ;;; load functions that will talk to emms-print-metadata which in turn talks to libtag and gets metadata
(setq emms-info-functions '(emms-info-libtag)) ;;; make sure libtag is the only thing delivering metadata
; Persistent Playlists on '~/.emacs.d/emms-history-file'
; This doesn't work well, my EMMS config doesn't get loaded. Must be in the mode hook.
(require 'emms-history)
; To have Markable playlists
(require 'emms-mark)
;(setq emms-playlist-default-major-mode 'emms-mark-mode)
(add-hook 'emms-playlist-mode-hook (lambda ()
;(emms-mark-mode)
(setq emms-browser-playlist-info-title-format "%i%a - %A - [%T] %t")
(setq emms-browser-playlist-info-album-format "%cS %A (%y)")
))
(add-hook 'emms-browser-mode-hook (lambda ()
(setq emms-browser-info-title-format " %i[%T] %t")
(setq emms-browser-info-album-format "%i%cS %A (%y)")
(emms-history-load)
))
; Cover images
(setq emms-browser-thumbnail-directory "")
(setq emms-browser-covers 'emms-browser-cache-thumbnail)
; Display Format
)Which Key
Displays aviable keybindings in popup.
(use-package which-key
:ensure t
:init
(setq which-key-enable-extended-define-key t)
:config
(which-key-mode)
; the default delay is 1 seconds
(setq which-key-idle-delay 0.1)
(setq which-key-separator ": ")
; the prefix string that goes in front of prefix commands (default: "+")
(setq which-key-prefix-prefix nil)
; all prefix keys are grouped together
(setq which-key-sort-order 'which-key-prefix-then-key-order)
)Hydra
To tie related commands into a family of short bindings with a common prefix: a Hydra.
(use-package hydra
:ensure t
:config
(defhydra hydra-window-resize (:exit nil ; the hydra state ends when a head is executed
:foreign-keys warn ; the hydra state doesn't stop when a non-configured key is pressed
:hint nil ; if you have a docstring you don't need a hint for each head
)
"
Hydra-Window-Resize
------------------------------------------------
[_h_] Shrink Window Horizontally
[_j_] Enlarge Window Vertically
[_k_] Shrink Window Vertically
[_l_] Enlarge Window Horizontally
[_q_] Quit
"
("h" shrink-window-horizontally)
("j" enlarge-window)
("k" shrink-window)
("l" enlarge-window-horizontally)
("q" nil)
)
(defhydra hydra-buffers (:exit nil
:foreign-keys warn
:hint nil
)
"
Hydra-Buffers
------------------------------------------------
[_l_] Next Buffer
[_h_] Previous Buffer
[_d_] Delete Buffer
[_q_] Quit
"
("l" evil-next-buffer)
("h" evil-prev-buffer)
("d" kill-this-buffer)
("q" nil)
)
)Easy Kill
(use-package easy-kill
:ensure t)Expand Region
(use-package expand-region
:ensure t)Smartparens
(use-package smartparens
:ensure t
:config
;; Activate smartparens globally
(smartparens-global-mode t)
(show-smartparens-global-mode t)
;; Do not pair simple quotes
(sp-pair "'" nil :actions :rem)
)
Multiple Cursors
(use-package multiple-cursors
:ensure t
:config
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
)Phi Search
Another incremental search & replace, compatible with “multiple-cursors”.
(use-package phi-search
:ensure t)Key Bindings
(add-hook 'phi-search-hook (lambda ()
(general-define-key)
))
(general-define-key
:keymaps 'phi-search-default-map
"M-k" 'phi-search-again-or-next
"M-l" 'phi-search-again-or-previous
"M-;" 'phi-search-complete-at-beginning
)