Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the Linux jed command

Shulou Source: shulou.com Published: 2022-06-01 20:09:38 10月01日 Update

This article mainly explains "how to use the Linux jed command". Friends who are interested might as well take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use the Linux jed command.

Linux common commands jed commands are developed by Slang and are mainly used to edit the source code of the program. It supports color syntax highlighting and can simulate emacs,EDT,wordstar and Brief editors.

Jed is mainly used as an editor for editing code

Syntax jed (option) (parameter) option-2: display the upper and lower edit areas;-batch: execute in batch mode;-f: execute the Slang function;-g: move to the specified number of lines 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. Parameter file: specifies the list of files to be edited.

The instance opens the mysource.c original code file in the form of two editing areas. To switch the edit area, you can use the command described later to open the operation command. After opening the menu, press 3 and then press 2 to switch the edit area:

Jed-2 mysource.c operation

Some Emacs key combinations conflict with jed menu key combinations. For example, Alt+f should be "one word forward" in Emacs, while "File menu" in jed. If you want to use Emacs-style key combinations, edit / usr/share/jed/lib/menus.slc to find the following paragraph:

Unsetsetkey ("selectmenubar", "\ em"); unsetsetkey ("@\ emF", "\ ef"); unsetsetkey ("@\ emE", "\ ee"); unsetsetkey ("@\ emo", "\ eo");% Mode menu unsetsetkey ("@\ emS", "\ es"); unsetsetkey ("@\ emB", "\ eb"); unsetsetkey ("@\ emi", "\ ei"); unsetsetkey ("@\ emH", "\ eh") Unset_setkey ("@\ emy", "\ ey"); you can modify it according to your needs, or simply comment it out. Use the menu to use the F10 key.

Because Jed can simulate a variety of editors, their keystroke instructions are different. Here we take the simulation Emacs as an example to illustrate how to operate in the editor.

File

/ usr/share/jed/lib/*.sl this is the default file that runs jed slang. / usr/share/jed/lib/site.sl this is the default startup file. / etc/jed.rc this is the global system configuration file. ~ / .jedrc this is the user profile. At this point, I believe you have a deeper understanding of "how to use the Linux jed command". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: File command editor this is menu combination configuration up and down two code content parameters method buffer syntax toggle learning buffering different original Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Apple Shulou Technology MariaDB Microsoft