We already alias "vi" to "vim" when the vim-enhanced package is installed. However, /usr/bin/view is a symlink to vi, which results in inconsistent behavior between the two - the "vi" command runs in vim mode, but the "view" command runs in vi mode. Alias "view" to "vim -R" when vim-enhanced is available so that these are consistent.
8 lines
134 B
Tcsh
8 lines
134 B
Tcsh
if ( -x /usr/bin/id ) then
|
|
if ( "`/usr/bin/id -u`" > 200 ) then
|
|
alias vi vim
|
|
alias view 'vim -R'
|
|
endif
|
|
endif
|
|
|