开发者

Emacs mini-buffer command with parameter

I'd like to use the command to resize split windows via the mini-buffer. In the GNU documentation I found the description (Resizing-Windows):

Example: enlarge-window-horizontally size &optional horizontal. 

If I type M-x enlarge-window-horizontally the window will get resized by one column. But it is not possible to add a number for the size in the mini-buffer, as on pressing spacebar emacs tries to complete the command.

Does someone know how to use the optional parameters in mini-buffer? Respectively how to resize a window by more than one column at once.

开发者_StackOverflow社区Thanks.


Passing parameters to interactive command like this uses the universal argument.

You can enlarge the window by 10 columns by typing C-u 10 M-x enlarge-window-horizontally. You can change 10 to any integer. By the way, typing C-u num to supply a numeric argument works with all interactive emacs commands that expect an argument.

Note there is also a keyboard short cut: C-u 10 C-x }. And to shrink the window: C-u 10 C-x {.

You can also specify numbers by typing holding down the meta key M-10 C-x {


What you are looking for is eval-expression.

M-: (enlarge-window-horizontally horizontal)

M-: will change the minibuffer to an eval prompt that lets you enter in a Lisp expression to be evaluated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜