home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / amiga / vim46bin.lha / vim-4.6 / macros / shell.gui < prev    next >
Encoding:
Text File  |  1996-05-29  |  3.8 KB  |  95 lines

  1. " When you're writing shell scripts, are you then in doubt which
  2. " test to use, which shell environment variables that are defined,
  3. " the syntax of the case statement, and need to call 'man sh'?
  4. " Your problems are over now!
  5. " Attached is a vim 'so' file making vim to a shell script editor (in
  6. " graphics mode). It may also be used as an example how to use menues in Vim.
  7. "
  8. " Written by: Lennart Schultz <les@dmi.min.dk>
  9.  
  10. imenu Stmts.for    for  in 
  11. do
  12.  
  13. doneki    kk0elli
  14. imenu Stmts.case    case  in
  15. ) ;;
  16. esacbki    k0elli
  17. imenu Stmts.if    if   
  18. then
  19.  
  20. fiki    kk0elli
  21. imenu Stmts.if-else    if   
  22. then
  23.  
  24. else
  25.  
  26. fiki    kki    kk0elli
  27. imenu Stmts.elif    elif   
  28. then
  29.  
  30. ki    kk0elli
  31. imenu Stmts.while    while   
  32. do
  33.  
  34. doneki    kk0elli
  35. imenu Stmts.break    break 
  36. imenu Stmts.continue     continue 
  37. imenu Stmts.function    () {
  38.  
  39. }ki    k0i
  40. imenu Stmts.return    return 
  41. imenu Stmts.return-true    return 0
  42. imenu Stmts.return-false    return 1
  43. imenu Stmts.exit     exit 
  44. imenu Stmts.shift     shift 
  45. imenu Stmts.trap     trap 
  46. imenu Test.existence     [ -e  ]hi
  47. imenu Test.existence - file     [ -f  ]hi
  48. imenu Test.existence - file (not empty)     [ -s  ]hi
  49. imenu Test.existence - directory     [ -d  ]hi
  50. imenu Test.existence - executable     [ -x  ]hi
  51. imenu Test.existence - readable     [ -r  ]hi
  52. imenu Test.existence - writable     [ -w  ]hi
  53. imenu Test.String is empty [ x = "x$" ]hhi
  54. imenu Test.String is not empty [ x != "x$" ]hhi
  55. imenu Test.Strings is equal [ "" = "" ]hhhhhhhi
  56. imenu Test.Strings is not equal [ "" != "" ]hhhhhhhhi
  57. imenu Test.Values is greater than [  -gt  ]hhhhhhi
  58. imenu Test.Values is greater equal [  -ge  ]hhhhhhi
  59. imenu Test.Values is equal [  -eq  ]hhhhhhi
  60. imenu Test.Values is not equal [  -ne  ]hhhhhhi
  61. imenu Test.Values is less than [  -lt  ]hhhhhhi
  62. imenu Test.Values is less equal [  -le  ]hhhhhhi
  63. imenu ParmSub.Substitute word if parm not set ${:-}hhi
  64. imenu ParmSub.Set parm to word if not set ${:=}hhi
  65. imenu ParmSub.Substitute word if parm set else nothing ${:+}hhi
  66. imenu ParmSub.If parm not set print word and exit ${:?}hhi
  67. imenu SpShVars.Number of positional parameters ${#}
  68. imenu SpShVars.All positional parameters (quoted spaces) ${*}
  69. imenu SpShVars.All positional parameters (unquoted spaces) ${@}
  70. imenu SpShVars.Flags set ${-}
  71. imenu SpShVars.Return code of last command ${?}
  72. imenu SpShVars.Process number of this shell ${$}
  73. imenu SpShVars.Process number of last background command ${!}
  74. imenu Environ.HOME ${HOME}
  75. imenu Environ.PATH ${PATH}
  76. imenu Environ.CDPATH ${CDPATH}
  77. imenu Environ.MAIL ${MAIL}
  78. imenu Environ.MAILCHECK ${MAILCHECK}
  79. imenu Environ.PS1 ${PS1}
  80. imenu Environ.PS2 ${PS2}
  81. imenu Environ.IFS ${IFS}
  82. imenu Environ.SHACCT ${SHACCT}
  83. imenu Environ.SHELL ${SHELL}
  84. imenu Environ.LC_CTYPE ${LC_CTYPE}
  85. imenu Environ.LC_MESSAGES ${LC_MESSAGES}
  86. imenu Builtins.cd cd
  87. imenu Builtins.echo echo
  88. imenu Builtins.eval eval
  89. imenu Builtins.exec exec
  90. imenu Builtins.export export
  91. imenu Builtins.getopts getopts
  92. imenu Builtins.hash hash
  93. imenu Builtins.newgrp newgrp
  94. imenu Builtins.pwd pwd
  95. imenu Builtins.read read
  96. imenu Builtins.readonly readonly
  97. imenu Builtins.return return
  98. imenu Builtins.times times
  99. imenu Builtins.type type
  100. imenu Builtins.umask umask
  101. imenu Builtins.wait wait
  102. imenu Set.set set
  103. imenu Set.unset unset
  104. imenu Set.mark modified or modified variables set -a
  105. imenu Set.exit when command returns non-zero exit code set -e
  106. imenu Set.Disable file name generation set -f
  107. imenu Set.remember function commands set -h
  108. imenu Set.All keyword arguments are placed in the environment set -k
  109. imenu Set.Read commands but do not execute them set -n
  110. imenu Set.Exit after reading and executing one command set -t
  111. imenu Set.Treat unset variables as an error when substituting set -u
  112. imenu Set.Print shell input lines as they are read set -v
  113. imenu Set.Print commands and their arguments as they are executed set -x
  114.