Offers an address range for vi (ex).
More...
#include <wex/ex/addressrange.h>
|
| | addressrange (ex *ex, int lines=1) |
| | Constructor for a range from current position extending with number of lines.
|
| | addressrange (ex *ex, int begin_line, int end_line) |
| | Constructor for a range with specified begin and end line.
|
| | addressrange (ex *ex, const std::string &range) |
| | Constructor for a range (including visual range).
|
|
auto & | begin () const |
| | Returns begin address.
|
|
bool | copy (const address &destination) const |
| | Copies range to destination.
|
|
auto & | end () const |
| | Returns end address.
|
|
bool | erase () const |
| | Deletes range.
|
|
auto & | find_indicator () const |
| | Returns find indicator.
|
|
ex * | get_ex () const |
| | Returns ex component.
|
|
bool | is_ok () const |
| | Is this range ok.
|
|
bool | is_selection () const |
| | Is the begin and address '< and '>.
|
|
bool | join () const |
| | joins range.
|
| bool | parse (const command_parser &cp, info_message_t &msg) |
| | Parses this addressrange based on command parser.
|
|
const std::string | regex_commands () const |
| | Supported 2addr commands.
|
|
bool | shift_left () const |
| | Shifts the specified lines to the start of the line.
|
|
bool | shift_right () const |
| | Shifts the specified lines away from the start of the line.
|
|
bool | yank (char name='0') const |
| | Yanks range to register, default to yank register.
|
|
|
static auto & | data () |
| | Returns substitute data.
|
Offers an address range for vi (ex).
- The range is derived from a number of lines,
- or by a range string (including visual range for already selected text on the stc component). All methods return false if the range is not ok.
◆ addressrange() [1/3]
| wex::addressrange::addressrange |
( |
ex * | ex, |
|
|
int | lines = 1 ) |
|
explicit |
Constructor for a range from current position extending with number of lines.
- Parameters
-
| ex | the ex (or vi) component |
| lines | lines 1 is current line only lines 0 is illegal |
◆ addressrange() [2/3]
| wex::addressrange::addressrange |
( |
ex * | ex, |
|
|
int | begin_line, |
|
|
int | end_line ) |
|
explicit |
Constructor for a range with specified begin and end line.
- Parameters
-
| ex | the ex (or vi) component |
| begin_line | begin line |
| end_line | end line |
◆ addressrange() [3/3]
| wex::addressrange::addressrange |
( |
ex * | ex, |
|
|
const std::string & | range ) |
|
explicit |
Constructor for a range (including visual range).
- Parameters
-
| ex | the ex (or vi) component |
| range | the range, being a string containing:
- . : current line
- % : entire document
- * : current screen visible area
- x,y : range from begin x and end y address.
- : (empty), the range is empty
|
◆ parse()
| bool wex::addressrange::parse |
( |
const command_parser & | cp, |
|
|
info_message_t & | msg ) |
Parses this addressrange based on command parser.
Returns true if command is valid.
- Parameters
-
| cp | the command parser |
| msg | extra information in case command failed |