Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Command more - [m]ore

Shows matching lines.

Example: show ‘message’

rxedit sample.rs more::message::o

  • more::message shows lines matching message.
  • ::o for a supported language, the “owner” (class, function, struct, etc…) gets shown

Output

fn make_message() -> String {
fn print_message(message: &str) {
    println!("{message}");
fn main() {
    let message = make_message();
    print_message(&message);

More examples:

  • rxedit sample.rs m::message::oFi same thing, but match as a fixed, case-insentive string
  • rxedit sample.rs m::message::A2 like grep -A 2 message sample.rs
  • rxedit sample.rs 'm::print..\(::g' uses .. shortcode to show any line matching print*(

Search flags

NameFormatExampleDescription
insensitivei::icase-insentive search
afterA(\d+)::A16Show NUM lines after each match.
beforeB(\d+)::B5Show NUM lines before each match.
contextC(\d+)::C5Show NUM lines before and after each match.
fixed_stringF::Ftreat search as regular string, not a regex
use_grep_shortcodesg::gexpands shortcodes (..→.*, ~~s.→ +)
no_use_grep_shortcodesG::Gdoes not expand grep shortcodes
show_ownero::oshow “owner” of the line
set keysk=([a-z]+)(?:.|/|$)::sk=importan/ set key to a value that can be used with wk=. in later commands
where_keywk=([a-z]+)(?:.|/|$)::wk=mykey/puts an extra criteria to other commands
where_linenumwl=([-0-9A-Ca-chtHT,.]+)::wl=..5,8,-1/limit line number range

SEE ALSO

shortcodes, chaining, noop