Export from Rust Module
Each module contains a function, which we want to export.
Before
mod generate_demos;
mod mdbook_preprocessor;
mod validate;
After
mod generate_demos;
mod mdbook_preprocessor;
mod validate;
pub use generate_demos::generate_demos;
pub use mdbook_preprocessor::mdbook_preprocessor;
pub use validate::validate;
Preview
Command
%yp[<space>
<alt-s>gse
cpub use<esc>leypi::
%select all 3 "mod" statementsypduplicate them[<space>add a blank line above the 3 duplicated statements<alt-s>gsecreate 3 selections for each "mod" in the duplicated statementscpub use<esc>convert each "mod" into "pub use"leycopy name of each modulepduplicate name of each module at the end, since each module contains a function named the same as the modulei::add a double-colon path separator between them