Linux command
ad 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Open a file
ad [path/to/file]
Open multiple files
ad [file1] [file2]
Run an edit script
ad -e "[script]" [path/to/file]
Run an edit script
ad -f [path/to/script] [path/to/file]
List open editor sessions
ad --list-sessions
说明
ad is a modal text editor written in Rust that combines vim-style modal editing with the extensibility philosophy of Plan 9's Acme editor. It features vim/kakoune-style text navigation and selection, emacs-inspired mini-buffer minor modes, sam/acme-style editing commands, and extension through external client programs via a built-in 9P file server. The editor supports tree-sitter based syntax highlighting, LSP completions, mouse-based navigation and UI resizing, multiple columns and buffers, scratch buffers, and customizable keybindings. Configuration is done through a TOML file.
参数
- -e, --expression _script_
- Execute an edit script inline
- -f, --script-file _file_
- Load and execute an edit script from a file
- -c, --config _path_
- Use a custom configuration file
- --default-config
- Override user config and use defaults
- -l, --list-sessions
- Display open editor sessions
- --rm-sockets
- Clean up unresponsive socket files
- -h, --help
- Display usage information
- -v, --version
- Show version details
FAQ
What is the ad command used for?
ad is a modal text editor written in Rust that combines vim-style modal editing with the extensibility philosophy of Plan 9's Acme editor. It features vim/kakoune-style text navigation and selection, emacs-inspired mini-buffer minor modes, sam/acme-style editing commands, and extension through external client programs via a built-in 9P file server. The editor supports tree-sitter based syntax highlighting, LSP completions, mouse-based navigation and UI resizing, multiple columns and buffers, scratch buffers, and customizable keybindings. Configuration is done through a TOML file.
How do I run a basic ad example?
Run `ad [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -e, --expression _script_ do in ad?
Execute an edit script inline