summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-15 22:59:18 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-15 22:59:18 +0000
commit7d47b6eed707db9af160ec517b71e1f9fdac1a0f (patch)
treef93785b6fba72029e272fac10caed4cda5c09f4e /runtime
parent5671873089d516a10c79733182797075071eb5f3 (diff)
downloadvim-7d47b6eed707db9af160ec517b71e1f9fdac1a0f.zip
updated for version 7.0225
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/netrw.vim67
-rw-r--r--runtime/doc/autocmd.txt11
-rw-r--r--runtime/doc/diff.txt14
-rw-r--r--runtime/doc/options.txt27
-rw-r--r--runtime/doc/pi_netrw.txt9
-rw-r--r--runtime/doc/tags4
6 files changed, 103 insertions, 29 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 124e61748..6fc74bc70 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
" AUTOLOAD PORTION
-" Date: Mar 13, 2006
-" Version: 80
+" Date: Mar 14, 2006
+" Version: 81
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
if &cp || exists("g:loaded_netrw")
finish
endif
-let g:loaded_netrw = "v80"
+let g:loaded_netrw = "v81"
if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
finish
@@ -2803,21 +2803,7 @@ fun! netrw#DirBrowse(dirname)
let s:last_sort_by= g:netrw_sort_by
" set up ShellCmdPost handling. Append current buffer to browselist
- if !exists("s:netrw_browselist")
- let s:netrw_browselist= []
- endif
- if g:netrw_fastbrowse <= 1 && (empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1])
- call add(s:netrw_browselist,bufnr("%"))
-" call Decho("browselist=".string(s:netrw_browselist))
- endif
- if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1
-" call Decho("setting up local-browser shell command refresh")
- let s:netrw_browser_shellcmd= 1
- augroup AuNetrwShellCmd
- au!
- au ShellCmdPost * call s:LocalBrowseShellCmdRefresh()
- augroup END
- endif
+ call s:LocalFastBrowser()
" get the new directory name
if has("win32") || has("win95") || has("win64") || has("win16")
@@ -3369,6 +3355,47 @@ fun! s:LocalBrowseRename(path) range
endfun
" ---------------------------------------------------------------------
+" LocalFastBrowser: handles setting up/taking down fast browsing for the {{{2
+" local browser
+fun! s:LocalFastBrowser()
+" call Dfunc("LocalFastBrowser()")
+
+ " initialize browselist, a list of buffer numbers that the local browser has used
+ if !exists("s:netrw_browselist")
+ let s:netrw_browselist= []
+ endif
+
+ " append current buffer to fastbrowse list
+ if g:netrw_fastbrowse <= 1 && (empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1])
+ call add(s:netrw_browselist,bufnr("%"))
+" call Decho("browselist=".string(s:netrw_browselist))
+ endif
+
+ " enable autocmd events to handle refreshing/removing local browser buffers
+ " If local browse buffer is currently showing: refresh it
+ " If local browse buffer is currently hidden : wipe it
+ if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1
+" call Decho("setting up local-browser shell command refresh")
+ let s:netrw_browser_shellcmd= 1
+ augroup AuNetrwShellCmd
+ au!
+ au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh()
+ augroup END
+
+ " user must have changed fastbrowse to its fast setting, so remove
+ " the associated autocmd events
+ if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd")
+ unlet s:netrw_browser_shellcmd
+ augroup AuNetrwShellCmd
+ au!
+ augroup END
+ augroup! AuNetrwShellCmd
+ endif
+
+" call Dret("LocalFastBrowser")
+endfun
+
+" ---------------------------------------------------------------------
" LocalObtain: copy selected file to current working directory {{{2
fun! s:LocalObtain()
" call Dfunc("LocalObtain()")
@@ -3883,6 +3910,7 @@ fun! s:NetOptionSave()
let w:cinokeep = &cino
let w:comkeep = &com
let w:cpokeep = &cpo
+ let w:hidkeep = &hidden
let w:magickeep = &magic
if !g:netrw_keepdir
let w:dirkeep = getcwd()
@@ -3894,7 +3922,7 @@ fun! s:NetOptionSave()
setlocal cino =
setlocal com =
setlocal cpo -=aA
- setlocal nocin noai noci magic nospell fo=nroql2
+ setlocal nocin noai noci magic nospell fo=nroql2 nohid
setlocal tw =0
setlocal report=10000
if has("win32") && !has("win95")
@@ -3926,6 +3954,7 @@ fun! s:NetOptionRestore()
if exists("w:dirkeep") |exe "lcd ".w:dirkeep |unlet w:dirkeep |endif
if exists("w:fokeep") |let &fo = w:fokeep |unlet w:fokeep |endif
if exists("w:gdkeep") |let &gd = w:gdkeep |unlet w:gdkeep |endif
+ if exists("w:hidkeep") |let &hidden = w:hidkeep |unlet w:hidkeep |endif
if exists("w:magic") |let &magic = w:magic |unlet w:magic |endif
if exists("w:repkeep") |let &report = w:repkeep |unlet w:repkeep |endif
if exists("w:spellkeep")|let &spell = w:spellkeep |unlet w:spellkeep|endif
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 6f2a57ec5..4c19f1d4d 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Mar 10
+*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Mar 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -270,6 +270,7 @@ Name triggered by ~
Various
|FileChangedShell| Vim notices that a file changed since editing started
+|FileChangedShellPost| After handling a file changed since editing started
|FileChangedRO| before making the first change to a read-only file
|ShellCmdPost| after executing a shell command
@@ -279,6 +280,7 @@ Name triggered by ~
|SpellFileMissing| a spell file is used but it can't be found
|SourcePre| before sourcing a Vim script
+|VimResized| after the Vim window size changed
|FocusGained| Vim got input focus
|FocusLost| Vim lost input focus
|CursorHold| the user doesn't press a key for a while
@@ -537,6 +539,9 @@ FileChangedShell When Vim notices that the modification time of
commands for the FileChangedShell event no
other FileChangedShell event will be
triggered.
+ *FileChangedShellPost*
+FileChangedShellPost After handling a file that was changed outside
+ of Vim. Can be used to update the statusline.
*FileEncoding*
FileEncoding Obsolete. It still works and is equivalent
to |EncodingChanged|.
@@ -764,6 +769,10 @@ VimLeavePre Before exiting Vim, just before writing the
Mostly useful with a "*" pattern. >
:autocmd VimLeavePre * call CleanupStuff()
< To detect an abnormal exit use |v:dying|.
+ *VimResized*
+VimResized After the Vim window was resized, thus 'lines'
+ and/or 'columns' changed. Not when starting
+ up though.
*WinEnter*
WinEnter After entering another window. Not done for
the first window, when Vim has just started.
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index 8a6c7afde..577b216ef 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -1,4 +1,4 @@
-*diff.txt* For Vim version 7.0aa. Last change: 2006 Mar 14
+*diff.txt* For Vim version 7.0aa. Last change: 2006 Mar 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -51,6 +51,8 @@ splits add the |-o| argument: >
vimdiff -o file1 file2 [file3]
+If you always prefer horizontal splits include "horizontal" in 'diffopt'.
+
In each of the edited files these options are set:
'diff' on
@@ -58,7 +60,7 @@ In each of the edited files these options are set:
'scrollopt' includes "hor"
'wrap' off
'foldmethod' "diff"
- 'foldcolumn' 2
+ 'foldcolumn' value from 'diffopt', default is 2
These options are set local to the window. When editing another file they are
reset to the global value.
@@ -107,7 +109,9 @@ To make these commands use a vertical split, prepend |:vertical|. Examples: >
:vert diffsplit main.c~
:vert diffpatch /tmp/diff
-<
+
+If you always prefer a vertical split include "vertical" in 'diffopt'.
+
*E96*
There can be up to four buffers with 'diff' set.
@@ -378,8 +382,8 @@ will have the same effect. These variables are set to the file names used:
Example (this does the same as 'patchexpr' being empty): >
- let patchexpr=MyPatch()
- function MyPatch
+ set patchexpr=MyPatch()
+ function MyPatch()
:call system("patch -o " . v:fname_out . " " . v:fname_in .
\ " < " . v:fname_diff)
endfunction
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 52ae467b5..7e10b85d4 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 12
+*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1624,6 +1624,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu,preview")
global
+ {not available when compiled without the
+ |+insert_expand| feature}
{not in Vi}
A comma separated list of options for Insert mode completion
|ins-completion|. The supported values are:
@@ -1644,7 +1646,6 @@ A jump table for the options with a short description can be found at |Q_op|.
preview Show extra information about the currently selected
completion in the preview window.
-
*'confirm'* *'cf'* *'noconfirm'* *'nocf'*
'confirm' 'cf' boolean (default off)
global
@@ -2184,11 +2185,20 @@ A jump table for the options with a short description can be found at |Q_op|.
exactly. It should ignore adding trailing
white space, but not leading white space.
+ horizontal Start diff mode with horizontal splits (unless
+ explicitly specified otherwise).
+
+ vertical Start diff mode with vertical splits (unless
+ explicitly specified otherwise).
+
+ foldcolumn:{n} Set the 'foldcolumn' option to {n} when
+ starting diff mode. Without this 2 is used.
+
Examples: >
:set diffopt=filler,context:4
:set diffopt=
- :set diffopt=filler
+ :set diffopt=filler,foldcolumn:3
<
*'digraph'* *'dg'* *'nodigraph'* *'nodg'*
'digraph' 'dg' boolean (default off)
@@ -5019,6 +5029,17 @@ A jump table for the options with a short description can be found at |Q_op|.
global
When on a ":" prompt is used in Ex mode.
+ *'pumheight'* *'ph'*
+'pumheight' 'ph' number (default 0)
+ global
+ {not available when compiled without the
+ |+insert_expand| feature}
+ {not in Vi}
+ Determines the maximum number of items to show in the popup menu.
+ When zero as much space as available is used.
+ |ins-completion-menu|.
+
+
*'quoteescape'* *'qe'*
'quoteescape' 'qe' string (default "\")
local to buffer
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 5d054e924..3baed63a6 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt* For Vim version 7.0. Last change: Mar 10, 2006
+*pi_netrw.txt* For Vim version 7.0. Last change: Mar 14, 2006
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -1439,6 +1439,13 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
11. History *netrw-history* {{{1
+ v81: * FocusGained also used to refresh/wipe local browser directory
+ buffers
+ * (bugfix) netrw was leaving [Scratch] buffers behind when the
+ the user had the "hidden" option set. The 'hidden' option is
+ now bypassed.
+ v80: * ShellCmdPost event used in conjunction with g:netrw_fastbrowse
+ to refresh/wipe local browser directory buffers.
v79: * directories are now displayed with nowrap
* (bugfix) if the column width was smaller than the largest
file's name, then netrw would hang when using wide-listing
diff --git a/runtime/doc/tags b/runtime/doc/tags
index d27b9118f..3b18a5b90 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -646,6 +646,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'pex' options.txt /*'pex'*
'pexpr' options.txt /*'pexpr'*
'pfn' options.txt /*'pfn'*
+'ph' options.txt /*'ph'*
'pheader' options.txt /*'pheader'*
'pi' options.txt /*'pi'*
'pm' options.txt /*'pm'*
@@ -665,6 +666,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'printoptions' options.txt /*'printoptions'*
'prompt' options.txt /*'prompt'*
'pt' options.txt /*'pt'*
+'pumheight' options.txt /*'pumheight'*
'pvh' options.txt /*'pvh'*
'pvw' options.txt /*'pvw'*
'qe' options.txt /*'qe'*
@@ -3979,6 +3981,7 @@ FileAppendPost autocmd.txt /*FileAppendPost*
FileAppendPre autocmd.txt /*FileAppendPre*
FileChangedRO autocmd.txt /*FileChangedRO*
FileChangedShell autocmd.txt /*FileChangedShell*
+FileChangedShellPost autocmd.txt /*FileChangedShellPost*
FileEncoding autocmd.txt /*FileEncoding*
FileReadCmd autocmd.txt /*FileReadCmd*
FileReadPost autocmd.txt /*FileReadPost*
@@ -4181,6 +4184,7 @@ View starting.txt /*View*
VimEnter autocmd.txt /*VimEnter*
VimLeave autocmd.txt /*VimLeave*
VimLeavePre autocmd.txt /*VimLeavePre*
+VimResized autocmd.txt /*VimResized*
Virtual-Replace-mode insert.txt /*Virtual-Replace-mode*
VisVim if_ole.txt /*VisVim*
Visual visual.txt /*Visual*