diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-05-14 23:24:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-05-14 23:24:24 +0200 |
commit | 00a927d62b68a3523cb1c4f9aa3f7683345c8182 (patch) | |
tree | 9138abae11d363aa87818791195edf6e85aef15d /runtime/plugin/netrwPlugin.vim | |
parent | f1eeae94fd78f81d85d2abe3d955dc21d5ef979c (diff) |
Updated runtime files.
Diffstat (limited to 'runtime/plugin/netrwPlugin.vim')
-rw-r--r-- | runtime/plugin/netrwPlugin.vim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim index 13798b03f2..f968964950 100644 --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v136" +let g:loaded_netrwPlugin = "v138" if v:version < 702 echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None finish @@ -35,6 +35,7 @@ set cpo&vim augroup FileExplorer au! au BufEnter * silent! call s:LocalBrowse(expand("<amatch>")) + au VimEnter * silent! call s:VimEnter(expand("<amatch>")) if has("win32") || has("win95") || has("win64") || has("win16") au BufEnter .* silent! call s:LocalBrowse(expand("<amatch>")) endif @@ -109,6 +110,13 @@ fun! s:LocalBrowse(dirname) endfun " --------------------------------------------------------------------- +" s:VimEnter: {{{2 +fun! s:VimEnter(dirname) + windo if a:dirname != expand("%")|call s:LocalBrowse(expand("%:p"))|endif + 1wincmd w +endfun + +" --------------------------------------------------------------------- " NetrwStatusLine: {{{1 fun! NetrwStatusLine() " let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".") |