Up Next:
+* B2+B1 click executes command with selection as argument
+* right click to fetch file or line
+* Run commands in the background and don't block the main thread.
+* ignore the menu key or map it to control
+* Add a separate config option for pty tags
+* update man pages with new functionality
+
* moving from tags to the gutter does not transfer focus to edit region
* implement transaction control in buf.c
-* highlight all matches of search term
-* highlight classes of identifiers
* Add a way to CD using a builtin (buffers will track original dir)
* shortcut to jump to previous edit
* add command line flags to toggle options (Tabs, Indent, etc..)
* move by words is inconsistent. Example:
var infoId = 'readerinfo'+reader.id;
-* ignore the menu key or map it to control
The Future:
-* Ctrl+/ shortcut to comment/uncomment based on syntax
* Case insensitive search
* Ctrl+Up,Down requires two undos to revert.
* Ctrl+Up,Down with non line selection should track column
-* Scrolling line offset
* Ctrl+Shift+Enter copies indent of wrong line
-* Make Fn keys execute nth command in the tags buffers
-* jump to previous or next line with less indent
* use transaction ids to only mark buffer dirty when it really is
* refactor selection handling to buf.c to prepare for multiple selections.
* 100% coverage with unit and unit-integration tests
-* right click to fetch file or line
* tab inserts dont coalesce like one would expect
-* Run commands in the background and don't block the main thread.
-* shortcut to repeat previous operation
* implement command diffing logic to optimize the undo/redo log
* Status line should omit characters from beginning of path to make file path fit
* pickfile directory traversal when no tags file
Possible Shortcuts:
+* Ctrl+/ - to comment/uncomment based on syntax
* Ctrl+{,} - Move to start or end brace of block
* Ctrl+(,) - Move to start or end of paragraph
* Ctrl+' - Move to matching brace, bracket, or paren
+* Ctrl+. - repeat previous operation
Maybe think about addressing these later:
{n,m} From n to m matches
| Alternative
+# tcmd Tags
+
+build
+fetch
+ls
+cat
+cd
+
+
# Syntax Highlighting
Label, Conditional, Repeat, Character, Number, PreProc, Float, Operator, Structure
event_watchfd(PtyFD, INPUT, update, NULL);
}
-void pty_send(char* str) {
- if (!str) return;
- view_eof(win_view(EDIT), false);
+void send_string(char* str) {
size_t sz = strlen(str);
- bool has_eol = (str[sz-1] == '\n');
+ if (str[sz-1] == '\n') str[sz-1] = '\0';
while (*str) {
Rune rune = 0;
size_t length = 0;
while (!utf8decode(&rune, &length, *str++));
pty_send_rune(rune);
}
- if (!has_eol)
- pty_send_rune('\n');
+}
+
+void pty_send(char* cmd, char* arg) {
+ if (!cmd) return;
+ view_eof(win_view(EDIT), false);
+ send_string(cmd);
+ if (arg) {
+ pty_send_rune(' ');
+ send_string(arg);
+ }
+ pty_send_rune('\n');
}
void pty_send_rune(Rune rune) {
while (*cmd && !isspace(*cmd++));
tag_exec(tag, (*cmd ? stringdup(cmd) : NULL));
} else if (pty_active()) {
- pty_send(cmd);
+ char* arg = view_getstr(win_view(TAGS), NULL);
+ if (!arg) arg = view_getstr(win_view(EDIT), NULL);
+ pty_send(cmd, arg);
+ free(arg);
} else {
cmd_exec(cmd);
}
view_jumpto(win_view(FOCUSED), false, Marks[mark]);
}
+static void tag_send(char* cmd) {
+ pty_send(cmd, NULL);
+}
+
/* Main Routine
******************************************************************************/
static Tag Builtins[] = {
{ .tag = "Reload", .action.noarg = reload },
{ .tag = "Save", .action.noarg = save },
{ .tag = "SaveAs", .action.arg = saveas },
- { .tag = "Send", .action.arg = pty_send },
+ { .tag = "Send", .action.arg = tag_send },
{ .tag = "Tabs", .action.noarg = tabs },
{ .tag = "Undo", .action.noarg = tag_undo },
{ .tag = "LineNums", .action.noarg = tag_lnnum },