在<代码>C-s之后插入“密码>C-w,但替换(和替换“regexp”)查询时,是否有一个类比?
我也享受Sacha Chua对C-x
的修改,在研究中插入整个字句:
http://sachua.com/blog/2008/07/emacs-key板-shortcuts-for-navigating-code/
在某些情况下,如果可以用来取代扼杀,这也会真正有用。
I d be very thankful for any tips! Thank you!
在<代码>C-s之后插入“密码>C-w,但替换(和替换“regexp”)查询时,是否有一个类比?
我也享受Sacha Chua对C-x
的修改,在研究中插入整个字句:
http://sachua.com/blog/2008/07/emacs-key板-shortcuts-for-navigating-code/
在某些情况下,如果可以用来取代扼杀,这也会真正有用。
I d be very thankful for any tips! Thank you!
这样做是可能的,尽管在研究中它作为“C-w的ancy,因为你可以随时打上扩大甄选的关键:
(defun my-minibuffer-insert-word-at-point ()
"Get word at point in original buffer and insert it to minibuffer."
(interactive)
(let (word beg)
(with-current-buffer (window-buffer (minibuffer-selected-window))
(save-excursion
(skip-syntax-backward "w_")
(setq beg (point))
(skip-syntax-forward "w_")
(setq word (buffer-substring-no-properties beg (point)))))
(when word
(insert word))))
(defun my-minibuffer-setup-hook ()
(local-set-key (kbd "C-w") my-minibuffer-insert-word-at-point))
(add-hook minibuffer-setup-hook my-minibuffer-setup-hook)
EDIT: Note that this is in the standard minibuffer, so you can use it use it anywhere you have a minibuffer prompt, for example in grep, occur, etc.
两个答案:
More generally, Icicles does something similar to what scottfrazer s code (above) does, but it is more general. At any time, in any minibuffer, you can hit M-. (by default) to pick up text ("things") at point and insert it in the minibuffer. You can repeat this, to either (a) pick up successive things (e.g. words) of the same kind, accumulating them like C-w does for Isearch, or (b) pick up alternative, different things at point. More explanation here.
I started using ruby-electric-mode. I like it except that I am used to closing open brackets myself (the other pairing are still useful to me). How can I make emacs suppress additional brackets when ...
I am currently constrained to a windows dev box and I want to migrate my projects from eclipse to emacs. What are some good references on setting up an emacs dev environment for windows? Anything ...
I would like to have which-function-mode on by default when I open up Emacs. I ve added the following lines to my .emacs file. (setq which-func-mode t) (setq which-function-mode t) When I open ...
I don t seem to be able to enable a go mode for emacs. C mode doesn t work without semicolons. The best I have found is the JavaScript mode by Karl Landstrom, since JavaScript also doesn t require ...
The key bindings I ve defined in my .emacs file aren t working. Here s the file: ;init modes (menu-bar-mode 0) (tool-bar-mode 0) (cua-mode) (column-number-mode) (fset perl-mode cperl-mode) (cperl-...
How can I fix the simple macro foo in (elisp)Eval During Expansion? None of the followings work: (defmacro foo1 (a) `(setq (eval ,a) t)) (defmacro foo2 (a) `(setq ,(eval a) t)) (defmacro foo3 (...
When I open a multi-byte file, I get this:
I often commit files with similar cvs comment but not in a single operation. I would like to able to bring up previous comments I ve used in a previous commit when I am in the process of writing a ...