Permalink
Browse files

updated for version 7.0f03

  • Loading branch information...
1 parent 2372438 commit a7081a05c47b600f05bd10e56ded2b19b77ba161 vimboss committed Apr 27, 2006
@@ -1,7 +1,7 @@
" vimball : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
-" Date: Apr 26, 2006
-" Version: 9
+" Date: Apr 27, 2006
+" Version: 11
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
@@ -15,7 +15,7 @@ if &cp || exists("g:loaded_vimball")
finish
endif
let s:keepcpo = &cpo
-let g:loaded_vimball = "v9"
+let g:loaded_vimball = "v11"
set cpo&vim
" =====================================================================
@@ -40,9 +40,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
endif
" user option bypass
- let eikeep = &ei
- let acdkeep = &acd
- set ei=all noacd
+ call s:SaveSettings()
" go to vim plugin home
for home in split(&rtp,',') + ['']
@@ -72,8 +70,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
if !filereadable(svfile)
echohl Error | echo "unable to read file<".svfile.">" | echohl None
call s:ChgDir(curdir)
- let &ei = eikeep
- let &acd = acdkeep
+ call s:RestoreSettings()
" call Dret("MkVimball")
return
endif
@@ -131,8 +128,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
exe "tabc ".vbtabnr
" restore options
- let &ei = eikeep
- let &acd = acdkeep
+ call s:RestoreSettings()
" call Dret("MkVimball")
endfun
@@ -148,15 +144,9 @@ fun! vimball#Vimball(really)
return
endif
- " initialize
- let acdkeep = &acd
- let fenkeep = &fen
- let regakeep = @a
- let eikeep = &ei
- let vekeep = &ve
- let makeep = getpos("'a")
+ " set up standard settings
+ call s:SaveSettings()
let curtabnr = tabpagenr()
- set ei=all ve=all nofen noacd
" set up vimball tab
tabnew
@@ -188,6 +178,7 @@ fun! vimball#Vimball(really)
echohl Title | echomsg "Vimball Archive" | echohl None
else
echohl Title | echomsg "Vimball Archive Listing" | echohl None
+ echohl Statement | echomsg "files would be placed under: ".home | echohl None
endif
" apportion vimball contents to various files
@@ -208,15 +199,17 @@ fun! vimball#Vimball(really)
" make directories if they don't exist yet
" call Decho("making directories if they don't exist yet")
- let fnamebuf= fname
- while fnamebuf =~ '/'
- let dirname = home."/".substitute(fnamebuf,'/.*$','','e')
- let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
- if !isdirectory(dirname)
-" call Decho("making <".dirname.">")
- call mkdir(dirname)
- endif
- endwhile
+ if a:really
+ let fnamebuf= fname
+ while fnamebuf =~ '/'
+ let dirname = home."/".substitute(fnamebuf,'/.*$','','e')
+ let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
+ if !isdirectory(dirname)
+" call Decho("making <".dirname.">")
+ call mkdir(dirname)
+ endif
+ endwhile
+ endif
call s:ChgDir(home)
" grab specified qty of lines and place into "a" buffer
@@ -279,16 +272,7 @@ fun! vimball#Vimball(really)
setlocal nomod bh=wipe
exe "tabn ".curtabnr
exe "tabc ".vbtabnr
- let &ei = eikeep
- let @a = regakeep
- let &fen = fenkeep
- let &acd = acdkeep
- if makeep[0] != 0
- " restore mark a
-" call Decho("restore mark-a: makeep=".string(makeep))
- call setpos("'a",makeep)
- ka
- endif
+ call s:RestoreSettings()
call s:ChgDir(curdir)
" call Dret("Vimball")
@@ -361,6 +345,44 @@ fun! vimball#ShowMesg(msg)
" call Dret("vimball#ShowMesg")
endfun
+" ---------------------------------------------------------------------
+" s:SaveSettings: {{{2
+fun! s:SaveSettings()
+" call Dfunc("SaveSettings()")
+ let s:makeep = getpos("'a")
+ let s:regakeep= @a
+ let s:acdkeep = &acd
+ let s:eikeep = &ei
+ let s:fenkeep = &fen
+ let s:hidkeep = &hidden
+ let s:ickeep = &ic
+ let s:repkeep = &report
+ let s:vekeep = &ve
+ set ei=all ve=all noacd nofen noic report=999 nohid
+" call Dret("SaveSettings")
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreSettings: {{{2
+fun! s:RestoreSettings()
+" call Dfunc("RestoreSettings()")
+ let @a = s:regakeep
+ let &acd = s:acdkeep
+ let &ei = s:eikeep
+ let &fen = s:fenkeep
+ let &hidden = s:hidkeep
+ let &ic = s:ickeep
+ let &report = s:repkeep
+ let &ve = s:vekeep
+ if s:makeep[0] != 0
+ " restore mark a
+" call Decho("restore mark-a: makeep=".string(makeep))
+ call setpos("'a",s:makeep)
+ endif
+ unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep
+" call Dret("RestoreSettings")
+endfun
+
" ---------------------------------------------------------------------
let &cpo= s:keepcpo
unlet s:keepcpo
View
@@ -75,6 +75,7 @@ DOCS = \
pi_paren.txt \
pi_spec.txt \
pi_tar.txt \
+ pi_vimball.txt \
pi_zip.txt \
print.txt \
quickfix.txt \
@@ -138,7 +139,6 @@ DOCS = \
version6.txt \
version7.txt \
vi_diff.txt \
- vimball.txt \
visual.txt \
windows.txt \
workshop.txt
@@ -204,6 +204,9 @@ HTMLS = \
pi_netrw.html \
pi_paren.html \
pi_spec.html \
+ pi_tar.html \
+ pi_vimball.html \
+ pi_zip.html \
print.html \
quickfix.html \
quickref.html \
@@ -267,7 +270,6 @@ HTMLS = \
version6.html \
version7.html \
vi_diff.html \
- vimball.txt \
visual.html \
windows.html \
workshop.html
View
@@ -0,0 +1,89 @@
+*pi_vimball.txt* For Vim version 7.0f. Last change: 2006 Apr 27
+
+ ----------------
+ Vimball Archiver
+ ----------------
+
+Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
+ (remove NOSPAM from Campbell's email first)
+Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
+ The VIM LICENSE applies to Vimball.vim, and Vimball.txt
+ (see |copyright|) except use "Vimball" instead of "Vim".
+ No warranty, express or implied.
+ Use At-Your-Own-Risk!
+
+==============================================================================
+1. Contents *vimball* *vimball-contents*
+
+ 1. Contents......................................: |vimball-contents|
+ 2. Vimball Manual................................: |vimball-manual|
+ 3. Vimball History...............................: |vimball-history|
+
+
+==============================================================================
+2. Vimball Manual *vimball-manual*
+
+ *:MkVimball*
+ :[range]MkVimball[!] filename
+
+ This command takes lines holding a path to files to be included in
+ your vimball; as an example: >
+ plugin/something.vim
+ doc/something.txt
+< using MkVimball on this range will create a file called "filename.vba"
+ which can be used by Vimball.vim to re-create these files. If the
+ "filename.vba" file already exists, then MkVimball will issue a
+ warning and not create the file. Note that these paths are relative
+ to your .vim (vimfiles) directory, and the files should be in that
+ directory. The vimball plugin uses the first |'runtimepath'|directory
+ that exists as a prefix; don't use absolute paths.
+
+ If you use the exclamation point (!), then MkVimball will create the
+ "filename.vba" file, overwriting it if it already exists. This
+ behavior resembles that for |:w|.
+
+ *vimball-extract*
+ vim filename.vba
+
+ Simply editing a Vimball will cause Vimball.vim to tell the user to
+ source the file to extract its contents.
+
+ Extraction will only proceed if the first line of a putative vimball
+ file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D."
+ line.
+
+ :VimballList *vimball-vimballlist*
+
+ This command will tell Vimball to list the files in the archive, along
+ with their lengths in lines.
+
+
+==============================================================================
+3. Vimball History *vimball-history* {{{1
+
+ 11 : Apr 27, 2006 * VimballList would create missing subdirectories that
+ the vimball specified were needed. Fixed.
+ 10 : Apr 27, 2006 * moved all setting saving/restoration to a pair of
+ functions. Included some more settings in them
+ which frequently cause trouble.
+ 9 : Apr 26, 2006 * various changes to support Windows prediliction
+ for backslashes and spaces in file and directory
+ names.
+ 7 : Apr 25, 2006 * bypasses foldenable
+ * uses more exe and less norm! (:yank :put etc)
+ * does better at insuring a "Press ENTER" prompt
+ appears to keep its messages visible
+ 4 : Mar 31, 2006 * BufReadPost seems to fire twice; BufReadEnter
+ only fires once, so the "Source this file..."
+ message is now issued only once.
+ 3 : Mar 20, 2006 * removed query, now requires sourcing to be
+ extracted (:so %). Message to that effect
+ included.
+ * :VimballList now shows files that would be
+ extracted.
+ 2 : Mar 20, 2006 * query, :UseVimball included
+ 1 : Mar 20, 2006 * initial release
+
+
+==============================================================================
+vim:tw=78:ts=8:ft=help:fdm=marker
@@ -2,7 +2,7 @@
" Language: Debian Changelog
" Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de>
" Stefano Zacchiroli <zack@debian.org>
-" Last Change: 25 April 2006
+" Last Change: 27 April 2006
" License: GNU GPL, version 2.1 or later
if exists("g:did_changelog_ftplugin")
@@ -203,17 +203,11 @@ au BufEnter * if &filetype == "debchangelog" | call <SID>MakeMenu() | endif
au BufLeave * if &filetype == "debchangelog" | aunmenu Changelog | endif
augroup END
-" Debian changelogs are not supposed to have any other text width,
-" so the user cannot override this setting
-setlocal tw=78
-setlocal comments=f:*
-let b:undo_ftplugin = "setlocal tw< comments<"
-
" }}}
" {{{1 folding
setlocal foldmethod=expr
-set foldexpr=GetDebChangelogFold(v:lnum)
+setlocal foldexpr=GetDebChangelogFold(v:lnum)
setlocal foldtext=DebChangelogFoldText()
" look for an author name searching backward from a given line number
@@ -251,4 +245,12 @@ endfunction
" }}}
+" Debian changelogs are not supposed to have any other text width,
+" so the user cannot override this setting
+setlocal tw=78
+setlocal comments=f:*
+
+" Clean unloading
+let b:undo_ftplugin = "setlocal tw< comments< foldmethod< foldexpr< foldtext<"
+
" vim: set foldmethod=marker:
@@ -0,0 +1,59 @@
+" Vim filetype plugin file
+" Language: FlexWiki, http://www.flexwiki.com/
+" Maintainer: George V. Reilly <george@reilly.org>
+" Home: http://www.georgevreilly.com/vim/flexwiki/
+" Other Home: http://www.vim.org/scripts/script.php?script_id=1529
+" Author: George V. Reilly
+" Filenames: *.wiki
+" Last Change: Wed Apr 26 11:00 PM 2006 P
+" Version: 0.3
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1 " Don't load another plugin for this buffer
+
+" Reset the following options to undo this plugin.
+let b:undo_ftplugin = "setl tw< wrap< lbr< et< ts< fenc< bomb< ff<"
+
+" Allow lines of unlimited length. Do NOT want automatic linebreaks,
+" as a newline starts a new paragraph in FlexWiki.
+setlocal textwidth=0
+" Wrap long lines, rather than using horizontal scrolling.
+setlocal wrap
+" Wrap at a character in 'breakat' rather than at last char on screen
+setlocal linebreak
+" Don't transform <TAB> characters into spaces, as they are significant
+" at the beginning of the line for numbered and bulleted lists.
+setlocal noexpandtab
+" 4-char tabstops, per flexwiki.el
+setlocal tabstop=4
+" Save *.wiki files in UTF-8
+setlocal fileencoding=utf-8
+" Add the UTF-8 Byte Order Mark to the beginning of the file
+setlocal bomb
+" Save <EOL>s as \n, not \r\n
+setlocal fileformat=unix
+
+if exists("g:flexwiki_maps")
+ " Move up and down by display lines, to account for screen wrapping
+ " of very long lines
+ nmap <buffer> <Up> gk
+ nmap <buffer> k gk
+ vmap <buffer> <Up> gk
+ vmap <buffer> k gk
+
+ nmap <buffer> <Down> gj
+ nmap <buffer> j gj
+ vmap <buffer> <Down> gj
+ vmap <buffer> j gj
+
+ " for earlier versions - for when 'wrap' is set
+ imap <buffer> <S-Down> <C-o>gj
+ imap <buffer> <S-Up> <C-o>gk
+ if v:version >= 700
+ imap <buffer> <Down> <C-o>gj
+ imap <buffer> <Up> <C-o>gk
+ endif
+endif
Oops, something went wrong.

0 comments on commit a7081a0

Please sign in to comment.