How to use the Linux jed command

Source: Internet
Author: User

Jed is a program written by Slang and is suitable for editing the original code of the program.

Syntax

Jed [-2n] [-batch] [-f <Function>] [-g <number of rows>] [-I <FILE>] [-I <FILE>] [-s <string>] [file]

Parameters:

  • -2: displays the upper and lower editing areas.
  • -Batch is executed in batch mode.
  • -F <Function> executes the Slang function.
  • -G <number of rows> move to the specified number of rows in the buffer.
  • -I <FILE> loads the specified file into the buffer.
  • -I <FILE> load the original Slang code file.
  • -N: do not load the jed. rc configuration file.
  • -S <string> searches for and moves to the specified string.

Instance

Jed is mainly used to edit the source code of a program. When editing the source code, the syntax of the program is highlighted in color. For example, if you use jed to edit a C-language source code file, you can use the following command:

Jed main. c # open the main. c file in the jed Editor

The output result is as follows:

F10 key => File Edit Mode Search Buffers Windows System Help # Editor menu

/*-Linux-c-*/# Editing area

# 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:06 pm -----------------------------

# The numbers of jed versions, the current emacs editor, the opened file name, and the current time are displayed from left to right.

Loading/usr/share/jed/lib/modeinfo. slc

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.