teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
Functions | |
DEF_CMD (CursorDown, "cursor-down", "cursor_ops", DEF_OP() { ed.getBuff().down();}) | |
DEF_CMD (CursorUp, "cursor-up", "cursor_ops", DEF_OP() { ed.getBuff().up();}) | |
DEF_CMD (CursorRight, "cursor-right", "cursor_ops", DEF_OP() { ed.getBuff().right();}) | |
DEF_CMD (CursorLeft, "cursor-left", "cursor_ops", DEF_OP() { ed.getBuff().left();}) | |
DEF_CMD (CursorReset, "cursor-reset", "cursor_ops", DEF_OP() { ed.getBuff().begin();}) | |
DEF_CMD (CursorEnd, "cursor-end", "cursor_ops", DEF_OP() { auto &buf=ed.getBuff();const auto &w=ed.getWindow();buf.end();buf.lineEnd(w.start(), w.dim());}) | |
DEF_CMD (CursorHome, "cursor-home", "cursor_ops", DEF_OP() { ed.getBuff().startOfLine();}) | |
DEF_CMD (CursorLineEnd, "cursor-line-end", "cursor_ops", DEF_OP() { ed.getBuff().endOfLine();}) | |
DEF_CMD (PageDown, "page-down", "cursor_ops", DEF_OP() { auto jump=Option::get("pageScrollJump").getReal();auto &buf=ed.getBuff();buf.pageDown(int(jump *ed.getWindow().dim().y));}) | |
DEF_CMD (PageUp, "page-up", "cursor_ops", DEF_OP() { auto jump=Option::get("pageScrollJump").getReal();auto &buf=ed.getBuff();buf.pageUp(int(jump *ed.getWindow().dim().y));}) | |
DEF_CMD (NextPara, "next-para", "cursor_ops", DEF_OP() { ed.getBuff().nextPara();}) | |
DEF_CMD (PreviousPara, "previous-para", "cursor_ops", DEF_OP() { ed.getBuff().previousPara();}) | |
DEF_CMD (NextWord, "next-word", "cursor_ops", DEF_OP() { ed.getBuff().nextWord();}) | |
DEF_CMD (PreviousWord, "previous-word", "cursor_ops", DEF_OP() { ed.getBuff().previousWord();}) | |
DEF_CMD (MatchParen, "match-paren", "cursor_ops", DEF_OP() { auto &buff=ed.getBuff();auto &win=ed.getWindow();bool isOpen=buff.matchCurrentParen();isOpen? buff.lineUp(win.dim()) :buff.lineDown();}) | |
DEF_CMD (GotoLine, "goto-line", "cursor_ops", DEF_OP() { auto line=ed.prompt("Goto: ");int lineNum=str2num(line);ed.getBuff().gotoLine(lineNum, ed.getWindow().dim());}) | |
teditor::cursor::ops::DEF_CMD | ( | CursorDown | , |
"cursor-down" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().down();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | CursorEnd | , |
"cursor-end" | , | ||
"cursor_ops" | , | ||
DEF_OP() { auto &buf=ed.getBuff();const auto &w=ed.getWindow();buf.end();buf.lineEnd(w.start(), w.dim());} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | CursorHome | , |
"cursor-home" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().startOfLine();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | CursorLeft | , |
"cursor-left" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().left();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | CursorLineEnd | , |
"cursor-line-end" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().endOfLine();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | CursorReset | , |
"cursor-reset" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().begin();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | CursorRight | , |
"cursor-right" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().right();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | CursorUp | , |
"cursor-up" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().up();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | GotoLine | , |
"goto-line" | , | ||
"cursor_ops" | , | ||
DEF_OP() { auto line=ed.prompt("Goto: ");int lineNum=str2num(line);ed.getBuff().gotoLine(lineNum, ed.getWindow().dim());} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | MatchParen | , |
"match-paren" | , | ||
"cursor_ops" | , | ||
DEF_OP() { auto &buff=ed.getBuff();auto &win=ed.getWindow();bool isOpen=buff.matchCurrentParen();isOpen? buff.lineUp(win.dim()) :buff.lineDown();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | NextPara | , |
"next-para" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().nextPara();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | NextWord | , |
"next-word" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().nextWord();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | PageDown | , |
"page-down" | , | ||
"cursor_ops" | , | ||
DEF_OP() { auto jump=Option::get("pageScrollJump").getReal();auto &buf=ed.getBuff();buf.pageDown(int(jump *ed.getWindow().dim().y));} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | PageUp | , |
"page-up" | , | ||
"cursor_ops" | , | ||
DEF_OP() { auto jump=Option::get("pageScrollJump").getReal();auto &buf=ed.getBuff();buf.pageUp(int(jump *ed.getWindow().dim().y));} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | PreviousPara | , |
"previous-para" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().previousPara();} | |||
) |
teditor::cursor::ops::DEF_CMD | ( | PreviousWord | , |
"previous-word" | , | ||
"cursor_ops" | , | ||
DEF_OP() { ed.getBuff().previousWord();} | |||
) |