3 ms·
One thing I do a lot, inside of a screen session, is: $ cd workingdir $ vim conffile (edit, then within file press CTRL-Z, which suspends) $ start_prog
by sophacles 16y ago
One thing I do a lot, inside of a screen session, is:
$ cd workingdir
$ vim conffile
(edit, then within file press CTRL-Z, which suspends)
$ start_program
(notice errors or misbehaviours based on bad config)
$ fg
(edit config file some more, open different buffer)
** repeat untill things are happy **
This is a minimal use of job control, but it is nice.
Other uses include juggling several programs at once, sometimes screen gets too annoying for simple progress monitoring of several processes at once. (One window per command for say 20 commands, makes it difficult to switch through to find the one vim one, or the sql prompt... 3 on the other hand is fairly easy).
- johkra 16y agoYou can also use :!command to execute a command from within vim. This is handy to execute :!make for instance.
- sophacles 16y agoA lot of times yes, but others, the actions i simplify to "run process" are actually several commands based on output, to do things like verify side effects, etc. The scenario I describe is also very nice for developing shell scripts because of this.
- jallmann 16y agoActually in that case, just :make will suffice.
- nitrogen 16y agoYou can also use :sh to get to a shell, then type exit to get back to Vim.