English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux jed command

Comandos Linux completos

Linux jed command is used to edit text files.

Jed is a program written in Slang, suitable for editing program source code.

Syntax

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

Parameters

  • -2   Display the two upper and lower editing areas.

  • -batch Execute in batch mode.

  • -f<函数> Execute the Slang function.

  • -g<行数> Move to the specified line number in the buffer.

  • -i<文件> Load the specified file into the buffer.

  • -n Do not load the jed.rc configuration file.

  • -s<字符串> Find and move to the specified string.

Online example

jed is mainly used to edit program source code, and the syntax of the program will be displayed in color highlighting when editing source code. For example, to edit a C language source code file with jed, you can use the following command:

jed main.c       #Open the main.c file with the jed editor

Output results as follows:

F10 key ==> File Edit Mode Search Buffers Windows System Help #Editor Menu  
/*-*- linux-c-*-*/ #Zona de edición  
#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) Todos 6:06pm-----------------------------  
#De izquierda a derecha: número de versión de jed, actual es el editor de emacs, nombre del archivo abierto, hora actual  
loading /usr/share/jed/lib/modeinfo.slc

Comandos Linux completos