通过使用global-set-key和global-unset-key我们可以创建或移除某个全局绑定。(看了下注释,这是个老函数了,现在更加推荐使用keymap-global-set和keymap-global-unset)。use-package通过:bind关键字为我们提供了更加方便的方法: ;; examples from document (use-package ace-jump-mode :bind ("C-." . ace-jump-...
(use-package <package-name> :init <加载包之前,执行的代码> :config <加载包之后,执行的代码> :bind <key bindings for this package>) 3.3 示例 (1) 没有使用use-package (global-company-mode t) (define-key company-active-map (kbd "C-n") 'company-select-next) (define-key company-acti...
(use-packageivy:ensuret; 确认安装,如果没有安装过 ivy 就自动安装:init; 在加载插件前执行命令(ivy-mode1); 启动 ivy-mode:custom; 自定义一些变量,相当于赋值语句 (setq xxx yyy)(ivy-use-virtual-bufferst); 一些官网提供的固定配置(ivy-count-format"(%d/%d) "):bind; 以下为绑定快捷键("C-s".'...
2.4 顺序加载::after。确保在指定包加载后才加载。:all 和 :any 选择性加载。2.5 手动安装包管理::load-path、:autoload。管理非 package.el 安装的包路径和 autoload。2.6 key binding:使用 :bind、:map、:bind-keymap。创建或移除全局或特定 keymap 的绑定。2.7 minor-mode 启动::hook。
(my/timer(use-packageprojectile:init(projectile-mode+1):bind("C-c p".projectile-command-map):custom(projectile-project-search-path '("~/code/""~/gh/""~/code/antfin/""~/code/misc")):config(setq projectile-switch-project-action #'projectile-find-file-dwim ...
If you autoload non-interactive function, please use :autoload.(use-package org-crypt :autoload org-crypt-use-before-save-magic)Key-bindingAnother common thing to do when loading a module is to bind a key to primary commands within that module:(use-package ace-jump-mode :bind ("C-." ....
除了延迟加载以外,use-package还可以设置包的绑定键。绑定键是指为某个功能或命令设置快捷键。在Emacs中,快捷键是非常重要的,可以极大地提高工作效率。 通过use-package,可以轻松地设置包的绑定键。例如: ```elisp (use-package ivy :ensure t :bind ("C-s" . 'swiper) ("M-x" . 'counsel-M-x) ) `...
(use-packagehungry-delete:bind(("C-c DEL".hungry-delete-backward)("C-c d".hungry-delete-forward))) 29 文本编辑之行/区域上下移动 在VSCode或Jetbrains家族的编辑器中,上下移动行/块是非常容易的,但原生的Emacs没有提供这样的功能。可通过插件drag-stuff来辅助实现。
:bind ("M-j" . pyim-convert-string-at-point)) (use-package liberime :load-path (lambda () (expand-file-name "rime" user-emacs-directory)) :custom (rime_share_data_dir "/Library/Input Methods/Squirrel.app/Contents/SharedSupport/") ...
(package-refresh-contents)(package-install'use-package))(use-packageneotree:ensuret:bind(("C-c d".neotree-dir)("C-c s".neotree)))(use-packageautopair:ensuret:init(autopair-global-mode))(use-packagegruvbox-theme:ensuret:config(load-theme'gruvbox-dark-mediumt));;(use-package monokai-...