Latest web development tutorials

Linux jed command

Linux command Daquan Linux command Daquan

Linux jed command is used to edit text files.

Jed Slang is the written procedures, suitable for editing program source code.

grammar

jed [-2n][-batch][-f<函数>][-g<行数>][-i<文件>][-I<文件>][-s<字符串>][文件]

Parameters:

  • -2 Display up and down two editing area.
  • -batch in batch mode execution.
  • -f <function> Slang execution functions.
  • -g <number of lines> number of lines to move the buffer specified.
  • -i <file> specified file into a buffer.
  • -i <file> Loading Slang original code files.
  • -n Do not load jed.rc profile.
  • -s <string> Find and moved to the specified string.

Examples

jed mainly for editing program source code, will be displayed in color syntax highlighting when editing program source code. Jed editor such as using a C language source code files, you can use the following command:

jed main.c       #用jed编辑器打开main.c 文件 

The output is as follows:

F10 key ==> File Edit Mode Search Buffers Windows System Help #编辑器菜单  
/*-*- linux-c-*-*/ #编辑区  
#include <linux/mm.h> 
#include <linux/sysctl.h> 
#include <linux/nsproxy.h> 
static struct list_head *  
net_ctl_header_lookup(struct ctl_table_root *root, struct nsproxy *namespaces)  
{  
return &namespaces->net_ns->sysctl_table_headers;  
}  
static struct ctl_table_root net_sysctl_root = {  
.lookup = net_ctl_header_lookup,  
};  
static int sysctl_net_init(struct net *net)  
{  
INIT_LIST_HEAD(&net->sysctl_table_headers);  
return 0;  
}  
-----+(Jed 0.99.18U) Emacs: main.c (C) All 6:06pm-----------------------------  
#从左到右分别为jed版本编号、当前是模拟emacs编辑器、打开的文件名、现在的时间  
loading /usr/share/jed/lib/modeinfo.slc 

Linux command Daquan Linux command Daquan