diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-12-03 03:38:58 +0100 | 
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-04 02:07:39 +0200 | 
| commit | 51e817dc1be46947073529fa97bb07a6a8078dd4 (patch) | |
| tree | 5d3d5067cbc45e9cb421318ee2e6610227f0eb8e /runtime/syntax/perl.vim | |
| parent | fad748dfface98fa035747b7d2d4402228bae087 (diff) | |
| download | rneovim-51e817dc1be46947073529fa97bb07a6a8078dd4.tar.gz rneovim-51e817dc1be46947073529fa97bb07a6a8078dd4.tar.bz2 rneovim-51e817dc1be46947073529fa97bb07a6a8078dd4.zip | |
startup: stdin as text instead of commands
Treat stdin as text by default (so the "-" file is not needed):
    echo foo | nvim
It works with file args (implemented in next commit), too:
    echo foo | nvim file1.txt file2.txt
Why? Because:
- Execution of input is (1) almost always unintentional/confusing,
  and (2) potentially destructive.
- Avoids the need for time-delayed warning.  #7659
- The _common_ case is to open text in a buffer, not send commands.
Note:
- Not for Ex-mode (-es) because it is used by scripts.  But maybe `-Es`?
- Not for --headless, because stdio may be a protocol stream and may be
  used for any purpose by stdioopen().
To treat stdin as Normal-mode commands, use `-s -` instead:
    echo ifoo | nvim -s -
Other alternatives:
  - Replay a register. E.g. the following mostly works, except @q aborts
    on any "beep" (e.g. if the cursor can't move).
    nvim -c '%d q|norm @q' -
  - Future: Let `:%source` work with unsaved buffer contents?
closes #2087
closes #7659
Diffstat (limited to 'runtime/syntax/perl.vim')
0 files changed, 0 insertions, 0 deletions
