Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updated for version 7.0117

  • Loading branch information...
commit da0581fa739b192d14c3228d94869d230048e711 1 parent 6990095
vimboss authored

Showing 43 changed files with 2,298 additions and 878 deletions. Show diff stats Hide diff stats

  1. +3 0  Filelist
  2. +6 0 runtime/autoload/README.txt
  3. +173 0 runtime/autoload/gzip.vim
  4. +130 0 runtime/autoload/tar.vim
  5. +3 1 runtime/doc/index.txt
  6. +2 1  runtime/doc/insert.txt
  7. +20 15 runtime/doc/message.txt
  8. +3 3 runtime/doc/options.txt
  9. +19 1 runtime/doc/quickfix.txt
  10. +6 1 runtime/doc/quickref.txt
  11. +6 0 runtime/doc/tags
  12. +16 11 runtime/doc/todo.txt
  13. +27 1 runtime/doc/version7.txt
  14. +15 0 runtime/ftplugin/diff.vim
  15. +45 105 runtime/plugin/NetrwFileHandlers.vim
  16. +18 184 runtime/plugin/gzip.vim
  17. +25 176 runtime/plugin/tar.vim
  18. +914 0 runtime/spell/README_en.txt
  19. +1 1  runtime/spell/de/main.aap
  20. +2 2 runtime/spell/fr/main.aap
  21. +1 1  runtime/spell/he/main.aap
  22. +1 1  runtime/spell/pl/main.aap
  23. +17 0 runtime/syntax/tar.vim
  24. +2 2 src/Make_ivc.mak
  25. +15 3 src/Makefile
  26. +0 1  src/buffer.c
  27. +64 16 src/eval.c
  28. +4 0 src/ex_cmds.h
  29. +1 0  src/ex_docmd.c
  30. +0 2  src/globals.h
  31. +1 0  src/gui.c
  32. +16 3 src/main.aap
  33. +1 0  src/main.c
  34. +580 263 src/message.c
  35. +10 1 src/ops.c
  36. +2 0  src/proto/eval.pro
  37. +1 0  src/proto/message.pro
  38. +1 0  src/proto/quickfix.pro
  39. +1 0  src/proto/screen.pro
  40. +143 74 src/quickfix.c
  41. +1 2  src/screen.c
  42. +0 5 src/tag.c
  43. +2 2 src/version.h
3  Filelist
@@ -511,6 +511,8 @@ RT_SCRIPTS = \
511 511 runtime/delmenu.vim \
512 512 runtime/synmenu.vim \
513 513 runtime/makemenu.vim \
  514 + runtime/autoload/*.vim \
  515 + runtime/autoload/README.txt \
514 516 runtime/colors/*.vim \
515 517 runtime/colors/README.txt \
516 518 runtime/compiler/*.vim \
@@ -690,6 +692,7 @@ LANG_GEN = \
690 692
691 693 # generic language files, binary
692 694 LANG_GEN_BIN = \
  695 + runtime/spell/README_en.txt \
693 696 runtime/spell/en.ascii.spl \
694 697 runtime/spell/en.latin1.spl \
695 698 runtime/spell/en.utf-8.spl \
6 runtime/autoload/README.txt
... ... @@ -0,0 +1,6 @@
  1 +The autoload directory is for standard Vim autoload scripts.
  2 +
  3 +These are functions used by plugins and for general use. They will be loaded
  4 +automatically when the function is invoked. See ":help autoload".
  5 +
  6 +gzip.vim for editing compressed files
173 runtime/autoload/gzip.vim
... ... @@ -0,0 +1,173 @@
  1 +" Vim autoload file for editing compressed files.
  2 +" Maintainer: Bram Moolenaar <Bram@vim.org>
  3 +" Last Change: 2005 Jul 26
  4 +
  5 +" These functions are used by the gzip plugin.
  6 +
  7 +" Function to check that executing "cmd [-f]" works.
  8 +" The result is cached in s:have_"cmd" for speed.
  9 +fun s:check(cmd)
  10 + let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
  11 + if !exists("s:have_" . name)
  12 + let e = executable(name)
  13 + if e < 0
  14 + let r = system(name . " --version")
  15 + let e = (r !~ "not found" && r != "")
  16 + endif
  17 + exe "let s:have_" . name . "=" . e
  18 + endif
  19 + exe "return s:have_" . name
  20 +endfun
  21 +
  22 +" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
  23 +" the flags in the compressed file.
  24 +" The only compression methods that can be detected are max speed (-1) and max
  25 +" compression (-9).
  26 +fun s:set_compression(line)
  27 + " get the Compression Method
  28 + let l:cm = char2nr(a:line[2])
  29 + " if it's 8 (DEFLATE), we can check for the compression level
  30 + if l:cm == 8
  31 + " get the eXtra FLags
  32 + let l:xfl = char2nr(a:line[8])
  33 + " max compression
  34 + if l:xfl == 2
  35 + let b:gzip_comp_arg = "-9"
  36 + " min compression
  37 + elseif l:xfl == 4
  38 + let b:gzip_comp_arg = "-1"
  39 + endif
  40 + endif
  41 +endfun
  42 +
  43 +
  44 +" After reading compressed file: Uncompress text in buffer with "cmd"
  45 +fun gzip#read(cmd)
  46 + " don't do anything if the cmd is not supported
  47 + if !s:check(a:cmd)
  48 + return
  49 + endif
  50 +
  51 + " for gzip check current compression level and set b:gzip_comp_arg.
  52 + silent! unlet b:gzip_comp_arg
  53 + if a:cmd[0] == 'g'
  54 + call s:set_compression(getline(1))
  55 + endif
  56 +
  57 + " make 'patchmode' empty, we don't want a copy of the written file
  58 + let pm_save = &pm
  59 + set pm=
  60 + " remove 'a' and 'A' from 'cpo' to avoid the alternate file changes
  61 + let cpo_save = &cpo
  62 + set cpo-=a cpo-=A
  63 + " set 'modifiable'
  64 + let ma_save = &ma
  65 + setlocal ma
  66 + " when filtering the whole buffer, it will become empty
  67 + let empty = line("'[") == 1 && line("']") == line("$")
  68 + let tmp = tempname()
  69 + let tmpe = tmp . "." . expand("<afile>:e")
  70 + " write the just read lines to a temp file "'[,']w tmp.gz"
  71 + execute "silent '[,']w " . tmpe
  72 + " uncompress the temp file: call system("gzip -dn tmp.gz")
  73 + call system(a:cmd . " " . tmpe)
  74 + if !filereadable(tmp)
  75 + " uncompress didn't work! Keep the compressed file then.
  76 + echoerr "Error: Could not read uncompressed file"
  77 + return
  78 + endif
  79 + " delete the compressed lines; remember the line number
  80 + let l = line("'[") - 1
  81 + if exists(":lockmarks")
  82 + lockmarks '[,']d _
  83 + else
  84 + '[,']d _
  85 + endif
  86 + " read in the uncompressed lines "'[-1r tmp"
  87 + setlocal nobin
  88 + if exists(":lockmarks")
  89 + execute "silent lockmarks " . l . "r " . tmp
  90 + else
  91 + execute "silent " . l . "r " . tmp
  92 + endif
  93 +
  94 + " if buffer became empty, delete trailing blank line
  95 + if empty
  96 + silent $delete _
  97 + 1
  98 + endif
  99 + " delete the temp file and the used buffers
  100 + call delete(tmp)
  101 + silent! exe "bwipe " . tmp
  102 + silent! exe "bwipe " . tmpe
  103 + let &pm = pm_save
  104 + let &cpo = cpo_save
  105 + let &l:ma = ma_save
  106 + " When uncompressed the whole buffer, do autocommands
  107 + if empty
  108 + if &verbose >= 8
  109 + execute "doau BufReadPost " . expand("%:r")
  110 + else
  111 + execute "silent! doau BufReadPost " . expand("%:r")
  112 + endif
  113 + endif
  114 +endfun
  115 +
  116 +" After writing compressed file: Compress written file with "cmd"
  117 +fun gzip#write(cmd)
  118 + " don't do anything if the cmd is not supported
  119 + if s:check(a:cmd)
  120 + " Rename the file before compressing it.
  121 + let nm = resolve(expand("<afile>"))
  122 + let nmt = s:tempname(nm)
  123 + if rename(nm, nmt) == 0
  124 + if exists("b:gzip_comp_arg")
  125 + call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)
  126 + else
  127 + call system(a:cmd . " " . nmt)
  128 + endif
  129 + call rename(nmt . "." . expand("<afile>:e"), nm)
  130 + endif
  131 + endif
  132 +endfun
  133 +
  134 +" Before appending to compressed file: Uncompress file with "cmd"
  135 +fun gzip#appre(cmd)
  136 + " don't do anything if the cmd is not supported
  137 + if s:check(a:cmd)
  138 + let nm = expand("<afile>")
  139 +
  140 + " for gzip check current compression level and set b:gzip_comp_arg.
  141 + silent! unlet b:gzip_comp_arg
  142 + if a:cmd[0] == 'g'
  143 + call s:set_compression(readfile(nm, "b", 1)[0])
  144 + endif
  145 +
  146 + " Rename to a weird name to avoid the risk of overwriting another file
  147 + let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
  148 + let nmte = nmt . "." . expand("<afile>:e")
  149 + if rename(nm, nmte) == 0
  150 + if &patchmode != "" && getfsize(nm . &patchmode) == -1
  151 + " Create patchmode file by creating the decompressed file new
  152 + call system(a:cmd . " -c " . nmte . " > " . nmt)
  153 + call rename(nmte, nm . &patchmode)
  154 + else
  155 + call system(a:cmd . " " . nmte)
  156 + endif
  157 + call rename(nmt, nm)
  158 + endif
  159 + endif
  160 +endfun
  161 +
  162 +" find a file name for the file to be compressed. Use "name" without an
  163 +" extension if possible. Otherwise use a weird name to avoid overwriting an
  164 +" existing file.
  165 +fun s:tempname(name)
  166 + let fn = fnamemodify(a:name, ":r")
  167 + if !filereadable(fn) && !isdirectory(fn)
  168 + return fn
  169 + endif
  170 + return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
  171 +endfun
  172 +
  173 +" vim: set sw=2 :
130 runtime/autoload/tar.vim
... ... @@ -0,0 +1,130 @@
  1 +" vim:set ts=8 sts=4 sw=4:
  2 +"
  3 +" tar.vim -- a Vim plugin for browsing tarfiles
  4 +" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
  5 +" Distributed under the GNU General Public License.
  6 +"
  7 +" Version: 1.01
  8 +" Last Change: 2005 Jul 26
  9 +"
  10 +" Updates are available from <http://michael.toren.net/code/>. If you
  11 +" find this script useful, or have suggestions for improvements, please
  12 +" let me know.
  13 +" Also look there for further comments and documentation.
  14 +"
  15 +" This part defines the functions. The autocommands are in plugin/tar.vim.
  16 +
  17 +let s:version = "1.01"
  18 +
  19 +function! tar#Write(argument)
  20 + echo "ERROR: Sorry, no write support for tarfiles yet"
  21 +endfunction
  22 +
  23 +function! tar#Read(argument, cleanup)
  24 + let l:argument = a:argument
  25 + let l:argument = substitute(l:argument, '^tarfile:', '', '')
  26 + let l:argument = substitute(l:argument, '^\~', $HOME, '')
  27 +
  28 + let l:tarfile = l:argument
  29 + while 1
  30 + if (l:tarfile == "" || l:tarfile == "/")
  31 + echo "ERROR: Could not find a readable tarfile in path:" l:argument
  32 + return
  33 + endif
  34 +
  35 + if filereadable(l:tarfile) " found it!
  36 + break
  37 + endif
  38 +
  39 + let l:tarfile = fnamemodify(l:tarfile, ":h")
  40 + endwhile
  41 +
  42 + let l:toextract = strpart(l:argument, strlen(l:tarfile) + 1)
  43 +
  44 + if (l:toextract == "")
  45 + return
  46 + endif
  47 +
  48 + let l:cat = s:TarCatCommand(l:tarfile)
  49 + execute "r !" . l:cat . " < '" . l:tarfile . "'"
  50 + \ " | tar OPxf - '" . l:toextract . "'"
  51 +
  52 + if (a:cleanup)
  53 + 0d "blank line
  54 + execute "doautocmd BufReadPost " . expand("%")
  55 + setlocal readonly
  56 + silent preserve
  57 + endif
  58 +endfunction
  59 +
  60 +function! tar#Browse(tarfile)
  61 + setlocal noswapfile
  62 + setlocal buftype=nofile
  63 + setlocal bufhidden=hide
  64 + setlocal filetype=
  65 + setlocal nobuflisted
  66 + setlocal buftype=nofile
  67 + setlocal wrap
  68 + setlocal syntax=tar
  69 +
  70 + let l:tarfile = a:tarfile
  71 + let b:tarfile = l:tarfile
  72 + let l:cat = s:TarCatCommand(l:tarfile)
  73 +
  74 + if ! filereadable(l:tarfile)
  75 + let l:tarfile = substitute(l:tarfile, '^tarfile:', '', '')
  76 + endif
  77 +
  78 + if ! filereadable(l:tarfile)
  79 + echo "ERROR: File not readable:" l:tarfile
  80 + return
  81 + endif
  82 +
  83 + call s:Say("\" tar.vim version " . s:version)
  84 + call s:Say("\" Browsing tarfile " . l:tarfile)
  85 + call s:Say("\" Hit ENTER to view a file in a new window")
  86 + call s:Say("")
  87 +
  88 + silent execute "r!" . l:cat . "<'" . l:tarfile . "'| tar Ptf - "
  89 + 0d "blank line
  90 + /^$/1
  91 +
  92 + setlocal readonly
  93 + setlocal nomodifiable
  94 + noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
  95 +endfunction
  96 +
  97 +function! s:TarBrowseSelect()
  98 + let l:line = getline(".")
  99 +
  100 + if (l:line =~ '^" ')
  101 + return
  102 + endif
  103 +
  104 + if (l:line =~ '/$')
  105 + echo "Please specify a file, not a directory"
  106 + return
  107 + endif
  108 +
  109 + let l:selection = "tarfile:" . b:tarfile . "/" . l:line
  110 + new
  111 + wincmd _
  112 + execute "e " . l:selection
  113 +endfunction
  114 +
  115 +" kludge to deal with compressed archives
  116 +function! s:TarCatCommand(tarfile)
  117 + if a:tarfile =~# '\.\(gz\|tgz\|Z\)$'
  118 + let l:cat = "gzip -d -c"
  119 + elseif a:tarfile =~# '\.bz2$'
  120 + let l:cat = "bzip2 -d -c"
  121 + else
  122 + let l:cat = "cat"
  123 + endif
  124 + return l:cat
  125 +endfunction
  126 +
  127 +function! s:Say(string)
  128 + let @" = a:string
  129 + $ put
  130 +endfunction
4 runtime/doc/index.txt
... ... @@ -1,4 +1,4 @@
1   -*index.txt* For Vim version 7.0aa. Last change: 2005 Jul 06
  1 +*index.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1059,6 +1059,7 @@ The commands are sorted on the non-optional part of their name.
1059 1059 |:cNfile| :cNf[ile] go to last error in previous file
1060 1060 |:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
1061 1061 |:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
  1062 +|:caddfile| :cad[dfile] add error message to current quickfix list
1062 1063 |:call| :cal[l] call a function
1063 1064 |:catch| :cat[ch] part of a :try command
1064 1065 |:cbuffer| :cb[uffer] parse error messages and jump to first error
@@ -1066,6 +1067,7 @@ The commands are sorted on the non-optional part of their name.
1066 1067 |:cclose| :ccl[ose] close quickfix window
1067 1068 |:cd| :cd change directory
1068 1069 |:center| :ce[nter] format lines at the center
  1070 +|:cexpr| :cex[pr] read errors from expr and jump to first
1069 1071 |:cfile| :cf[ile] read file with error messages and jump to first
1070 1072 |:cfirst| :cfir[st] go to the specified error, default first one
1071 1073 |:cgetfile| :cg[etfile] read file with error messages
3  runtime/doc/insert.txt
... ... @@ -1,4 +1,4 @@
1   -*insert.txt* For Vim version 7.0aa. Last change: 2005 Apr 08
  1 +*insert.txt* For Vim version 7.0aa. Last change: 2005 Jul 26
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1004,6 +1004,7 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
1004 1004 Note that when using this command in a function or
1005 1005 script, the insertion only starts after the function
1006 1006 or script is finished.
  1007 + This command does not work from |:normal|.
1007 1008 {not in Vi}
1008 1009 {not available when compiled without the +ex_extra
1009 1010 feature}
35 runtime/doc/message.txt
... ... @@ -1,4 +1,4 @@
1   -*message.txt* For Vim version 7.0aa. Last change: 2005 Feb 13
  1 +*message.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -714,9 +714,10 @@ a user-defined command.
714 714
715 715 This is an (incomplete) overview of various messages that Vim gives:
716 716
717   - *hit-enter* *press-enter* *hit-return* *press-return* >
  717 + *hit-enter* *press-enter* *hit-return*
  718 + *press-return* *hit-enter-prompt*
718 719
719   - Hit ENTER or type command to continue
  720 + Press ENTER or type command to continue
720 721
721 722 This message is given when there is something on the screen for you to read,
722 723 and the screen is about to be redrawn:
@@ -724,10 +725,13 @@ and the screen is about to be redrawn:
724 725 - Something is displayed on the status line that is longer than the width of
725 726 the window, or runs into the 'showcmd' or 'ruler' output.
726 727
727   --> Hit <Enter> or <Space> to redraw the screen and continue, without that key
728   - being used otherwise.
729   --> Hit ":" or any other Normal mode command character to start that command.
730   --> Hit <C-Y> to copy (yank) a modeless selection to the clipboard register.
  728 +-> Press <Enter> or <Space> to redraw the screen and continue, without that
  729 + key being used otherwise.
  730 +-> Press ':' or any other Normal mode command character to start that command.
  731 +-> Press 'k', 'u' or 'b' to scroll back in the messages. This works the same
  732 + way as at the |more-prompt|. Only works when 'compatible' is off and
  733 + 'more' is on.
  734 +-> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
731 735 -> Use a menu. The characters defined for Cmdline-mode are used.
732 736 -> When 'mouse' contains the 'r' flag, clicking the left mouse button works
733 737 like pressing <Space>. This makes it impossible to select text though.
@@ -746,8 +750,7 @@ group.
746 750
747 751 *more-prompt* *pager* >
748 752 -- More --
749   - -- More -- (RET: line, SPACE: page, d: half page, q: quit)
750   - -- More -- (RET/BS: line, SPACE/b: page, d/u: half page, q: quit)
  753 + -- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit
751 754
752 755 This message is given when the screen is filled with messages. It is only
753 756 given when the 'more' option is on. It is highlighted with the |hl-MoreMsg|
@@ -755,11 +758,13 @@ group.
755 758
756 759 Type effect ~
757 760 <CR> or <NL> or j or <Down> one more line
  761 + d down a page (half a screen)
  762 + <Space> or <PageDown> down a screen
  763 +
758 764 <BS> or k or <Up> one line back (*)
759   - <Space> or <PageDown> next page
760   - b or <PageUp> previous page (*)
761   - d down half a page
762   - u up half a page (*)
  765 + u up a page (half a screen) (*)
  766 + b or <PageUp> back a screen (*)
  767 +
763 768 q, <Esc> or CTRL-C stop the listing
764 769 : stop the listing and enter a
765 770 command-line
@@ -771,8 +776,8 @@ Type effect ~
771 776
772 777 Any other key causes the meaning of the keys to be displayed.
773 778
774   -(*) backwards scrolling is only supported for these commands: >
775   - :clist
  779 +(*) backwards scrolling is {not in Vi}. Only scrolls back to where messages
  780 + started to scroll.
776 781 (**) Clicking the left mouse button only works:
777 782 - For the GUI: in the last line of the screen.
778 783 - When 'r' is included in 'mouse' (but then selecting text won't work).
6 runtime/doc/options.txt
... ... @@ -1,4 +1,4 @@
1   -*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 22
  1 +*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 26
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1028,7 +1028,7 @@ A jump table for the options with a short description can be found at |Q_op|.
1028 1028 Vim does not try to send a message to an external debugger (Netbeans
1029 1029 or Sun Workshop).
1030 1030
1031   - To check wether line breaks in the balloon text work use this check: >
  1031 + To check whether line breaks in the balloon text work use this check: >
1032 1032 if has("balloon_multiline")
1033 1033 <
1034 1034 *'binary'* *'bin'* *'nobinary'* *'nobin'*
@@ -1066,7 +1066,7 @@ A jump table for the options with a short description can be found at |Q_op|.
1066 1066 'bioskey' 'biosk' boolean (default on)
1067 1067 global
1068 1068 {not in Vi} {only for MS-DOS}
1069   - When on the bios is called to obtain a keyboard character. This works
  1069 + When on the BIOS is called to obtain a keyboard character. This works
1070 1070 better to detect CTRL-C, but only works for the console. When using a
1071 1071 terminal over a serial port reset this option.
1072 1072 Also see |'conskey'|.
20 runtime/doc/quickfix.txt
... ... @@ -1,4 +1,4 @@
1   -*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
  1 +*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -110,6 +110,11 @@ The following quickfix commands can be used:
110 110 Read the error file. Just like ":cfile" but don't
111 111 jump to the first error.
112 112
  113 + *:cad* *:caddfile*
  114 +:cad[dfile] [errorfile] Read the error file and add the errors from the
  115 + errorfile to the current quickfix list. If a quickfix
  116 + list is not present, then a new list is created.
  117 +
113 118 *:cb* *:cbuffer* *E681*
114 119 :cb[uffer] [bufnr] Read the error list from the current buffer.
115 120 When [bufnr] is given it must be the number of a
@@ -118,6 +123,19 @@ The following quickfix commands can be used:
118 123 A range can be specified for the lines to be used.
119 124 Otherwise all lines in the buffer are used.
120 125
  126 + *:cex* *:cexpr*
  127 +:cex[pr][!] {expr} Create a quickfix list using the result of {expr}.
  128 + If {expr} is a String, then each new-line terminated
  129 + line in the String is processed using 'errorformat'
  130 + and the result is added to the quickfix list.
  131 + If {expr} is a List, then each String item in the list
  132 + is processed and added to the quickfix list.
  133 + Non String items in the List are ignored. See |:cc|
  134 + for [!].
  135 + Examples: >
  136 + :cexpr system('grep -n xyz *')
  137 + :cexpr getline(1, '$')
  138 +<
121 139 *:cl* *:clist*
122 140 :cl[ist] [from] [, [to]]
123 141 List all errors that are valid |quickfix-valid|.
7 runtime/doc/quickref.txt
... ... @@ -1,4 +1,4 @@
1   -*quickref.txt* For Vim version 7.0aa. Last change: 2005 Jul 13
  1 +*quickref.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -933,6 +933,11 @@ Short explanation of each option: *option-list*
933 933 |:cprevious| :cp display the previous error
934 934 |:clist| :cl list all errors
935 935 |:cfile| :cf read errors from the file 'errorfile'
  936 +|:cgetfile| :cg like :cfile but don't jump to the first error
  937 +|:caddfile| :cad add errors from the error file to the current
  938 + quickfix list
  939 +|:cbuffer| :cb read errors from text in a buffer
  940 +|:cexpr| :cex read errors from an expression
936 941 |:cquit| :cq quit without writing and return error code (to
937 942 the compiler)
938 943 |:make| :make [args] start make, read errors, and jump to first
6 runtime/doc/tags
@@ -1753,6 +1753,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
1753 1753 :cabbrev map.txt /*:cabbrev*
1754 1754 :cabc map.txt /*:cabc*
1755 1755 :cabclear map.txt /*:cabclear*
  1756 +:cad quickfix.txt /*:cad*
  1757 +:caddfile quickfix.txt /*:caddfile*
1756 1758 :cal eval.txt /*:cal*
1757 1759 :call eval.txt /*:call*
1758 1760 :cat eval.txt /*:cat*
@@ -1766,6 +1768,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
1766 1768 :cd- editing.txt /*:cd-*
1767 1769 :ce change.txt /*:ce*
1768 1770 :center change.txt /*:center*
  1771 +:cex quickfix.txt /*:cex*
  1772 +:cexpr quickfix.txt /*:cexpr*
1769 1773 :cf quickfix.txt /*:cf*
1770 1774 :cfile quickfix.txt /*:cfile*
1771 1775 :cfir quickfix.txt /*:cfir*
@@ -5188,6 +5192,7 @@ histget() eval.txt /*histget()*
5188 5192 histnr() eval.txt /*histnr()*
5189 5193 history cmdline.txt /*history*
5190 5194 hit-enter message.txt /*hit-enter*
  5195 +hit-enter-prompt message.txt /*hit-enter-prompt*
5191 5196 hit-return message.txt /*hit-return*
5192 5197 hitest.vim syntax.txt /*hitest.vim*
5193 5198 hjkl usr_02.txt /*hjkl*
@@ -5828,6 +5833,7 @@ new-printing version6.txt /*new-printing*
5828 5833 new-runtime-dir version5.txt /*new-runtime-dir*
5829 5834 new-script version5.txt /*new-script*
5830 5835 new-script-5.4 version5.txt /*new-script-5.4*
  5836 +new-scroll-back version7.txt /*new-scroll-back*
5831 5837 new-search-path version6.txt /*new-search-path*
5832 5838 new-searchpat version6.txt /*new-searchpat*
5833 5839 new-session-files version5.txt /*new-session-files*
27 runtime/doc/todo.txt
... ... @@ -1,4 +1,4 @@
1   -*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
  1 +*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -58,13 +58,13 @@ Awaiting response:
58 58
59 59 PLANNED FOR VERSION 7.0:
60 60
61   -- Store messages to allow SCROLLING BACK for all commands. And other "less"
62   - like commands.
63 61 - "INTELLISENSE". First cleanup the Insert-mode completion.
64 62 http://www.vim.org/scripts/script.php?script_id=747
65 63 www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang)
66 64 http://sourceforge.net/projects/insenvim
67 65 of http://insenvim.sourceforge.net
  66 + IComplete: http://www.vim.org/scripts/script.php?script_id=1265
  67 + and http://stud4.tuwien.ac.at/~e0125672/icomplete/
68 68 http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
69 69 Ivan Villanueva has something for Java.
70 70 Ideas from Emads:
@@ -104,12 +104,21 @@ PLANNED FOR VERSION 7.0:
104 104 keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and
105 105 extension: ".filename.un~" (like swapfile but "un~" instead of "swp").
106 106 7 Support WINDOW TABS. Works like several pages, each with their own
107   - split windows. Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
108   - Don't forget to provide an "X" to close a tab.
109   - Also for the console!
  107 + split windows.
110 108 In Emacs these are called frames. Could also call them "pages".
111   - Use "1gt" - "99gt" to switch to a tab?
  109 + Use the name of the first buffer in the tab (ignoring the help window,
  110 + unless it's the only one). Add a number for the window count.
  111 + First make it work on the console. Use a line of text with highlighting.
  112 + Then add GUI Tabs for some systems.
  113 + Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
112 114 Simple patch for GTK by Luis M (nov 7).
  115 + Don't forget to provide an "X" to close a tab.
  116 + Implementation: keep the list of windows as-is. When switching to another
  117 + tab make the buffers in the current windows hidden, save the window
  118 + layout, buildup the other window layout and fill with buffers.
  119 + Need to be able to search the windows in inactive tabs, e.g. for the
  120 + quickfix window.
  121 + Use "1gt" - "99gt" to switch to a tab?
113 122 - EMBEDDING: Make it possible to run Vim inside a window of another program.
114 123 For Xwindows this can be done with XReparentWindow().
115 124 For GTK Neil Bird has a patch to use Vim like a widget.
@@ -238,10 +247,6 @@ Commands to use the location list:
238 247 :lgetfile idem, don't jump to first one
239 248 :lbuffer idem, from current buffer.
240 249
241   -7 Add a ":cstring" command. Works like ":cfile" but reads from a string
242   - variable. Also accept a list variable? Patch from Yegappan Lakshmanan.
243   - 2005 Feb 17 Now it's ":cexpr".
244   -
245 250 HTML indenting can be slow, find out why. Any way to do some kind of
246 251 profiling for Vim script? At least add a function to get the current time in
247 252 usec. reltime([start, [end]])
28 runtime/doc/version7.txt
... ... @@ -1,4 +1,4 @@
1   -*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 25
  1 +*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 27
2 2
3 3
4 4 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -25,6 +25,7 @@ MzScheme interface |new-MzScheme|
25 25 Printing multi-byte text |new-print-multi-byte|
26 26 Translated manual pages |new-manpage-trans|
27 27 Internal grep |new-vimgrep|
  28 +Scroll back in messages |new-scroll-back|
28 29 POSIX compatibility |new-posix|
29 30 Debugger support |new-debug-support|
30 31 Various new items |new-items-7|
@@ -227,6 +228,17 @@ expands into an arbitrary depth of directories. "**" can be used in all
227 228 places where file names are expanded, thus also with |:next| and |:args|.
228 229
229 230
  231 +Scroll back in messages *new-scroll-back*
  232 +-----------------------
  233 +
  234 +When displaying messages, at the |more-prompt| and the |hit-enter-prompt|, The
  235 +'k', 'u' and 'b' keys can be used to scroll back to previous messages. This
  236 +is especially useful for commands such as ":syntax", ":autocommand" and
  237 +":highlight". This is implemented in a generic way thus it works for all
  238 +commands and highlighting is kept. Only works when the 'more' option is set.
  239 +Previously it only partly worked for ":clist".
  240 +
  241 +
230 242 POSIX compatibility *new-posix*
231 243 -------------------
232 244
@@ -350,6 +362,12 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
350 362 |:sort| Sort lines in the buffer without depending on an
351 363 external command.
352 364
  365 +|:caddfile| Add error messages to an existing quickfix list
  366 + (Yegappan Lakshmanan).
  367 +
  368 +|:cexpr| Read error messages from a Vim expression (Yegappan
  369 + Lakshmanan).
  370 +
353 371
354 372 New functions: ~
355 373
@@ -1214,4 +1232,12 @@ When using command line completion for ":e *foo" and the file "+foo" exists
1214 1232 the resulting command ":e +foo" doesn't work. Now insert a backslash: ":e
1215 1233 \+foo".
1216 1234
  1235 +When the translation of "-- More --" was not 10 characters long the following
  1236 +message would be in the wrong position.
  1237 +
  1238 +At the more-prompt the last character in the last line wasn't drawn.
  1239 +
  1240 +When deleting non-existing text while 'virtualedit' is set the '[ and '] marks
  1241 +were not set.
  1242 +
1217 1243 vim:tw=78:ts=8:ft=help:norl:
15 runtime/ftplugin/diff.vim
... ... @@ -0,0 +1,15 @@
  1 +" Vim filetype plugin file
  2 +" Language: Diff
  3 +" Maintainer: Bram Moolenaar <Bram@vim.org>
  4 +" Last Change: 2005 Jul 27
  5 +
  6 +" Only do this when not done yet for this buffer
  7 +if exists("b:did_ftplugin")
  8 + finish
  9 +endif
  10 +let b:did_ftplugin = 1
  11 +
  12 +let b:undo_ftplugin = "setl modeline<"
  13 +
  14 +" Don't use modelines in a diff, they apply to the diffed file
  15 +setlocal nomodeline
150 runtime/plugin/NetrwFileHandlers.vim
... ... @@ -1,13 +1,13 @@
1 1 " NetrwFileHandlers: contains various extension-based file handlers for
2 2 " netrw's browsers' x command ("eXecute launcher")
3   -" Author: Charles E. Campbell, Jr.
4   -" Date: Aug 31, 2004
5   -" Version: 3
  3 +" Author: Charles E. Campbell, Jr.
  4 +" Date: Aug 31, 2004
  5 +" Version: 3
6 6
7 7 " ---------------------------------------------------------------------
8 8 " Prevent Reloading: {{{1
9 9 if exists("g:loaded_netrwfilehandlers") || &cp
10   - finish
  10 + finish
11 11 endif
12 12 let g:loaded_netrwfilehandlers= "v3"
13 13
@@ -15,22 +15,16 @@ let g:loaded_netrwfilehandlers= "v3"
15 15 " NetrwFileHandler_html: handles html when the user hits "x" when the {{{1
16 16 " cursor is atop a *.html file
17 17 fun! NetrwFileHandler_html(pagefile)
18   -" call Dfunc("NetrwFileHandler_html(".a:pagefile.")")
19   -
20   - let page= substitute(a:pagefile,'^','file://','')
  18 + let page = substitute(a:pagefile, '^', 'file://', '')
21 19
22 20 if executable("mozilla")
23   -" call Decho("executing !mozilla ".page)
24   - exe "!mozilla \"".page.'"'
  21 + exe "!mozilla \"" . page . '"'
25 22 elseif executable("netscape")
26   -" call Decho("executing !netscape ".page)
27   - exe "!netscape \"".page.'"'
  23 + exe "!netscape \"" . page . '"'
28 24 else
29   -" call Dret("NetrwFileHandler_html 0")
30   - return 0
  25 + return 0
31 26 endif
32 27
33   -" call Dret("NetrwFileHandler_html 1")
34 28 return 1
35 29 endfun
36 30
@@ -38,240 +32,192 @@ endfun
38 32 " NetrwFileHandler_htm: handles html when the user hits "x" when the {{{1
39 33 " cursor is atop a *.htm file
40 34 fun! NetrwFileHandler_htm(pagefile)
41   -" call Dfunc("NetrwFileHandler_htm(".a:pagefile.")")
42   -
43   - let page= substitute(a:pagefile,'^','file://','')
  35 + let page = substitute(a:pagefile, '^', 'file://', '')
44 36
45 37 if executable("mozilla")
46   -" call Decho("executing !mozilla ".page)
47   - exe "!mozilla \"".page.'"'
  38 + exe "!mozilla \"" . page . '"'
48 39 elseif executable("netscape")
49   -" call Decho("executing !netscape ".page)
50   - exe "!netscape \"".page.'"'
  40 + exe "!netscape \"" . page . '"'
51 41 else
52   -" call Dret("NetrwFileHandler_htm 0")
53   - return 0
  42 + return 0
54 43 endif
55 44
56   -" call Dret("NetrwFileHandler_htm 1")
57 45 return 1
58 46 endfun
59 47
60 48 " ---------------------------------------------------------------------
61 49 " NetrwFileHandler_jpg: {{{1
62 50 fun! NetrwFileHandler_jpg(jpgfile)
63   -" call Dfunc("NetrwFileHandler_jpg(jpgfile<".a:jpgfile.">)")
64   -
65 51 if executable("gimp")
66   - exe "silent! !gimp -s ".a:jpgfile
  52 + exe "silent! !gimp -s " . a:jpgfile
67 53 elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
68   -" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
69   - exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
  54 + exe "!" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:jpgfile . '"'
70 55 else
71   -" call Dret("NetrwFileHandler_jpg 0")
72   - return 0
  56 + return 0
73 57 endif
74 58
75   -" call Dret("NetrwFileHandler_jpg 1")
76 59 return 1
77 60 endfun
78 61
79 62 " ---------------------------------------------------------------------
80 63 " NetrwFileHandler_gif: {{{1
81 64 fun! NetrwFileHandler_gif(giffile)
82   -" call Dfunc("NetrwFileHandler_gif(giffile<".a:giffile.">)")
83   -
84 65 if executable("gimp")
85   - exe "silent! !gimp -s ".a:giffile
86   - elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
87   - exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
  66 + exe "silent! !gimp -s " . a:giffile
  67 + elseif executable(expand("$SystemRoot") . "/SYSTEM32/MSPAINT.EXE")
  68 + exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:giffile . '"'
88 69 else
89   -" call Dret("NetrwFileHandler_gif 0")
90 70 return 0
91 71 endif
92 72
93   -" call Dret("NetrwFileHandler_gif 1")
94 73 return 1
95 74 endfun
96 75
97 76 " ---------------------------------------------------------------------
98 77 " NetrwFileHandler_png: {{{1
99 78 fun! NetrwFileHandler_png(pngfile)
100   -" call Dfunc("NetrwFileHandler_png(pngfile<".a:pngfile.">)")
101   -
102 79 if executable("gimp")
103   - exe "silent! !gimp -s ".a:pngfile
104   - elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
105   - exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
  80 + exe "silent! !gimp -s " . a:pngfile
  81 + elseif executable(expand("$SystemRoot") . "/SYSTEM32/MSPAINT.EXE")
  82 + exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:pngfile . '"'
106 83 else
107   -" call Dret("NetrwFileHandler_png 0")
108 84 return 0
109 85 endif
110 86
111   -" call Dret("NetrwFileHandler_png 1")
112 87 return 1
113 88 endfun
114 89
115 90 " ---------------------------------------------------------------------
116 91 " NetrwFileHandler_pnm: {{{1
117 92 fun! NetrwFileHandler_pnm(pnmfile)
118   -" call Dfunc("NetrwFileHandler_pnm(pnmfile<".a:pnmfile.">)")
119   -
120 93 if executable("gimp")
121   - exe "silent! !gimp -s ".a:pnmfile
122   - elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
123   - exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
  94 + exe "silent! !gimp -s " . a:pnmfile
  95 + elseif executable(expand("$SystemRoot") . "/SYSTEM32/MSPAINT.EXE")
  96 + exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:pnmfile . '"'
124 97 else
125   -" call Dret("NetrwFileHandler_pnm 0")
126 98 return 0
127 99 endif
128 100
129   -" call Dret("NetrwFileHandler_pnm 1")
130 101 return 1
131 102 endfun
132 103
133 104 " ---------------------------------------------------------------------
134 105 " NetrwFileHandler_bmp: visualize bmp files {{{1
135 106 fun! NetrwFileHandler_bmp(bmpfile)
136   -" call Dfunc("NetrwFileHandler_bmp(bmpfile<".a:bmpfile.">)")
137   -
138 107 if executable("gimp")
139   - exe "silent! !gimp -s ".a:bmpfile
  108 + exe "silent! !gimp -s " . a:bmpfile
140 109 elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
141   - exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:bmpfile.'"'
  110 + exe "silent! !" . expand("$SystemRoot") . "/SYSTEM32/MSPAINT \"" . a:bmpfile . '"'
142 111 else
143   -" call Dret("NetrwFileHandler_bmp 0")
144 112 return 0
145 113 endif
146 114
147   -" call Dret("NetrwFileHandler_bmp 1")
148 115 return 1
149 116 endfun
150 117
151 118 " ---------------------------------------------------------------------
152 119 " NetrwFileHandler_pdf: visualize pdf files {{{1
153 120 fun! NetrwFileHandler_pdf(pdf)
154   -" " call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)")
155   - if executable("gs")
156   - exe 'silent! !gs "'.a:pdf.'"'
  121 + if executable("acroread")
  122 + exe 'silent! !acroread "' . a:pdf . '"'
  123 + elseif executable("gs")
  124 + exe 'silent! !gs "' . a:pdf . '"'
157 125 else
158   -" " call Dret("NetrwFileHandler_pdf 0")
159 126 return 0
160 127 endif
161 128
162   -" " call Dret("NetrwFileHandler_pdf 1")
163 129 return 1
164 130 endfun
165 131
166 132 " ---------------------------------------------------------------------
167 133 " NetrwFileHandler_sxw: visualize sxw files {{{1
168 134 fun! NetrwFileHandler_sxw(sxw)
169   -" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
170 135 if executable("gs")
171   - exe 'silent! !gs "'.a:sxw.'"'
  136 + exe 'silent! !gs "' . a:sxw . '"'
172 137 else
173   -" " call Dret("NetrwFileHandler_sxw 0")
174 138 return 0
175 139 endif
176 140
177   -" " call Dret("NetrwFileHandler_sxw 1")
178 141 return 1
179 142 endfun
180 143
181 144 " ---------------------------------------------------------------------
182 145 " NetrwFileHandler_doc: visualize doc files {{{1
183 146 fun! NetrwFileHandler_doc(doc)
184   -" " call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)")
185   -
186 147 if executable("oowriter")
187   - exe 'silent! !oowriter "'.a:doc.'"'
  148 + exe 'silent! !oowriter "' . a:doc . '"'
188 149 redraw!
189 150 else
190   -" " call Dret("NetrwFileHandler_doc 0")
191 151 return 0
192 152 endif
193 153
194   -" " call Dret("NetrwFileHandler_doc 1")
195 154 return 1
196 155 endfun
197 156
198 157 " ---------------------------------------------------------------------
199 158 " NetrwFileHandler_sxw: visualize sxw files {{{1
200 159 fun! NetrwFileHandler_sxw(sxw)
201   -" " call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
202   -
203 160 if executable("oowriter")
204   - exe 'silent! !oowriter "'.a:sxw.'"'
  161 + exe 'silent! !oowriter "' . a:sxw . '"'
205 162 redraw!
206 163 else
207   -" " call Dret("NetrwFileHandler_sxw 0")
208 164 return 0
209 165 endif
210 166
211   -" " call Dret("NetrwFileHandler_sxw 1")
212 167 return 1
213 168 endfun
214 169
215 170 " ---------------------------------------------------------------------
216 171 " NetrwFileHandler_xls: visualize xls files {{{1
217 172 fun! NetrwFileHandler_xls(xls)
218   -" " call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)")
219   -
220 173 if executable("oocalc")
221   - exe 'silent! !oocalc "'.a:xls.'"'
  174 + exe 'silent! !oocalc "' . a:xls . '"'
222 175 redraw!
223 176 else
224   -" " call Dret("NetrwFileHandler_xls 0")
225 177 return 0
226 178 endif
227 179
228   -" " call Dret("NetrwFileHandler_xls 1")
229 180 return 1
230 181 endfun
231 182
232 183 " ---------------------------------------------------------------------
233 184 " NetrwFileHandler_ps: handles PostScript files {{{1
234 185 fun! NetrwFileHandler_ps(ps)
235   -" call Dfunc("NetrwFileHandler_ps()")
236 186 if executable("gs")
237   - exe "silent! !gs ".a:ps
  187 + exe "silent! !gs " . a:ps
238 188 redraw!
239 189 elseif executable("ghostscript")
240   - exe "silent! !ghostscript ".a:ps
  190 + exe "silent! !ghostscript " . a:ps
241 191 redraw!
242 192 elseif executable("ghostscript")
243   - exe "silent! !ghostscript ".a:ps
  193 + exe "silent! !ghostscript " . a:ps
244 194 redraw!
245 195 elseif executable("gswin32")
246   - exe "silent! !gswin32 \"".a:ps.'"'
  196 + exe "silent! !gswin32 \"" . a:ps . '"'
247 197 redraw!
248 198 else
249   -" call Dret("NetrwFileHandler_ps 0")
250 199 return 0
251 200 endif
252 201
253   -" call Dret("NetrwFileHandler_ps 1")
254 202 return 1
255 203 endfun
256 204
257 205 " ---------------------------------------------------------------------
258 206 " NetrwFileHandler_eps: handles encapsulated PostScript files {{{1
259 207 fun! NetrwFileHandler_eps(eps)
260   -" call Dfunc("NetrwFileHandler_ps()")
261 208 if executable("gs")
262   - exe "silent! !gs ".a:eps
  209 + exe "silent! !gs " . a:eps
263 210 redraw!
264 211 elseif executable("ghostscript")
265   - exe "silent! !ghostscript ".a:eps
  212 + exe "silent! !ghostscript " . a:eps
266 213 redraw!
267 214 elseif executable("ghostscript")
268   - exe "silent! !ghostscript ".a:eps
  215 + exe "silent! !ghostscript " . a:eps
269 216 redraw!
270 217 elseif executable("gswin32")
271   - exe "silent! !gswin32 \"".a:eps.'"'
  218 + exe "silent! !gswin32 \"" . a:eps . '"'
272 219 redraw!
273 220 else
274   -" call Dret("NetrwFileHandler_ps 0")
275 221 return 0
276 222 endif
277 223 endfun
@@ -279,35 +225,29 @@ endfun
279 225 " ---------------------------------------------------------------------
280 226 " NetrwFileHandler_fig: handles xfig files {{{1
281 227 fun! NetrwFileHandler_fig(fig)
282   -" call Dfunc("NetrwFileHandler_fig()")
283 228 if executable("xfig")
284   - exe "silent! !xfig ".a:fig
  229 + exe "silent! !xfig " . a:fig
285 230 redraw!
286 231 else
287   -" call Dret("NetrwFileHandler_fig 0")
288 232 return 0
289 233 endif
290 234
291   -" call Dret("NetrwFileHandler_fig 1")
292 235 return 1
293 236 endfun
294 237
295 238 " ---------------------------------------------------------------------
296 239 " NetrwFileHandler_obj: handles tgif's obj files {{{1
297 240 fun! NetrwFileHandler_obj(obj)
298   -" call Dfunc("NetrwFileHandler_obj()")
299 241 if has("unix") && executable("tgif")
300   - exe "silent! !tgif ".a:obj
  242 + exe "silent! !tgif " . a:obj
301 243 redraw!
302 244 else
303   -" call Dret("NetrwFileHandler_obj 0")
304 245 return 0
305 246 endif
306 247
307   -" call Dret("NetrwFileHandler_obj 1")
308 248 return 1
309 249 endfun
310 250
311 251
312 252 " ---------------------------------------------------------------------
313   -" vim: ts=4 fdm=marker
  253 +" vim: fdm=marker
202 runtime/plugin/gzip.vim
... ... @@ -1,6 +1,6 @@
1 1 " Vim plugin for editing compressed files.
2 2 " Maintainer: Bram Moolenaar <Bram@vim.org>
3   -" Last Change: 2005 May 18
  3 +" Last Change: 2005 Jul 26
4 4
5 5 " Exit quickly when:
6 6 " - this plugin was already loaded
@@ -15,188 +15,22 @@ augroup gzip
15 15 " Remove all gzip autocommands
16 16 au!
17 17
18   - " Enable editing of gzipped files
19   - " set binary mode before reading the file
20   - " use "gzip -d", gunzip isn't always available
  18 + " Enable editing of gzipped files.
  19 + " The functions are defined in autoload/gzip.vim.
  20 + "
  21 + " Set binary mode before reading the file.
  22 + " Use "gzip -d", gunzip isn't always available.
21 23 autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin
22   - autocmd BufReadPost,FileReadPost *.gz call s:read("gzip -dn")
23   - autocmd BufReadPost,FileReadPost *.bz2 call s:read("bzip2 -d")
24   - autocmd BufReadPost,FileReadPost *.Z call s:read("uncompress")
25   - autocmd BufWritePost,FileWritePost *.gz call s:write("gzip")
26   - autocmd BufWritePost,FileWritePost *.bz2 call s:write("bzip2")
27   - autocmd BufWritePost,FileWritePost *.Z call s:write("compress -f")
28   - autocmd FileAppendPre *.gz call s:appre("gzip -dn")
29   - autocmd FileAppendPre *.bz2 call s:appre("bzip2 -d")
30   - autocmd FileAppendPre *.Z call s:appre("uncompress")
31   - autocmd FileAppendPost *.gz call s:write("gzip")
32   - autocmd FileAppendPost *.bz2 call s:write("bzip2")
33   - autocmd FileAppendPost *.Z call s:write("compress -f")
  24 + autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
  25 + autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
  26 + autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
  27 + autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
  28 + autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
  29 + autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
  30 + autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
  31 + autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
  32 + autocmd FileAppendPre *.Z call gzip#appre("uncompress")
  33 + autocmd FileAppendPost *.gz call gzip#write("gzip")
  34 + autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
  35 + autocmd FileAppendPost *.Z call gzip#write("compress -f")
34 36 augroup END
35   -
36   -" Function to check that executing "cmd [-f]" works.
37   -" The result is cached in s:have_"cmd" for speed.
38   -fun s:check(cmd)
39   - let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
40   - if !exists("s:have_" . name)
41   - let e = executable(name)
42   - if e < 0
43   - let r = system(name . " --version")
44   - let e = (r !~ "not found" && r != "")
45   - endif
46   - exe "let s:have_" . name . "=" . e
47   - endif
48   - exe "return s:have_" . name
49   -endfun
50   -
51   -" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
52   -" the flags in the compressed file.
53   -" The only compression methods that can be detected are max speed (-1) and max
54   -" compression (-9).
55   -fun s:set_compression(line)
56