|
teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
Namespaces | |
| buffer | |
| calc | |
| cmbar | |
| cpp | |
| cursor | |
| dir | |
| editor | |
| grep | |
| ledger | |
| parser | |
| readonly | |
| text | |
| todo | |
| Utf8 | |
| watch | |
Classes | |
| struct | AllCombos |
| struct | Any |
| struct Impl /// More... | |
| struct | AttrColor |
| struct | AttrHelper |
| struct | Border |
| class | Buffer |
| class | Buffers |
| struct | Cell |
| class | CellBuffer |
| class | Choices |
| class | CmdMsgBar |
| struct | CmdRegistrar |
| struct | CmdStatus |
| struct | ColorHelper |
| class | ColorMap |
| class | DirCache |
| struct | DoubleBuffer |
| A simple double buffer container for ping-pong kind of operations. More... | |
| class | Editor |
| struct | FilePerm |
| class | FilesHist |
| class | History |
| Container to store history (files-visited or command-history, etc) More... | |
| struct | Impl |
| struct Impl /// More... | |
| struct | Impl< Head, Rest... > |
| struct | Impl<> |
| struct | InfoCmp |
| class | ISearch |
| Incremental search support used by Ctrl-F command. More... | |
| class | KeyCmdMap |
| struct | KeyCmdPair |
| struct | KeyCombo |
| class | Line |
| class | Logger |
| class | LRUCache |
| LRU Cache implementation. More... | |
| struct | MetaKey |
| class | Mode |
| struct | NameColorPair |
| class | Node |
| class | Option |
| Class to define an option used in the editor. More... | |
| struct | Pos2d |
| Any 2D position. More... | |
| struct | PromptYesNoKeys |
| struct | Remote |
| class | SingletonHandler |
| class | StringChoices |
| class | Terminal |
| class | Timer |
| Main object used for timing event. More... | |
| class | Trie |
| class | Window |
| class | Windows |
Typedefs | |
| typedef uint32_t | Chr |
| typedef bool(* | ChoicesFilter) (const std::string &, const std::string &) |
| typedef uint16_t | color_t |
| typedef void(* | OperateFunc) (Editor &ed) |
| typedef std::pair< OperateFunc, std::string > | Command |
| typedef std::unordered_map< std::string, Command > | CommandMap |
| typedef bool(* | CmdFilterOp) (const std::string &) |
| typedef std::unordered_map< std::string, std::string > | OptionMap |
| typedef std::vector< FilePerm > | Files |
| typedef std::pair< std::string, int > | FileInfo |
| typedef uint32_t | key_t |
| typedef Mode *(* | ModeCreator) () |
| typedef std::shared_ptr< Mode > | ModePtr |
| typedef std::unordered_map< std::string, ModeCreator > | ModeCreatorMap |
| typedef bool(* | InferMode) (const std::string &) |
| typedef std::unordered_map< std::string, InferMode > | ModeInferMap |
| typedef std::unordered_map< std::string, std::shared_ptr< Option > > | Options |
| typedef Pos2d< int > | Pos2di |
| typedef Pos2d< unsigned > | Pos2du |
| typedef Pos2d< size_t > | Pos2ds |
| typedef Pos2di | Point |
| typedef std::chrono::system_clock::time_point | TimePoint |
| typedef std::unordered_map< std::string, Timer > | Timers |
| typedef std::vector< std::string > | Strings |
Enumerations | |
| enum | TrieStatus { TS_NULL, TS_NON_LEAF, TS_LEAF } |
| enum | Func { Func_EnterCA, Func_ExitCA, Func_ShowCursor, Func_HideCursor, Func_ClearScreen, Func_Sgr0, Func_Underline, Func_Italic, Func_Bold, Func_Blink, Func_EnterKeypad, Func_ExitKeypad, Func_EnterMouse, Func_ExitMouse, Func_FuncsNum } |
| enum | EventType { Event_Key = 1, Event_Resize, Event_Mouse, Event_None = 0 } |
Functions | |
| bool | operator== (const Cell &a, const Cell &b) |
| bool | operator== (const AttrColor &a, const AttrColor &b) |
| bool | operator!= (const AttrColor &a, const AttrColor &b) |
| template<typename Colors > | |
| void | populateColorMap (ColorMap &cm, bool clear=false) |
| CommandMap & | cmds () |
| bool | defaultCmdFilterOp (const std::string &name) |
| const Command & | getCmd (const std::string &cmd) |
| Helper to return the command of interest. More... | |
| Strings | allCmdNames (CmdFilterOp filterOp=defaultCmdFilterOp) |
| Accessor function to the list of command names. More... | |
| std::string | remoteFileType (const std::string &f) |
| bool | isRemoteDir (const std::string &type) |
| bool | isDir (const std::string &f) |
| bool | isFile (const std::string &f) |
| bool | isReadOnly (const char *f) |
| void | makeDir (const std::string &d) |
| bool | isRemote (const std::string &f) |
| std::string | slurp (const std::string &file) |
| Strings | slurpToArr (const std::string &file) |
| std::string | getpwd () |
| bool | isAbs (const std::string &file) |
| std::string | rel2abs (const std::string &pwd, const std::string &rel) |
| std::string | basename (const std::string &file) |
| std::string | dirname (const std::string &file) |
| std::string | tempFileName () |
| std::string | findFirstUpwards (const std::string &dir, const std::string &file) |
| std::string | extension (const std::string &name) |
| bool | FileCompare (const FilePerm &a, const FilePerm &b) |
| Files | listDir (const std::string &dir) |
| Strings | listDirRel (const std::string &dir) |
| std::string | listDir2str (const std::string &dir) |
| void | copyFile (const std::string &in, const std::string &out) |
| FileInfo | readFileInfo (const std::string &arg) |
| bool | fileStrFind (const std::string &line, const std::string &str) |
| bool | isCurrentOrParentDir (const std::string &dir) |
| std::string | copyFromRemote (const std::string &file) |
| void | copyToRemote (const std::string &rfile, const std::string &local) |
| bool | strFindEmpty (const std::string &line, const std::string &str) |
| bool | iStrFindEmpty (const std::string &line, const std::string &str) |
| template<typename Keys > | |
| void | populateKeyMap (KeyCmdMap &kcm, bool clear=false) |
| bool | operator== (const MetaKey &mk1, const MetaKey &mk2) |
| bool | LineCompare (const Line &a, const Line &b) |
| ModeCreatorMap & | modes () |
| ModeInferMap & | infers () |
| Strings | allModeNames () |
| std::string | dnsLookup (const std::string &url, const std::string &domain) |
| Options & | options () |
| void | registerAllOptions () |
| void | parseRcFile (const std::string &rc) |
| bool | parseArgs (int argc, char **argv, std::vector< FileInfo > &files) |
| const char * | func2terminfo (Func f) |
| void | exitGracefully (int signum) |
| void | sigwinch_handler (int xxx) |
| bool | operator> (const struct timeval &ta, const struct timeval &tb) |
| const std::string & | timeFormat () |
| struct tm | toStructTm (const TimePoint &pt) |
| TimePoint | toTimePoint (struct tm &tm_) |
| std::string | timeToStr (const TimePoint &pt) |
| std::string | timeToDateStr (const TimePoint &pt) |
| std::string | currentTimeToStr () |
| TimePoint | timeFromStr (const std::string &dt) |
| int | dayOfWeek (const TimePoint &pt) |
| int | year (const TimePoint &pt) |
| int | month (const TimePoint &pt) |
| int | day (const TimePoint &pt) |
| void | addSecond (TimePoint &pt) |
| void | addMinute (TimePoint &pt) |
| void | addHour (TimePoint &pt) |
| void | addDay (TimePoint &pt, int times) |
| void | addWeek (TimePoint &pt, int times) |
| void | addMonth (TimePoint &pt) |
| void | addYear (TimePoint &pt) |
| TimePoint | addSecond (const TimePoint &pt) |
| TimePoint | addMinute (const TimePoint &pt) |
| TimePoint | addHour (const TimePoint &pt) |
| TimePoint | addDay (const TimePoint &pt, int times) |
| TimePoint | addWeek (const TimePoint &pt, int times) |
| TimePoint | addMonth (const TimePoint &pt) |
| TimePoint | addYear (const TimePoint &pt) |
| void | weekFor (TimePoint &start, TimePoint &end, const TimePoint &pt) |
| Timers & | getTimers () |
| Timer & | getTimer (const std::string &name) |
| void | tic (const std::string &name) |
| void | toc (const std::string &name) |
| void | resetTimers () |
| std::string | format (const char *fmt, va_list &vl) |
| std::string | format (const char *fmt,...) |
| std::string | env (const std::string &s) |
| bool | startsWith (const char *s1, int len1, const char *s2) |
| Strings | split (const std::string &str, char delim) |
| std::string | join (const Strings &s, char delim, int start, int end) |
| std::string | num2str (int num) |
| int | str2num (const std::string &str) |
| float | str2real (const std::string &str) |
| double | str2double (const std::string &str) |
| bool | isUnderGit (const std::string &dir) |
| std::string | gitBranchName (const std::string &dir) |
| CmdStatus | check_output (const std::string &cmd) |
| CmdStatus | check_output (const std::string &cmd, const std::string &host) |
| std::string | urlHexify (const std::string &url) |
| Hexify the input url. More... | |
| void | downloadUrl (const std::string &url, const std::string &file, const std::string &dnldProg="curl", const std::string &dnldProgOpts="-s") |
| Download the content of input url into the given file. More... | |
| std::string | downloadUrlToString (const std::string &url, const std::string &dnldProg="curl", const std::string &dnldProgOpts="-s") |
| Download the content of input url into a string. More... | |
| bool | isOpenParen (char c) |
| bool | isCloseParen (char c) |
| bool | isParen (char c) |
| char | getMatchingParen (char c) |
| std::string | expandEnvVars (const std::string &str) |
| bool | strFind (const std::string &line, const std::string &str) |
| bool | iStrFind (const std::string &line, const std::string &str) |
| void | dos2unix (std::string &in) |
| std::string | dos2unix (const std::string &in) |
| unsigned | numThreads () |
| bool | allStringsEmpty (const Strings &strs) |
| template<typename T > | |
| bool | same (const std::vector< T > &s1, const std::vector< T > &s2) |
| template<typename K , typename V > | |
| std::vector< K > | sortedKeys (const std::unordered_map< K, V > &map) |
Variables | |
| static const color_t | Attr_None = 0x0000 |
| static const color_t | Attr_Bold = 0x0100 |
| static const color_t | Attr_Underline = 0x0200 |
| static const color_t | Attr_Italic = 0x0400 |
| static const key_t | Meta_None = 0x00000000 |
| static const key_t | Meta_Shift = 0x00010000 |
| static const key_t | Meta_Alt = 0x00020000 |
| static const key_t | Meta_Ctrl = 0x00040000 |
| static const key_t | Meta_Motion = 0x00080000 |
| static const key_t | Key_F1 = (0xFFFF-0) |
| static const key_t | Key_F2 = (0xFFFF-1) |
| static const key_t | Key_F3 = (0xFFFF-2) |
| static const key_t | Key_F4 = (0xFFFF-3) |
| static const key_t | Key_F5 = (0xFFFF-4) |
| static const key_t | Key_F6 = (0xFFFF-5) |
| static const key_t | Key_F7 = (0xFFFF-6) |
| static const key_t | Key_F8 = (0xFFFF-7) |
| static const key_t | Key_F9 = (0xFFFF-8) |
| static const key_t | Key_F10 = (0xFFFF-9) |
| static const key_t | Key_F11 = (0xFFFF-10) |
| static const key_t | Key_F12 = (0xFFFF-11) |
| static const key_t | Key_Insert = (0xFFFF-12) |
| static const key_t | Key_Delete = (0xFFFF-13) |
| static const key_t | Key_Home = (0xFFFF-14) |
| static const key_t | Key_End = (0xFFFF-15) |
| static const key_t | Key_PageUp = (0xFFFF-16) |
| static const key_t | Key_PageDown = (0xFFFF-17) |
| static const key_t | Key_ArrowLeft = (0xFFFF-18) |
| static const key_t | Key_ArrowRight = (0xFFFF-19) |
| static const key_t | Key_ArrowDown = (0xFFFF-20) |
| static const key_t | Key_ArrowUp = (0xFFFF-21) |
| static const key_t | Key_MouseLeft = (0xFFFF-22) |
| static const key_t | Key_MouseRight = (0xFFFF-23) |
| static const key_t | Key_MouseMiddle = (0xFFFF-24) |
| static const key_t | Key_MouseRelease = (0xFFFF-25) |
| static const key_t | Key_MouseWheelUp = (0xFFFF-26) |
| static const key_t | Key_MouseWheelDown = (0xFFFF-27) |
| static const key_t | Key_CtrlTilde = 0x00 |
| static const key_t | Key_Ctrl2 = 0x00 |
| static const key_t | Key_CtrlA = 0x01 |
| static const key_t | Key_CtrlB = 0x02 |
| static const key_t | Key_CtrlC = 0x03 |
| static const key_t | Key_CtrlD = 0x04 |
| static const key_t | Key_CtrlE = 0x05 |
| static const key_t | Key_CtrlF = 0x06 |
| static const key_t | Key_CtrlG = 0x07 |
| static const key_t | Key_Backspace = 0x08 |
| static const key_t | Key_CtrlH = 0x08 |
| static const key_t | Key_Tab = 0x09 |
| static const key_t | Key_CtrlI = 0x09 |
| static const key_t | Key_CtrlJ = 0x0A |
| static const key_t | Key_CtrlK = 0x0B |
| static const key_t | Key_CtrlL = 0x0C |
| static const key_t | Key_Enter = 0x0D |
| static const key_t | Key_CtrlM = 0x0D |
| static const key_t | Key_CtrlN = 0x0E |
| static const key_t | Key_CtrlO = 0x0F |
| static const key_t | Key_CtrlP = 0x10 |
| static const key_t | Key_CtrlQ = 0x11 |
| static const key_t | Key_CtrlR = 0x12 |
| static const key_t | Key_CtrlS = 0x13 |
| static const key_t | Key_CtrlT = 0x14 |
| static const key_t | Key_CtrlU = 0x15 |
| static const key_t | Key_CtrlV = 0x16 |
| static const key_t | Key_CtrlW = 0x17 |
| static const key_t | Key_CtrlX = 0x18 |
| static const key_t | Key_CtrlY = 0x19 |
| static const key_t | Key_CtrlZ = 0x1A |
| static const key_t | Key_Esc = 0x1B |
| static const key_t | Key_CtrlLsqBracket = 0x1B |
| static const key_t | Key_Ctrl3 = 0x1B |
| static const key_t | Key_Ctrl4 = 0x1C |
| static const key_t | Key_CtrlBackslash = 0x1C |
| static const key_t | Key_Ctrl5 = 0x1D |
| static const key_t | Key_CtrlRsqBracket = 0x1D |
| static const key_t | Key_Ctrl6 = 0x1E |
| static const key_t | Key_Ctrl7 = 0x1F |
| static const key_t | Key_CtrlSlash = 0x1F |
| static const key_t | Key_CtrlUnderscore = 0x1F |
| static const key_t | Key_Space = (key_t)' ' |
| static const key_t | Key_Exclaim = (key_t)'!' |
| static const key_t | Key_DQuote = (key_t)'"' |
| static const key_t | Key_Hash = (key_t)'#' |
| static const key_t | Key_Dollar = (key_t)'$' |
| static const key_t | Key_Percent = (key_t)'%' |
| static const key_t | Key_Ampersand = (key_t)'&' |
| static const key_t | Key_SQuote = (key_t)'\'' |
| static const key_t | Key_BrktOpen = (key_t)'(' |
| static const key_t | Key_BrktClose = (key_t)')' |
| static const key_t | Key_Star = (key_t)'*' |
| static const key_t | Key_Plus = (key_t)'+' |
| static const key_t | Key_Comma = (key_t)',' |
| static const key_t | Key_Minus = (key_t)'-' |
| static const key_t | Key_Dot = (key_t)'.' |
| static const key_t | Key_Slash = (key_t)'/' |
| static const key_t | Key_Zero = (key_t)'0' |
| static const key_t | Key_One = (key_t)'1' |
| static const key_t | Key_Two = (key_t)'2' |
| static const key_t | Key_Three = (key_t)'3' |
| static const key_t | Key_Four = (key_t)'4' |
| static const key_t | Key_Five = (key_t)'5' |
| static const key_t | Key_Six = (key_t)'6' |
| static const key_t | Key_Seven = (key_t)'7' |
| static const key_t | Key_Eight = (key_t)'8' |
| static const key_t | Key_Nine = (key_t)'9' |
| static const key_t | Key_Colon = (key_t)':' |
| static const key_t | Key_SemiColo = (key_t)';' |
| static const key_t | Key_Lt = (key_t)'<' |
| static const key_t | Key_Question = (key_t)'?' |
| static const key_t | Key_At = (key_t)'@' |
| static const key_t | Key_A = (key_t)'A' |
| static const key_t | Key_B = (key_t)'B' |
| static const key_t | Key_C = (key_t)'C' |
| static const key_t | Key_D = (key_t)'D' |
| static const key_t | Key_E = (key_t)'E' |
| static const key_t | Key_F = (key_t)'F' |
| static const key_t | Key_G = (key_t)'G' |
| static const key_t | Key_H = (key_t)'H' |
| static const key_t | Key_I = (key_t)'I' |
| static const key_t | Key_J = (key_t)'J' |
| static const key_t | Key_K = (key_t)'K' |
| static const key_t | Key_L = (key_t)'L' |
| static const key_t | Key_M = (key_t)'M' |
| static const key_t | Key_N = (key_t)'N' |
| static const key_t | Key_O = (key_t)'O' |
| static const key_t | Key_P = (key_t)'P' |
| static const key_t | Key_Q = (key_t)'Q' |
| static const key_t | Key_R = (key_t)'R' |
| static const key_t | Key_S = (key_t)'S' |
| static const key_t | Key_T = (key_t)'T' |
| static const key_t | Key_U = (key_t)'U' |
| static const key_t | Key_V = (key_t)'V' |
| static const key_t | Key_W = (key_t)'W' |
| static const key_t | Key_X = (key_t)'X' |
| static const key_t | Key_Y = (key_t)'Y' |
| static const key_t | Key_Z = (key_t)'Z' |
| static const key_t | Key_SqBrktOpt = (key_t)'[' |
| static const key_t | Key_BackSlash = (key_t)'\\' |
| static const key_t | Key_SqBrktClose = (key_t)']' |
| static const key_t | Key_Caret = (key_t)'^' |
| static const key_t | Key_Underscore = (key_t)'_' |
| static const key_t | Key_Backtick = (key_t)'`' |
| static const key_t | Key_a = (key_t)'a' |
| static const key_t | Key_b = (key_t)'b' |
| static const key_t | Key_c = (key_t)'c' |
| static const key_t | Key_d = (key_t)'d' |
| static const key_t | Key_e = (key_t)'e' |
| static const key_t | Key_f = (key_t)'f' |
| static const key_t | Key_g = (key_t)'g' |
| static const key_t | Key_h = (key_t)'h' |
| static const key_t | Key_i = (key_t)'i' |
| static const key_t | Key_j = (key_t)'j' |
| static const key_t | Key_k = (key_t)'k' |
| static const key_t | Key_l = (key_t)'l' |
| static const key_t | Key_m = (key_t)'m' |
| static const key_t | Key_n = (key_t)'n' |
| static const key_t | Key_o = (key_t)'o' |
| static const key_t | Key_p = (key_t)'p' |
| static const key_t | Key_q = (key_t)'q' |
| static const key_t | Key_r = (key_t)'r' |
| static const key_t | Key_s = (key_t)'s' |
| static const key_t | Key_t = (key_t)'t' |
| static const key_t | Key_u = (key_t)'u' |
| static const key_t | Key_v = (key_t)'v' |
| static const key_t | Key_w = (key_t)'w' |
| static const key_t | Key_x = (key_t)'x' |
| static const key_t | Key_y = (key_t)'y' |
| static const key_t | Key_z = (key_t)'z' |
| static const key_t | Key_FBrktOpen = (key_t)'{' |
| static const key_t | Key_Line = (key_t)'|' |
| static const key_t | Key_FBrktClose = (key_t)'}' |
| static const key_t | Key_Tilde = (key_t)'~' |
| static const key_t | Key_Backspace2 = 0x7F |
| static const key_t | Key_Ctrl8 = 0x7F |
| static const key_t | Key_Invalid = 0xFFFFFFFF |
| typedef bool(* teditor::ChoicesFilter) (const std::string &, const std::string &) |
Functor to filter input string against a list of choices
| typedef uint32_t teditor::Chr |
| typedef bool(* teditor::CmdFilterOp) (const std::string &) |
command name filter
| typedef uint16_t teditor::color_t |
| typedef std::pair<OperateFunc, std::string> teditor::Command |
Main class to add operators onto the editor/buffer
| typedef std::unordered_map<std::string, Command> teditor::CommandMap |
list of all currently registered commands
| typedef std::pair<std::string, int> teditor::FileInfo |
| typedef std::vector<FilePerm> teditor::Files |
| typedef bool(* teditor::InferMode) (const std::string &) |
| typedef uint32_t teditor::key_t |
| typedef Mode*(* teditor::ModeCreator) () |
| typedef std::unordered_map<std::string,ModeCreator> teditor::ModeCreatorMap |
| typedef std::unordered_map<std::string,InferMode> teditor::ModeInferMap |
| typedef std::shared_ptr<Mode> teditor::ModePtr |
| typedef void(* teditor::OperateFunc) (Editor &ed) |
main lambda to operate on the editor/buffer
| typedef std::unordered_map<std::string, std::string> teditor::OptionMap |
| typedef std::unordered_map<std::string, std::shared_ptr<Option> > teditor::Options |
| typedef Pos2di teditor::Point |
cursor
| typedef Pos2d<int> teditor::Pos2di |
integer pos2d
| typedef Pos2d<size_t> teditor::Pos2ds |
size_t pos2d
| typedef Pos2d<unsigned> teditor::Pos2du |
unsigned integer pos2d
| typedef std::vector<std::string> teditor::Strings |
short-form for vector of strings
| typedef std::chrono::system_clock::time_point teditor::TimePoint |
| typedef std::unordered_map<std::string, Timer> teditor::Timers |
| enum teditor::EventType |
| enum teditor::Func |
| enum teditor::TrieStatus |
| void teditor::addDay | ( | TimePoint & | pt, |
| int | times | ||
| ) |
| void teditor::addHour | ( | TimePoint & | pt | ) |
| void teditor::addMinute | ( | TimePoint & | pt | ) |
| void teditor::addMonth | ( | TimePoint & | pt | ) |
| void teditor::addSecond | ( | TimePoint & | pt | ) |
| void teditor::addWeek | ( | TimePoint & | pt, |
| int | times | ||
| ) |
| void teditor::addYear | ( | TimePoint & | pt | ) |
| Strings teditor::allModeNames | ( | ) |
Accessor function to the list of mode names
|
inline |
whether all the strings internally are empty or not
| std::string teditor::basename | ( | const std::string & | file | ) |
| CmdStatus teditor::check_output | ( | const std::string & | cmd | ) |
| CmdStatus teditor::check_output | ( | const std::string & | cmd, |
| const std::string & | host | ||
| ) |
run the given command on the remote host and return its output
| CommandMap& teditor::cmds | ( | ) |
| void teditor::copyFile | ( | const std::string & | in, |
| const std::string & | out | ||
| ) |
| std::string teditor::copyFromRemote | ( | const std::string & | file | ) |
| void teditor::copyToRemote | ( | const std::string & | rfile, |
| const std::string & | local | ||
| ) |
| std::string teditor::currentTimeToStr | ( | ) |
| int teditor::day | ( | const TimePoint & | pt | ) |
| int teditor::dayOfWeek | ( | const TimePoint & | pt | ) |
| bool teditor::defaultCmdFilterOp | ( | const std::string & | name | ) |
default command name filter
| std::string teditor::dirname | ( | const std::string & | file | ) |
| std::string teditor::dnsLookup | ( | const std::string & | url, |
| const std::string & | domain | ||
| ) |
| std::string teditor::dos2unix | ( | const std::string & | in | ) |
| void teditor::dos2unix | ( | std::string & | in | ) |
| void teditor::downloadUrl | ( | const std::string & | url, |
| const std::string & | file, | ||
| const std::string & | dnldProg, | ||
| const std::string & | dnldProgOpts | ||
| ) |
Download the content of input url into the given file.
| std::string teditor::downloadUrlToString | ( | const std::string & | url, |
| const std::string & | dnldProg, | ||
| const std::string & | dnldProgOpts | ||
| ) |
Download the content of input url into a string.
| std::string teditor::env | ( | const std::string & | s | ) |
| void teditor::exitGracefully | ( | int | signum | ) |
| std::string teditor::expandEnvVars | ( | const std::string & | str | ) |
| std::string teditor::extension | ( | const std::string & | name | ) |
get file's extension from its name
| bool teditor::fileStrFind | ( | const std::string & | line, |
| const std::string & | str | ||
| ) |
Filter function while working with files
| std::string teditor::findFirstUpwards | ( | const std::string & | dir, |
| const std::string & | file | ||
| ) |
Tries to find the file starting from dir all the way uptill root
| std::string teditor::format | ( | const char * | fmt, |
| va_list & | vl | ||
| ) |
| std::string teditor::format | ( | const char * | fmt, |
| ... | |||
| ) |
helper function to convert formatted C-strings to std::string
| const char * teditor::func2terminfo | ( | Func | f | ) |
| char teditor::getMatchingParen | ( | char | c | ) |
| std::string teditor::getpwd | ( | ) |
| Timer & teditor::getTimer | ( | const std::string & | name | ) |
get the timer object of the given name
| Timers& teditor::getTimers | ( | ) |
| std::string teditor::gitBranchName | ( | const std::string & | dir | ) |
returns the current branch name of the dir
| ModeInferMap& teditor::infers | ( | ) |
| bool teditor::isAbs | ( | const std::string & | file | ) |
| bool teditor::isCloseParen | ( | char | c | ) |
| bool teditor::isCurrentOrParentDir | ( | const std::string & | dir | ) |
check if the file represents current dir or parent dir
| bool teditor::isDir | ( | const std::string & | f | ) |
| bool teditor::isFile | ( | const std::string & | f | ) |
| bool teditor::isOpenParen | ( | char | c | ) |
| bool teditor::isParen | ( | char | c | ) |
| bool teditor::isReadOnly | ( | const char * | f | ) |
| bool teditor::isRemote | ( | const std::string & | f | ) |
| bool teditor::isRemoteDir | ( | const std::string & | type | ) |
| bool teditor::iStrFind | ( | const std::string & | line, |
| const std::string & | str | ||
| ) |
Filter function that performs case insensitive find
| bool teditor::iStrFindEmpty | ( | const std::string & | line, |
| const std::string & | str | ||
| ) |
| bool teditor::isUnderGit | ( | const std::string & | dir | ) |
checks if the given dir is part of a git repo
| std::string teditor::join | ( | const Strings & | s, |
| char | delim, | ||
| int | start, | ||
| int | end | ||
| ) |
helper function to compare strings stored in the 2 lines. Very useful as a functor to be passed for the 'sort' function
| Files teditor::listDir | ( | const std::string & | dir | ) |
| std::string teditor::listDir2str | ( | const std::string & | dir | ) |
| Strings teditor::listDirRel | ( | const std::string & | dir | ) |
| void teditor::makeDir | ( | const std::string & | d | ) |
| ModeCreatorMap& teditor::modes | ( | ) |
| int teditor::month | ( | const TimePoint & | pt | ) |
| std::string teditor::num2str | ( | int | num | ) |
| unsigned teditor::numThreads | ( | ) |
| bool teditor::operator> | ( | const struct timeval & | ta, |
| const struct timeval & | tb | ||
| ) |
| Options& teditor::options | ( | ) |
| bool teditor::parseArgs | ( | int | argc, |
| char ** | argv, | ||
| std::vector< FileInfo > & | files | ||
| ) |
parse input commandline args
| void teditor::parseRcFile | ( | const std::string & | rc | ) |
| void teditor::populateColorMap | ( | ColorMap & | cm, |
| bool | clear = false |
||
| ) |
| void teditor::populateKeyMap | ( | KeyCmdMap & | kcm, |
| bool | clear = false |
||
| ) |
| FileInfo teditor::readFileInfo | ( | const std::string & | arg | ) |
| void teditor::registerAllOptions | ( | ) |
| std::string teditor::rel2abs | ( | const std::string & | pwd, |
| const std::string & | rel | ||
| ) |
| std::string teditor::remoteFileType | ( | const std::string & | f | ) |
| void teditor::resetTimers | ( | ) |
remove all the named timers created so far
| bool teditor::same | ( | const std::vector< T > & | s1, |
| const std::vector< T > & | s2 | ||
| ) |
whether the 2 vectors are same
| void teditor::sigwinch_handler | ( | int | xxx | ) |
| std::string teditor::slurp | ( | const std::string & | file | ) |
| Strings teditor::slurpToArr | ( | const std::string & | file | ) |
| std::vector<K> teditor::sortedKeys | ( | const std::unordered_map< K, V > & | map | ) |
| Strings teditor::split | ( | const std::string & | str, |
| char | delim | ||
| ) |
| bool teditor::startsWith | ( | const char * | s1, |
| int | len1, | ||
| const char * | s2 | ||
| ) |
| double teditor::str2double | ( | const std::string & | str | ) |
| int teditor::str2num | ( | const std::string & | str | ) |
| float teditor::str2real | ( | const std::string & | str | ) |
| bool teditor::strFind | ( | const std::string & | line, |
| const std::string & | str | ||
| ) |
Filter function that just performs std::string::find
| bool teditor::strFindEmpty | ( | const std::string & | line, |
| const std::string & | str | ||
| ) |
| std::string teditor::tempFileName | ( | ) |
| void teditor::tic | ( | const std::string & | name | ) |
start a named timer
| const std::string& teditor::timeFormat | ( | ) |
| TimePoint teditor::timeFromStr | ( | const std::string & | dt | ) |
| std::string teditor::timeToDateStr | ( | const TimePoint & | pt | ) |
| std::string teditor::timeToStr | ( | const TimePoint & | pt | ) |
| void teditor::toc | ( | const std::string & | name | ) |
stop the previously started named timer
| struct tm teditor::toStructTm | ( | const TimePoint & | pt | ) |
| TimePoint teditor::toTimePoint | ( | struct tm & | tm_ | ) |
| std::string teditor::urlHexify | ( | const std::string & | url | ) |
Hexify the input url.
| int teditor::year | ( | const TimePoint & | pt | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.17