@kyanny's blog

My thoughts, my life. Views/opinions are my own.

M-x goto-line

今日やっと goto-line をみつけた。 Vim でいう 33G で 33 行目へカーソルをジャンプ、相当のもの。 http://www.ac.cyberhome.ne.jp/~yakahaira/vimdoc/usr_03.html#03.5 いままで Emacs でこの単純でよく必要になる作業のやり方がわからなかったので、モードラインの行番号を見ながら手でスクロールしていた。なんて非効率的だったんだろう。さっきふと goto-line って名前の関数があるんじゃないかなとひらめいた。

M-g g, M-g M-g はわかるけど、 s-l ってなんだろう?どうやって入力するんだ?

goto-line is an interactive compiled Lisp function in `simple.el'.

It is bound to s-l, M-g g, M-g M-g, <menu-bar> <edit> <goto>
<go-to-line>.

(goto-line line &optional buffer)

Goto line, counting from line 1 at beginning of buffer.
Normally, move point in the current buffer, and leave mark at the
previous position.  With just C-u as argument,
move point in the most recently selected other buffer, and switch
to it.  When called from Lisp code, the optional argument buffer
specifies a buffer to switch to.

If there's a number in the buffer at point, it is the default for
line.