Cygwin package vim breaks the command 'view'
andkin773@fanclub.pm
andkin773@fanclub.pm
Sun Jun 1 15:18:01 GMT 2025
(I'm not sure if this reply is addressed correctly for the mailing list)
> did
> alias view >/dev/null 2>&1 || alias view=vim -R
> need quotes also ?
Yes.
To be honest, I don't understand why you ask this?
It's easier to see in interactive bash:
$ alias view=vim -R
-bash: alias: -R: not found
$ alias view
alias view='vim'
This alias will just run 'vim' without readonly-mode.
I discovered yesterday that this is very easy to overlook, because it not visible by default in vim in the terminal ;-)
Perhaps you fell in the same trap.
$ alias view="vim -R"
$ alias view
alias view='vim -R'
To check if vim has readonly-mode enabled:
:set readonly?
should print "readonly".
See also
:he statusline
to show readonly-mode in the status line.
Regards,
Coen
More information about the Cygwin
mailing list