dvtm-editor.1 (1715B)
1 .Dd December 27, 2016 2 .Dt DVTM-EDITOR 1 3 .Os dvtm VERSION 4 .Sh NAME 5 .Nm dvtm-editor 6 .Nd make a text editor act as a filter 7 . 8 . 9 .Sh SYNOPSIS 10 . 11 .Nm 12 ARGS... 13 . 14 . 15 .Sh DESCRIPTION 16 . 17 The 18 .Nm 19 is a file buffering utility used by the 20 .Xr dvtm 1 21 terminal multiplexer to implement its copy mode. It reads the standard input and saves it to a temporary 22 file, then opens an editor according to the 23 .Sx "ENVIRONMENT VARIABLES" . 24 .Pp 25 If the invoked editor terminates with a non-zero exit status or 26 the file modification time remains unchanged, 27 .Nm 28 does not output anything. Otherwise, it outputs the content of the modified temporary 29 file to stdout. 30 .Pp 31 All command line arguments are forwarded verbatim. 32 .Xr dvtm 1 33 uses this to adjust the initial view port by passing 34 .Sy +n , 35 meaning the start of line 36 .Sy n 37 should be displayed. 38 . 39 . 40 .Sh ENVIRONMENT VARIABLES 41 . 42 .Nm 43 will try to find the user editor by checking these variables in order: 44 . 45 .Bl -tag -width indent 46 .It Ev DVTM_EDITOR 47 Permitting to invoke an editor specific to dvtm, or set particular flags. 48 . 49 .It Ev VISUAL , Ev EDITOR 50 Falling back to global defaults: 51 .Ev VISUAL 52 and 53 .Ev EDITOR . 54 .El 55 .Pp 56 If no editor is found, 57 .Xr vi 1 58 is used. 59 . 60 . 61 .Sh FILES 62 . 63 The temporary files are created according to the template: 64 .Pa /tmp/dvtm-editor.XXXXXX . 65 .Pp 66 .Pa /dev/tty 67 is opened to obtain a controlling tty which is used for the standard input/output 68 streams of the invoked editor. 69 . 70 .Sh NOTES 71 . 72 Using 73 .Xr vis 1 74 as editor is particularly convenient because 75 .Ic :wq! 76 in visual mode will reduce the file to the currently active selection(s). 77 . 78 .Sh SEE ALSO 79 . 80 .Xr vi 1 , 81 .Xr dvtm 1 , 82 .Xr dvtm-pager 1 83 . 84 . 85 .Sh AUTHOR 86 . 87 dvtm is written by 88 .An Marc André Tanner Aq Mt mat at brain-dump.org