TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Emacs-fu: some handy key bindings

80 点作者 vamsee将近 15 年前

7 条评论

geophile将近 15 年前
Really useful commands:<p><pre><code> ^X-2: Split window horizontally ^X-3: Split window vertically ^X-0: Combine window with sibling ^X-1: Undo all splits </code></pre> From my .emacs file:<p><pre><code> ;;; Key bindings (global-set-key "\C-xg" 'goto-line) (global-set-key "\C-xl" 'what-line) (global-set-key [f1] 'goto-line) (global-set-key [f2] 'switch-to-buffer) (global-set-key [f3] 'shell) (global-set-key [f4] 'query-replace) (global-set-key [f5] 'compare-windows) (global-set-key [f6] 'set-left-margin) (global-set-key [f7] 'find-file) (global-set-key [S-f7] 'revert-buffer) (global-set-key [f8] 'save-buffer) (global-set-key [f9] 'auto-fill-mode) (global-set-key [f10] 'call-last-kbd-macro) (global-set-key [S-f10] 'apply-macro-to-region-lines) (global-set-key [f11] 'sort-lines) (global-set-key [f12] 'undo) (global-set-key [home] 'beginning-of-line) (global-set-key [end] 'end-of-line) ;;; no insert key on mac keyboard (global-set-key [insert] 'other-window) (global-set-ke y [help] 'other-window) (global-set-key [S-help] 'yank) (global-set-key [C-home] 'beginning-of-buffer) (global-set-key [C-end] 'end-of-buffer) (global-set-key [S-next] 'scroll-other-window) (global-set-key [S-prior] 'scroll-other-window-down) </code></pre> Not key bindings, but very nice to have in .emacs:<p><pre><code> ;;; this highlights the marked region (transient-mark-mode t) ;; don't automatically add new lines when scrolling down at ;; the bottom ;;of a buffer. (setq next-line-add-newlines nil) ;;; Don't truncate lines when windows are split vertically (setq-default truncate-partial-width-windows nil)</code></pre>
评论 #1563436 未加载
limmeau将近 15 年前
In my Emacs 23 default configuration, the functionality for editing code and comments side-by-side in separate buffers is on the F2 key, whereas replace-regexp doesn't have a key of its own. Guess which one I use more.<p>Sometimes I wish for a keybinding revolution...<p>Yes, I know that keys can be remapped, and have done so on my machines, but sensible defaults are still a good thing to have, if only to welcome new users.
评论 #1564235 未加载
va_coder将近 15 年前
Does anyone know better ways to evaluate and execute Clojure expressions in Emacs?<p>I find key combinations like these clunky:<p>C-x C-e<p>C-M-x
评论 #1564206 未加载
surki将近 15 年前
Checkout hs-minor-mode as well. Great for sifting through code (or xml, html etc)
merraksh将近 15 年前
M-1 M-q: justifies text, adding spaces between words.
njs12345将近 15 年前
M-x artist-mode
freyrs将近 15 年前
Forgot the most important one:<p>C-X C-c; vim
评论 #1563066 未加载