.SH "ENVIRONMENT"
.
.TP
-\fBXPICKTITLE\fR
+\fBPICKTITLE\fR
If this variable is set its contents are used to populate the status region of the \fBpick\fR window\.
.
.SH "AUTHOR"
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "TIDE" "1" "May 2017" "" ""
+.TH "TIDE" "1" "June 2017" "" ""
.
.SH "NAME"
\fBtide\fR \- a text editor inspired by acme(1) from Plan 9 and Inferno
.
.TP
\fBCtrl+o\fR
-Launch pickfile(1) to choose a file from a recursive list of files in the current deirectory and sub directories\. This file will be opened in a new instance of \fBtide\fR\.
+Launch pickfile(1) to choose a file from a recursive list of files in the current directory and sub directories\. This file will be opened in a new instance of \fBtide\fR\.
+.
+.TP
+\fBCtrl+Shift+o\fR
+Launch pickfile(1) to choose a file from a recursive list of files in the current directory and sub directories\. This file will be opened in the current instance of \fBtide\fR replacing the currently open file\. In the event that the current instance of \fBtide\fR has modifications, the file will be opened in a new instance\.
.
.TP
\fBCtrl+p\fR
* `Ctrl+o`:
Launch pickfile(1) to choose a file from a recursive list of files in the
- current deirectory and sub directories. This file will be opened in a
- new instance of `tide`.
-
+ current directory and sub directories. This file will be opened in a new
+ instance of `tide`.
+
+* `Ctrl+Shift+o`:
+ Launch pickfile(1) to choose a file from a recursive list of files in the
+ current directory and sub directories. This file will be opened in the
+ current instance of `tide` replacing the currently open file. In the event
+ that the current instance of `tide` has modifications, the file will be
+ opened in a new instance.
+
* `Ctrl+p`:
Launch picktag(1) to select a tag from a ctags(1) generated index file.
`tide` will jump to the selected ctag definition in the current window if
static bool matches(Buf* buf, size_t* off, char* str);
static SyntaxSpan* mkspan(size_t beg, size_t end, size_t clr, SyntaxSpan* span);
-enum {
- /* standard colors */
- Normal = 4,
- Comment = 2,
- Literal = 14,
-
- /* diff colors */
- Added = 15,
- Deleted = 10,
- Location = 14,
- Info = 8,
-};
-
static SyntaxDef Syntaxes[] = {
{ /* this is also the default syntax if no match is found */
.name = "text",
char* file = cmdread(PickFileCmd, NULL);
if (file) {
file = chomp(file);
- if (!win_buf(EDIT)->path && !win_buf(EDIT)->modified) {
- buf_load(win_buf(EDIT), file);
+ if ((!win_buf(EDIT)->path || x11_keymodsset(ModShift)) &&
+ !win_buf(EDIT)->modified) {
+ view_init(win_view(EDIT), file, ondiagmsg);
} else {
OpenCmd[1] = file;
cmdrun(OpenCmd, NULL);
{ ModCtrl, 'h', highlight },
{ ModOneOrMore, 'f', search },
{ ModCtrl, 'd', execute },
- { ModCtrl, 'o', open_file },
+ { ModOneOrMore, 'o', open_file },
{ ModCtrl, 'p', pick_ctag },
{ ModOneOrMore, 'g', goto_ctag },
{ ModCtrl, 'n', new_win },