boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - emacs中如何去指定一行
相关主题
Display line number in EMACS??????
哪里可以下载EMACS
emacs help
Re: 为什么emacs自动给我加^M.
beginner's question: Emacs vs. vi
console halt problem when using >>pico<<
How to see line number in Emacs
emacs how to concatenate two lines?
awk question
reverse the lines?
相关话题的讨论汇总
话题: line话题: ctrl话题: goto话题: go话题: number
进入Unix版参与讨论
1 (共1页)
m*****i
发帖数: 332
1
Thanks
...............
w**w
发帖数: 5391
2
ctl-w

【在 m*****i 的大作中提到】
: Thanks
: ...............

s*****d
发帖数: 258
3
delete one line?
ctrl-k

【在 m*****i 的大作中提到】
: Thanks
: ...............

r*****s
发帖数: 985
4
M-g for "Goto line"

【在 m*****i 的大作中提到】
: Thanks
: ...............

t******q
发帖数: 117
5
assume you know the number of the line.
ctrl + u # ctrl + n
# is the line number

【在 r*****s 的大作中提到】
: M-g for "Goto line"
p****s
发帖数: 3184
6

M-x goto-line
You can
(global-set-key "\C-hg" 'goto-line)
then the hot key C-h g will do the job.

【在 m*****i 的大作中提到】
: Thanks
: ...............

p****s
发帖数: 3184
7

You forgot M-< ;)

【在 t******q 的大作中提到】
: assume you know the number of the line.
: ctrl + u # ctrl + n
: # is the line number

t******q
发帖数: 117
8
you mean #-1 ?
that is right, since every line start from 0th.
just come back to correct that.

【在 p****s 的大作中提到】
:
: You forgot M-< ;)

p****s
发帖数: 3184
9
In Emacs, the prefix C-u # indicates how many times to repeat the
followed operations, just like VI's number prefixes.
C-n is 'next-line'.
C-u 10 C-n actually means "repeat next-line operation 10 times".
It doesn't necessarily go to the 10th line unless you go to
the begin of buffer at first, which is done by M-<

【在 t******q 的大作中提到】
: you mean #-1 ?
: that is right, since every line start from 0th.
: just come back to correct that.

t******q
发帖数: 117
10
that is exactly what I assuned.
when you want to go to the numbered line.
you give the number from the beginning of the whole article.
you can definately go to the next 10 lines.
which also make sense in my key bundle.
since each line is started from line 0,
if you want to go to the 20th line, you need to skip only 19 lines.
that is the #-1 means.
and the Ctrl+h g bundle does not work for my test unfortunately.
by the way, ctrl+h is still bundled to the online help.

【在 p****s 的大作中提到】
: In Emacs, the prefix C-u # indicates how many times to repeat the
: followed operations, just like VI's number prefixes.
: C-n is 'next-line'.
: C-u 10 C-n actually means "repeat next-line operation 10 times".
: It doesn't necessarily go to the 10th line unless you go to
: the begin of buffer at first, which is done by M-<

p*a
发帖数: 592
11
我一直用M-g, 也就是M-x goto-line

【在 m*****i 的大作中提到】
: Thanks
: ...............

1 (共1页)
进入Unix版参与讨论
相关主题
reverse the lines?
Re: 怎么在bash script里面改变xterm窗口的标题?
Re: how to install gcc/g++ in my $HOME(not root)?
Re: hi
some wt
help! Re: some wt
[转载] help me out -- questions on linux 2.4.12
Linux 7.3下装ORACLE8.1.7新问题
请推荐些solaris network administrator方面的书
Re: I started to learn UNIX.Please suggest some sites in china to help
相关话题的讨论汇总
话题: line话题: ctrl话题: goto话题: go话题: number