2015-09-23 10:59:05 +00:00
|
|
|
# plain vi (as bundled with SunOS 5.8)
|
|
|
|
# todo:
|
|
|
|
# -wn : Set the default window size to n
|
|
|
|
# +command : same as -c command
|
|
|
|
|
2016-08-27 13:37:18 +00:00
|
|
|
# Check if vi exists at all ( needed for vi --version )
|
|
|
|
if type -q vi
|
|
|
|
# Check if vi is really vim
|
2018-04-01 20:42:38 +00:00
|
|
|
if vi --version > /dev/null 2>/dev/null
|
2016-08-27 13:37:18 +00:00
|
|
|
complete -c vi -w vim
|
|
|
|
else
|
2017-10-11 17:17:35 +00:00
|
|
|
complete -c vi -s s -d 'Suppress all interactive user feedback'
|
|
|
|
complete -c vi -s C -d 'Encrypt/decrypt text'
|
|
|
|
complete -c vi -s l -d 'Set up for editing LISP programs'
|
|
|
|
complete -c vi -s L -d 'List saved file names after crash'
|
|
|
|
complete -c vi -s R -d 'Read-only mode'
|
|
|
|
complete -c vi -s S -d 'Use linear search for tags if tag file not sorted'
|
|
|
|
complete -c vi -s v -d 'Start in display editing state'
|
|
|
|
complete -c vi -s V -d 'Verbose mode'
|
|
|
|
complete -c vi -s x -d 'Encrypt/decrypt text'
|
|
|
|
complete -c vi -r -s r -d 'Recover file after crash'
|
|
|
|
complete -c vi -r -s t -d 'Edit the file containing a tag'
|
|
|
|
complete -c vi -r -c t -d 'Begin editing by executing the specified editor command'
|
2016-08-27 13:37:18 +00:00
|
|
|
end
|
2015-09-23 10:59:05 +00:00
|
|
|
end
|