teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Functions
Various of editing chars in the buffer

Functions

virtual void teditor::Buffer::insert (char c)
 
virtual void teditor::Buffer::insert (const std::string &str)
 
void teditor::Buffer::remove (bool removeCurrent=false)
 main remove method More...
 
std::string teditor::Buffer::removeAndCopy ()
 
std::string teditor::Buffer::removeRegion (const Point &start, const Point &end)
 removes region between start and end More...
 
std::string teditor::Buffer::killLine (bool pushToStack=true)
 
void teditor::Buffer::sortRegion ()
 
void teditor::Buffer::keepRemoveLines (parser::NFA &regex, bool keep)
 Keep/Remove lines that match the input regex. More...
 
virtual void teditor::Buffer::clear ()
 

Detailed Description

Function Documentation

◆ clear()

void teditor::Buffer::clear ( )
virtual

clear buffer contents

Reimplemented in teditor::CmdMsgBar.

◆ insert() [1/2]

void teditor::Buffer::insert ( char  c)
virtual

insert a character at the current cursor location

Reimplemented in teditor::CmdMsgBar.

◆ insert() [2/2]

void teditor::Buffer::insert ( const std::string &  str)
virtual

insert a string at the current cursor location

Reimplemented in teditor::CmdMsgBar.

◆ keepRemoveLines()

void teditor::Buffer::keepRemoveLines ( parser::NFA regex,
bool  keep 
)

Keep/Remove lines that match the input regex.

Parameters
regexthe regular expression that needs to be matched
keepwhether to keep the matching lines or remove them

◆ killLine()

std::string teditor::Buffer::killLine ( bool  pushToStack = true)

kills lines at current cursor location onwards

◆ remove()

void teditor::Buffer::remove ( bool  removeCurrent = false)

main remove method

Parameters
removeCurrentwhether to remove the current char over the cursor

◆ removeAndCopy()

std::string teditor::Buffer::removeAndCopy ( )

remove a region and return its contents to be copied to clipboard

◆ removeRegion()

std::string teditor::Buffer::removeRegion ( const Point start,
const Point end 
)

removes region between start and end

Parameters
startstart of the region
endend of the region
Returns
string present in the deleted region

◆ sortRegion()

void teditor::Buffer::sortRegion ( )

sorts the lines in the region