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