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 All - [a]ll

Hides everything, then shows matching lines.

show lines matching Greet, case-insentive:

(equivalent to grep -i Greet sample.rs)

rxedit sample.rs a::Greet::i

Output

trait Greeter {
	fn greet(&self, name: &str) -> String;
impl Greeter for HelloApp {
	fn greet(&self, name: &str) -> String {
	app.greet("world")

More examples:

  • rxedit sample.rs a::Greet::Fi would do the same thing, but match as a fixed, case-insentive, string
  • rxedit sample.rs a::Greeter::A1 will work like grep -A 1 Greeter sample.rs

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