Ruby on rails 对于Rails开发,什么是有用的Emacs特性
在日常RubyonRails开发中,哪些Emacs功能、包、附加组件等可以帮助您?我使用和一些模式来编辑css、js()、haml、sass、yaml和代码片段模式()。有关概述,请查看emacs 两种模式和(Rails开发中最流行的两种模式)的早期版本功能非常丰富,但过于臃肿和繁琐。为了保持一个小的、干净的、可靠的、功能性的和可黑客攻击的核心,Rinari将避开许多“铃铛和哨子”类型的功能。然而,这并不是说这些额外的好处可能没有用处 此页面应作为指向其他一些工具/包的链接的编组点,这些工具/包通常与Rinari和Rails配合良好。如果您对本列表的新增内容或Rinari的新功能有任何想法,请联系我们 使用Rails的基本主要模式Ruby on rails 对于Rails开发,什么是有用的Emacs特性,ruby-on-rails,ruby,emacs,Ruby On Rails,Ruby,Emacs,在日常RubyonRails开发中,哪些Emacs功能、包、附加组件等可以帮助您?我使用和一些模式来编辑css、js()、haml、sass、yaml和代码片段模式()。有关概述,请查看emacs 两种模式和(Rails开发中最流行的两种模式)的早期版本功能非常丰富,但过于臃肿和繁琐。为了保持一个小的、干净的、可靠的、功能性的和可黑客攻击的核心,Rinari将避开许多“铃铛和哨子”类型的功能。然而,这并不是说这些额外的好处可能没有用处 此页面应作为指向其他一些工具/包的链接的编组点,这些工具/包
- Ruby模式,以及其他一些通用的 Ruby Emacs糖果可以在 ruby的/misc目录 分布和在 (默认情况下,它还与Emacs 23.1捆绑在一起)
- YAML模式
- CSS模式
- JavaScript模式 其他工具
- Rhtml模式用于编辑的次要模式 rhtml文件(不带MMM模式)请参阅 rhtml模式
- 片段 和Rails片段
- ruby调试支持
- ido模式
- -Emacs中web开发的最佳模式-编辑erb文件的rhtml模式的最佳替代方案
气泡缓冲区
(下面的代码),我只需按下一个键(在我的例子中是F5)就可以将缓冲区内容切换到最近访问的文件——尽管选项卡栏
使这有点多余。我还包括了用C-DEL立即杀死缓冲区的代码,加上几个漂亮的小函数,可以在保持点不变的同时上下滚动缓冲区,只要它不离开屏幕;这里的代码将它们绑定到数字键盘的*
和/
。(这些都不是我自己的作品。)
那是YASnippet,不是yas,逗号太多了。它是C-x C-C,根据它的描述,Rinari听起来就像我在寻找的一样,但是Github上的当前版本已经损坏了,正如我在中所指出的。我个人用于Rails开发。捆绑的
sparket
扩展为我提供了所需的项目导航功能,我并不真正关心Rinari的其他功能。我添加了一个关于sparket
的答案。顺便说一句,你太谦虚了,没有提到这是你的工作。:)
;; Use F5 to switch between buffers. Use C-DEL to remove the current buffer
;; from the stack and retrieve the next buffer. The most-frequented buffers are
;; always on the top of the stack. (Copied, with changes and a bugfix, from
;; http://geosoft.no/development/emacs.html.)
(defvar LIMIT 1)
(defvar time 0)
(defvar mylist nil)
(defun time-now ()
(car (cdr (current-time))))
(defun bubble-buffer ()
(interactive)
(if (or (> (- (time-now) time) LIMIT) (null mylist))
(progn (setq mylist (copy-alist (buffer-list)))
(delq (get-buffer " *Minibuf-0*") mylist)
(delq (get-buffer " *Minibuf-1*") mylist)))
(bury-buffer (car mylist))
(setq mylist (cdr mylist))
(setq newtop (car mylist))
(switch-to-buffer (car mylist))
(setq rest (cdr (copy-alist mylist)))
(while rest
(bury-buffer (car rest))
(setq rest (cdr rest)))
(setq time (time-now)))
(global-set-key [f5] 'bubble-buffer)
(defun kill-buffer-without-questions ()
;; Kill default buffer without the extra emacs questions
(interactive)
(kill-buffer (buffer-name)))
(global-set-key [C-delete] 'kill-buffer-without-questions)
;; Scroll up and down without moving the cursor by pressing the numeric keypad's
;; "/" and "*" keys.
(defun scroll-down-keep-cursor ()
;; Scroll the text one line down while keeping the cursor
(interactive)
(scroll-down 1))
(defun scroll-up-keep-cursor ()
;; Scroll the text one line up while keeping the cursor
(interactive)
(scroll-up 1))
(global-set-key [kp-divide] 'scroll-down-keep-cursor)
(global-set-key [kp-multiply] 'scroll-up-keep-cursor)