summaryrefslogtreecommitdiff
path: root/runtime/plugin
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-02-01 21:47:16 +0000
committerBram Moolenaar <Bram@vim.org>2006-02-01 21:47:16 +0000
commitb8a7b560b1c25a059dfb57cbe40f0a3f98ed8e97 (patch)
tree090b45a23993b236f0a8c18fd2297f3142194066 /runtime/plugin
parent280f126ef03c4e7d71d2c8341d661d3e37157851 (diff)
downloadvim-git-b8a7b560b1c25a059dfb57cbe40f0a3f98ed8e97.tar.gz
updated for version 7.0191
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/netrwPlugin.vim18
-rw-r--r--runtime/plugin/spellfile.vim15
2 files changed, 27 insertions, 6 deletions
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index 6e33d51c1..2a691cdc1 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -35,7 +35,7 @@ set cpo&vim
" Local Browsing: {{{2
augroup FileExplorer
au!
- au BufEnter * call s:LocalBrowse(expand("<amatch>"))
+ au BufEnter * silent! call s:LocalBrowse(expand("<amatch>"))
augroup END
" Network Browsing Reading Writing: {{{2
@@ -47,10 +47,10 @@ augroup Network
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
endif
- au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe "Nread 0r ".expand("<amatch>")|exe "silent doau BufReadPost ".expand("<amatch>")
- au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe "Nread " .expand("<amatch>")|exe "silent doau FileReadPost ".expand("<amatch>")
- au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe "Nwrite " .expand("<amatch>")|exe "silent doau BufWritePost ".expand("<amatch>")
- au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']Nwrite " .expand("<amatch>")|exe "silent doau FileWritePost ".expand("<amatch>")
+ au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe 'Nread 0r "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
+ au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "' .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
+ au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
+ au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
augroup END
" Commands: :Nread, :Nwrite, :NetUserPass {{{2
@@ -69,6 +69,12 @@ com! -nargs=? -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
" Commands: NetrwSettings {{{2
com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings()
+" Maps:
+if !hasmapto('<Plug>NetrwBrowseX')
+ nmap <unique> gx <Plug>NetrwBrowseX
+endif
+nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
+
" ---------------------------------------------------------------------
" LocalBrowse: {{{2
fun! s:LocalBrowse(dirname)
@@ -76,7 +82,7 @@ fun! s:LocalBrowse(dirname)
" the BufEnter event causes triggering when attempts to write to
" the DBG buffer are made.
if isdirectory(a:dirname)
- call netrw#DirBrowse(a:dirname)
+ silent! call netrw#DirBrowse(a:dirname)
endif
" not a directory, ignore it
endfun
diff --git a/runtime/plugin/spellfile.vim b/runtime/plugin/spellfile.vim
new file mode 100644
index 000000000..437296090
--- /dev/null
+++ b/runtime/plugin/spellfile.vim
@@ -0,0 +1,15 @@
+" Vim plugin for downloading spell files
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last Change: 2006 Feb 01
+
+" Exit quickly when:
+" - this plugin was already loaded
+" - when 'compatible' is set
+" - some autocommands are already taking care of spell files
+if exists("loaded_spellfile_plugin") || &cp || exists("#SpellFileMissing")
+ finish
+endif
+let loaded_spellfile_plugin = 1
+
+" The function is in the autoload directory.
+autocmd SpellFileMissing * call spellfile#LoadFile(expand('<amatch>'))