|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
0 D( \* O+ i) y' i9 p5 s, Z
Linux jed命令用于编辑文本文件。4 F$ I0 V% n5 m' J3 s2 k% m
$ r& k% o" C: V* E* qJed是以Slang所写成的程序,适合用来编辑程序原始代码。+ i7 S. Z4 `1 Q' b6 j' N4 M
& [4 i: o) A" f$ a语法
0 ?4 f- j/ K1 r1 F9 t F$ Rjed [-2n][-batch][-f<函数>][-g<行数>][-i<文件>][-I<文件>][-s<字符串>][文件]) P& @1 o M6 |3 L% l: w
参数:
]' O0 i7 X( n) R# g F) a* {+ R6 T: M
-2 显示上下两个编辑区。
/ M. g# S2 ?: x& _- C-batch 以批处理模式来执行。* W( W ^- G! f' s6 f4 n O
-f<函数> 执行Slang函数。. G) k# e2 ?/ X' B% k9 Y
-g<行数> 移到缓冲区中指定的行数。2 c) M7 _) m& b7 W$ h' `5 J
-i<文件> 将指定的文件载入缓冲区。6 `0 o" \5 \( [3 }% S
-n 不要载入jed.rc配置文件。
( [) E8 m) S' e4 f/ r. [% G5 w4 a-s<字符串> 查找并移到指定的字符串。
5 q+ R% q. _3 L6 T实例
/ u( Z1 [+ O, |, I; \+ B4 b7 w% ]6 cjed主要用于编辑程序的源码,编辑源码时将以彩色高亮的方式显示程序的语法。例如使用jed编辑一个C语言的源代码文件,可使用如下命令: Z8 m5 R0 p4 e0 M5 w
1 f: z! f' r6 Ijed main.c #用jed编辑器打开main.c 文件
6 T: X% V0 C; q/ I) e输出结果如下:& j J9 s7 P" S8 D! E
. Y8 J0 ?' L3 w4 c6 p: V" x; z; YF10 key ==> File Edit Mode Search Buffers Windows System Help #编辑器菜单 , l7 d2 |* z9 l
/*-*- linux-c-*-*/ #编辑区 0 a, z1 I) X! O- Q# b
#include <linux/mm.h>
' i2 \$ ^ n9 G: c#include <linux/sysctl.h> $ J; O+ g1 [0 _: j. k
#include <linux/nsproxy.h>
0 ^& R8 R9 w T3 Kstatic struct list_head * 3 n# C" l* i/ c; e
net_ctl_header_lookup(struct ctl_table_root *root, struct nsproxy *namespaces) , u% ?" ~0 {2 b& \ @2 u' M
{ 9 f" ]8 x& u+ M& n8 {" R3 A! U
return &namespaces->net_ns->sysctl_table_headers;
' z# ~6 r! S. H}
4 ]' | e) Z7 Vstatic struct ctl_table_root net_sysctl_root = { 4 j' g% E4 m: i) v3 S+ q+ ?' \4 [
.lookup = net_ctl_header_lookup,
$ \1 i3 G1 U' e};
9 Q! b3 ?3 ~$ |8 ]4 Vstatic int sysctl_net_init(struct net *net)
n7 u/ ^/ c& G5 s9 d# V9 }& v{
8 A. h& o B- ~' h. g! y# rINIT_LIST_HEAD(&net->sysctl_table_headers); z C7 L" d$ m8 M0 \# E3 [
return 0; - \: e* x% _; v B5 ?2 M+ I
}
* K* n6 g$ ]5 K. L! o; B7 ^-----+(Jed 0.99.18U) Emacs: main.c (C) All 6:06pm-----------------------------
8 O1 Y1 H6 V& y#从左到右分别为jed版本编号、当前是模拟emacs编辑器、打开的文件名、现在的时间 + J4 g. x( i( [, Y
loading /usr/share/jed/lib/modeinfo.slc |
|