From: Michael D. Lowis Date: Mon, 4 Nov 2019 21:45:20 +0000 (-0500) Subject: updated TODO and cleaned up config.h X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=a6fd8e35e201d135e12e6aa04236cfdb2ece56f6;p=projs%2Ftide.git updated TODO and cleaned up config.h --- diff --git a/TODO.md b/TODO.md index 19e4f12..3bb6107 100644 --- a/TODO.md +++ b/TODO.md @@ -4,6 +4,8 @@ ## STAGING +* picktag: reimplement in C using binary search +* fetch: add option to capture output of command * fetch: handle quotes around second arg * tide: move looping of cursor movements into selmoveby * all: eliminate multiple return statements and other lint @@ -15,8 +17,8 @@ * tide: gap buffer does not handle UTF-8 currently * tide: add tag to enable/disable scrolling on command output insertion * tide: encode EOL setting in log entries? -* tfetch: read rules from rcfile in home and curr dir -* tfetch: ls results instead of pcmanfm on right click directory +* fetch: read rules from rcfile in home and curr dir +* fetch: ls results instead of pcmanfm on right click directory * tcmd: 9term-like terminal window * anvil: support moving floating windows * anvil: add support for multiple workspaces diff --git a/config.h b/config.h index 2a198ce..45f48cd 100644 --- a/config.h +++ b/config.h @@ -12,11 +12,11 @@ enum { /* Color Names */ ClrCount }; -#define CMD_TIDE "!tide" -#define CMD_PICKFILE "!pickfile ." -#define CMD_COMPLETE "picktag print tags" +#define CMD_TIDE "!tide" +#define CMD_PICKFILE "!pickfile ." +#define CMD_COMPLETE "picktag print tags" #define CMD_FCOMPLETE "fcomplete" -#define CMD_GOTO_TAG "!picktag fetch tags" +#define CMD_GOTO_TAG "!picktag fetch tags" /* Command used to open file in editor at a given line */ static char* EditCmd[] = { "tide", "-l", 0, 0, 0 }; @@ -31,7 +31,7 @@ static char* SedCmd[] = { "sed", "-Ee", 0, 0 }; static char* FetchCmd[] = { "fetch", 0, 0 }; /* Default tag region text in editor windows */ -static char* TagString = "Del Put Undo Redo | Font Tabs Eol | Find "; +static char* TagString = "Del Put | Font Tabs Eol | x+ w+ !st | Find "; /* List of font patterns available to the editor */ static char* Fonts[2] = { @@ -45,17 +45,17 @@ static char* Fonts[2] = { #ifdef INCLUDE_DEFS /* Integer config options */ -int WinWidth = 640; -int WinHeight = 480; -int ScrollWidth = 5; -int Timeout = 100; -int TabWidth = 4; -int ScrollBy = 1; -int ClickTime = 500; -int CopyIndent = On; -int TrimOnSave = On; -int ExpandTabs = On; -int DosLineFeed = Off; +int WinWidth = 640; /* default window width */ +int WinHeight = 480; /* default window height */ +int ScrollWidth = 5; /* width in pixels of the scrollbar */ +int Timeout = 100; /* number of milliseconds to wait before poll() times out */ +int TabWidth = 4; /* number of spaces tab characters will be expanded to */ +int ScrollBy = 1; /* number of lines to scroll by on mouse wheel events */ +int ClickTime = 500; /* number of milliseconds after a click wehre multi-clicks will be recognized */ +int CopyIndent = On; /* whether indentation should be copied from previous line or not */ +int TrimOnSave = On; /* whether trailing whitespace should be removed on save or not */ +int ExpandTabs = On; /* whether tab characters should be expanded to spaces or not */ +int DosLineFeed = Off; /* use \r\n line endings by default */ #else int WinWidth, WinHeight, ScrollWidth, Timeout, TabWidth, ScrollBy, ClickTime, CopyIndent, TrimOnSave, ExpandTabs, DosLineFeed; @@ -78,59 +78,4 @@ static int Palette[ClrCount] = { [WinBdr] = 0x000000, /* Window border */ }; -#ifdef FETCH_RULES - -#ifdef __MACH__ - #define OPENCMD "open" -#else - #define OPENCMD "xdg-open" -#endif - -//static Rule* BuiltinRules[] = { -// (Rule[]){ /* Match URLS and open them with the browser */ -// { ISSET, "BROWSER", NULL }, -// { MATCHES, "data", "^(https?|ftp)://.*" }, -// { LAUNCH, "$BROWSER \"$M0\"", NULL }, -// { COMPLETE, NULL, NULL } -// }, -// (Rule[]){ /* Open files with addresses in the editor */ -// { MATCHES, "data", "^([^:]+):([0-9]+)" }, -// { ISFILE, "$M1", NULL }, -// { LAUNCH, "edit \"$M0\"", NULL }, -// { COMPLETE, NULL, NULL } -// }, -// (Rule[]){ /* Open addresses in the current file */ -// { MATCHES, "data", "^:?([0-9]+)" }, -// { ISFILE, "$file", NULL }, -// { LAUNCH, "edit \"$file:$M1\"", NULL }, -// { COMPLETE, NULL, NULL } -// }, -// (Rule[]){ /* If it's an existing text file, open it with editor */ -// { ISFILE, "$data", NULL }, -// { EXEC, "file --mime \"$file\" | grep -q 'text/'", NULL }, -// { LAUNCH, "edit \"$file\"", NULL }, -// { COMPLETE, NULL, NULL } -// }, -// (Rule[]){ /* Look it up in ctags database */ -// { ISFILE, "tags", NULL }, -// { EXEC, "grep -q \"^$data\\s\\+\" tags", NULL }, -// { LAUNCH, "picktag fetch tags \"$data\"", NULL }, -// { COMPLETE, NULL, NULL } -// }, -// (Rule[]){ /* Look up .c or .h files in Code/ */ -// { MATCHES, "data", "\\.[ch]$" }, -// { ISDIR, "Code", NULL }, -// { EXEC, "[[ \"$(find Code -type f -name \"*$data\")\" ]]", NULL }, -// { LAUNCH, "find Code -type f -name \"*$data\" | xargs -r edit", NULL }, -// { COMPLETE, NULL, NULL } -// }, -// (Rule[]){ /* If it's an existing directory, open it with system default */ -// { ISDIR, "$data", NULL }, -// { LAUNCH, "cd $data && ls -ap | tide -", NULL }, -// { COMPLETE, NULL, NULL } -// }, -//}; - -#endif - #pragma GCC diagnostic pop