开发者

How to indent a buffer in ESS?

开发者 https://www.devze.com 2023-01-01 02:53 出处:网络
ESS allows us to indent a line and an expression. Is there a key binding for indenting a buffe开发者_如何学Gor? If not, can we create it?As stated by others you could mark the whole buffer C-x h and t

ESS allows us to indent a line and an expression. Is there a key binding for indenting a buffe开发者_如何学Gor? If not, can we create it?


As stated by others you could mark the whole buffer C-x h and then indent the region with C-M-\

You could also put something along these lines in your .emacs file:

(defun my-indent-buffer()
  (interactive)
  (save-excursion
    (indent-region (point-min) (point-max))))

(global-set-key "\C-cib" 'my-indent-buffer)

This has the benefit of remembering your point.


Not sure about a buffer but you can mark a region and then use C-M-\ on it.

0

精彩评论

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