4 ms·
Not to diminish OP's project, but I pipe most things to vim to get all my standard highlighting goodness: cat file_name | vi -
by alfiedotwtf 12y ago
Not to diminish OP's project, but I pipe most things to vim to get all my standard highlighting goodness:
cat file_name | vi -
- mfontani 12y agoto avoid the "useless use of cat", I find this approach most welcome at the end of a long pipe, i.e.: grep ... files | sed ... | awk ... | vim -
- oops 12y agoI do something similar except with "view" aka "vi -R" aka read-only mode. A couple things I like about "view": 1. No warning screen when using "view file.c" if you or someone else happens to have the same file open for editing. 2. No "unsaved changes" prompt when quitting "view -" (or in other words, no need to force-quit with :q!) Edit: Also worth noting is that "view file.c" vs "cat file.c |view -" gives vim a better chance of getting the syntax highlighting right since it knows the file extension.
- deleted 12y ago[deleted]
- klibertp 12y agoMandatory mention: Emacs works here as well, but is less practical because of longer startup times.