Linux joe command
The Linux joe command is used to edit text files.
Joe is a powerful full-screen text editor. It is slightly more complex to operate than Pico, but more fully featured. Joe can open several files at once, placing each in its own editing area, and can cut and paste between files.
Syntax
joe [-asis][-beep][-csmode][-dopadding][-exask][-force][-help][-keepup][-lightoff][-arking][-mid][-nobackups][-nonotice][-nosta][-noxon][-orphan][-backpath<目录>][-columns<栏位>][-lines<行数>][-pg<行数>][-skiptop<行数>][-autoindent crlf linums overwrite rdonly wordwrap][+<行数>][-indentc<缩排字符>][-istep<缩排字符数>][-keymap<按键配置文件>][-lmargin<栏数>][-rmargin<栏数>][-tab<栏数>][要编辑的文件]
Parameters:
- -columns
Set the number of columns. - -csmode Enable continuous search mode.
- -dopadding There is a buffer between the program and the tty.
- -exask Within the program, when "Ctrl+k+x" is executed, it first confirms whether to save the file.
- -force Force a newline character at the end of the last line.
- -help Display help when running the program.
- -keepup After entering the program, show a status line at the top of the screen.
- -lightoff After a block command is executed on the selected block, the highlighting returns to its original state.
- -lines
Set the number of lines. - -marking When selecting a block, the highlighted block follows the cursor movement.
- -mid When the cursor moves off the screen, scroll automatically so that the cursor returns to the center.
- -nobackups Do not create backup files.
- -nonotice Do not display copyright information when the program runs.
- -nosta Do not display the status line when the program runs.
- -noxon Attempt to disable the functions of the "Ctrl+s" and "Ctrl+q" keys.
- -orphan If more than one file is opened at the same time, the other files are placed in separate buffers instead of opening additional editing areas.
- -pg
The number of lines from the previous page to keep when paging with "PageUp" or "PageDown". - -skiptop
Do not use the specified number of lines at the top of the screen. - The following are file parameters
- +
Specify the line number where the cursor is placed when a file is opened. - -autoindent Automatic indentation.
- -crlf Use CR-LF characters for line breaks.
- -indentc
The characters actually inserted when indenting. - -istep
The number of indent characters moved each time indenting is performed. - -keymap
Use a different key binding configuration file. - -linums Add line numbers in front of each line.
- -lmargin
Set the left margin. - -overwrite Enable overwrite mode.
- -rmargin
Set the right margin. - -tab
Set the width of the tab. - -rdonly opens a file in read-only mode; -wordwrap automatically wraps lines when editing beyond the right boundary.
Example
Use the joe command to edit text files. For example, to edit the C source file main.c with joe, use the following command:
joe main.c
Similar to jed, the joe editor also displays C language syntax in color. The result is as follows:
I A main.c (c) Row 1 Col 1 12:28 Ctrl-K H for help
#Top row from left to right are the opened file name, cursor row and column, current time, and display operation description
/*-*- linux-c-*-*/ #Edit Area
#include
#include
#include
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;
}
** Joe's Own Editor v3.5 ** (utf-8) ** Copyright . 2006 ** #Version and copyright information of Joe's Editor
The joe editor has some commonly used key combinations. For example, you can get online help via Ctrl+K+H: first press the Ctrl+K combination, then type the letter H to bring up the help menu, which conveniently shows you how to operate the joe editor.
Linux Command Reference