使用したい機能がその定義であるmove-to-window-line
、次のとおりです。
move-to-window-line is an interactive built-in function in `C source
code'.
It is bound to M-r.
(move-to-window-line arg)
Position point relative to window.
With no argument, position point at center of window.
An argument specifies vertical position within the window;
zero means top of window, negative means relative to bottom of window.
あなたはページの一番下に移動するには、ページの上部と-1
に行くこと0
とそれを呼ぶだろう。これらは、無名関数または名前付き関数を持つ鍵にバインドすることができます。両方の例が示されている。
無名関数
(global-set-key [(f4)] (function
(lambda()
"Go to top of page."
(interactive)
(move-to-window-line 0))))
(global-set-key [(f4)] (function
(lambda()
"Go to bottom of page."
(interactive)
(move-to-window-line -1))))
名前付き関数
(defun my-top-of-page()
"Go to top of page."
(interactive)
(move-to-window-line 0))
(defun my-bottom-of-page()
"Go to bottom of page."
(interactive)
(move-to-window-line -1))
(global-set-key [(f4)] 'my-top-of-page)
(global-set-key [(shift f4)] 'my-bottom-of-page)
使用: - 'M- = Mr' - あなたは(それは参考になりましEmacsのデフォルトを変更するかもしれないので、中央のウィンドウの – huntar
smartparensは、SP-スプライス-S式-殺害-around''に 'Mr'をバインドウィンドウ移動 - トップ - ボトム)をMRに変換する。 –