~iany/ Menu
  • Series
  • Tags
  1. Home
  2. Tags
  3. Emacs

Emacs

A collection of 3 articles

Fix TAB Binding For yasnippet And auto-complete

There are two TAB’s in Emacs, (kbd "TAB") (\t, [9]) and (kbd "<tab>") ([tab]). If modes like yasnippet and auto-complete want to bind on TAB, their trigger key must be the same with the original Tab command.

Updated Apr 15, 2022  •  1 min read

Use Popup isearch For Yasnippet Prompt

Yasnippet tries functions in yas/prompt-functions when it needs user to select one choice, such as selecting snippets with the same trigger key, such as helper method yas/choose-value. popup is a visual popup interface library extracted from auto-complete by its author. It has better look and feel than all the built-in yas/prompt-functions. Also it is easy to customize, and its isearch mode is very efficient, the items are filtered on-the-fly when typing.

Updated Apr 15, 2022  •  1 min read

Highlight Ruby New Hash In Emacs

Not fully tested, let me know if it mess up your buffer. ※ my-ruby-mode.el (font-lock-add-keywords 'ruby-mode '(("\\(\\b\\sw[_a-zA-Z0-9]*:\\)\\(?:\\s-\\|$\\)" (1 font-lock-constant-face))))

Updated Feb 22, 2020  •  1 min read

© 2025  •  ~iany/  •  CC-BY-SA 4.0

浙ICP备17004784号-1