" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
-" Date: Feb 15, 2006
-" Version: 8a ASTRO-ONLY
+" Date: Mar 22, 2006
+" Version: 8
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
endif
let s:keepcpo= &cpo
set cpo&vim
-let g:loaded_netrwFileHandlers= "v8a"
+let g:loaded_netrwFileHandlers= "v8"
" ---------------------------------------------------------------------
" netrwFileHandlers#Invoke: {{{2
" netrwSettings.vim: makes netrw settings simpler
-" Date: Jan 26, 2006
+" Date: Mar 22, 2006
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
-" Version: 6a ASTRO-ONLY
+" Version: 6
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
if exists("g:loaded_netrwSettings") || &cp
finish
endif
-let g:loaded_netrwSettings = "v6a"
+let g:loaded_netrwSettings = "v6"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
let g:netrw_ignorenetrc= 0
endif
- put ='+ --------------------------------------------'
- put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
- put ='+ Press ? with cursor atop any line for help '
- put ='+ --------------------------------------------'
+ put ='+ ---------------------------------------------'
+ put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
+ put ='+ Press <F1> with cursor atop any line for help'
+ put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
put =''
set nomod
- map <buffer> <silent> ? :call NetrwSettingHelp()<cr>
+ map <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfun
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
-" Date: Dec 21, 2005
-" Version: 6
+" Date: Mar 22, 2006
+" Version: 7
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
finish
endif
-let g:loaded_zip= "v6"
+let g:loaded_zip = "v7"
+let s:zipfile_escape = ' ?&;\'
" ----------------
" Functions: {{{1
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
return
endif
+" call Decho("passed sanity checks")
if &ma != 1
set ma
endif
0d
$
- exe "silent r! unzip -l ".a:zipfile
+ call Decho("exe silent r! unzip -l '".escape(a:zipfile,s:zipfile_escape)."'")
+ exe "silent r! unzip -l '".escape(a:zipfile,s:zipfile_escape)."'"
$d
silent 4,$v/^\s\+\d\+\s\{0,5}\d/d
silent 4,$s/^\%(.*\)\s\+\(\S\)/\1/
" get zipfile to the new-window
let zipfile= substitute(w:zipfile,'.zip$','','e')
- let curfile= expand("%")
+ let curfile= escape(expand("%"),s:zipfile_escape)
+" call Decho("zipfile<".zipfile.">")
+" call Decho("curfile<".curfile.">")
new
wincmd _
let s:zipfile_{winnr()}= curfile
- exe "e zipfile:".zipfile.':'.fname
+" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).':'.fname)
+ exe "e zipfile:".escape(zipfile,s:zipfile_escape).':'.fname
filetype detect
let &report= repkeep
let repkeep= &report
set report=10
- let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
- let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
+ let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):[^\\].*$','\1','')
+ let fname = substitute(a:fname,'zipfile:.\{-}:\([^\\].*\)$','\1','')
" call Decho("zipfile<".zipfile."> fname<".fname.">")
- exe "r! unzip -p ".zipfile." ".fname
+" call Decho("exe r! unzip -p '".escape(zipfile,s:zipfile_escape)."' ".fname)
+ exe "r! unzip -p '".escape(zipfile,s:zipfile_escape)."' ".fname
" cleanup
0d
-*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
+*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
This can be used to save and restore the cursor position: >
let save_cursor = getpos(".")
MoveTheCursorAround
- call setpos(save_cursor)
+ call setpos('.', save_cursor)
< Also see |setpos()|.
prevnonblank({lnum}) *prevnonblank()*
the current buffer. To set a mark in another buffer you can
use the |bufnr()| function to turn a file name into a buffer
number.
+ Does not change the jumplist.
"lnum" and "col" are the position in the buffer. The first
column is 1. Use a zero "lnum" to delete a mark.
This is useful if you have a mapping that jumps around in the
buffer and you want to go back to the original view.
This does not save fold information. Use the 'foldenable'
- option to temporarily switch of folding, so that folds are not
- opened when moving around.
+ option to temporarily switch off folding, so that folds are
+ not opened when moving around.
The return value includes:
lnum cursor line number
col cursor column
-*filetype.txt* For Vim version 7.0aa. Last change: 2006 Mar 09
+*filetype.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
*.i g:filetype_i |ft-progress-syntax|
*.p g:filetype_p |ft-pascal-syntax|
*.sh g:bash_is_sh |ft-sh-syntax|
+ *.tex g:tex_flavor |ft-tex-plugin|
*filetype-ignore*
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
file: |sql.txt|.
+TEX *ft-tex-plugin*
+
+If the first line of a *.tex file has the form >
+ %&<format>
+then this determined the file type: plaintex (for plain TeX), context (for
+ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to
+choose context or tex. If no keywords are found, it defaults to tex. You can
+change the default by defining the variable g:tex_flavor to the format (not
+the file type) you use most: plain or context or latex. (Currently no other
+formats are recognized.)
+
+
vim:tw=78:ts=8:ft=help:norl:
-*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Mar 20
+*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
:lb[uffer] [bufnr] Same as ":cbuffer", except the location list for the
current window is used instead of the quickfix list.
+ *:cgetb* *:cgetbuffer*
+:cgetb[uffer] [bufnr] Read the error list from the current buffer. Just
+ like ":cbuffer" but don't jump to the first error.
+
+ *:lgetb* *:lgetbuffer*
+:lgetb[uffer] [bufnr] Same as ":cgetbuffer", except the location list for
+ the current window is used instead of the quickfix
+ list.
+
*:caddb* *:caddbuffer*
:caddb[uffer] [bufnr] Read the error list from the current buffer and add
the errors to the current quickfix list. If a
<
*:lad* *:laddexpr*
:lad[dexpr][!] {expr} Same as ":caddexpr", except the location list for the
+ current window is used instead of the quickfix list.
+
+ *:cgete* *:cgetexpr*
+:cgete[xpr][!] {expr} Create a quickfix list using the result of {expr}.
+ Just like ":cexpr", but don't jump to the first error.
+
+ *:lgete* *:lgetexpr*
+:lgete[xpr][!] {expr} Same as ":cgetexpr", except the location list for the
current window is used instead of the quickfix list.
*:cl* *:clist*
:cfir quickfix.txt /*:cfir*
:cfirst quickfix.txt /*:cfirst*
:cg quickfix.txt /*:cg*
+:cgetb quickfix.txt /*:cgetb*
+:cgetbuffer quickfix.txt /*:cgetbuffer*
+:cgete quickfix.txt /*:cgete*
+:cgetexpr quickfix.txt /*:cgetexpr*
:cgetfile quickfix.txt /*:cgetfile*
:ch change.txt /*:ch*
:change change.txt /*:change*
:lfir quickfix.txt /*:lfir*
:lfirst quickfix.txt /*:lfirst*
:lg quickfix.txt /*:lg*
+:lgetb quickfix.txt /*:lgetb*
+:lgetbuffer quickfix.txt /*:lgetbuffer*
+:lgete quickfix.txt /*:lgete*
+:lgetexpr quickfix.txt /*:lgetexpr*
:lgetfile quickfix.txt /*:lgetfile*
:lgr quickfix.txt /*:lgr*
:lgrep quickfix.txt /*:lgrep*
ft-syntax-omni insert.txt /*ft-syntax-omni*
ft-tcsh-syntax syntax.txt /*ft-tcsh-syntax*
ft-termcap-syntax syntax.txt /*ft-termcap-syntax*
+ft-tex-plugin filetype.txt /*ft-tex-plugin*
ft-tex-syntax syntax.txt /*ft-tex-syntax*
ft-tf-syntax syntax.txt /*ft-tf-syntax*
ft-vb-syntax syntax.txt /*ft-vb-syntax*
-*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
+*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
*known-bugs*
-------------------- Known bugs and current work -----------------------
-HTML indenting can be slow, find out why.
-
-Adjust src/main.aap for installing manpages like in Makefile.
- And for generating Vim.app for the Mac.
- Install spell files with src/main.aap.
+Include patch for recognizing TeX flavor. (Benji Fisher)
+And new tex.vim and plaintex.vim.
Win32: Describe how to do debugging. (George Reilly)
Darren is including the patch in ctags. Test it when it's ready. Change
"typename" to "typeref" in C complete code.
+HTML indenting can be slow. Caused by using searchpair(). Can search() be
+used instead?
+
+ccomplete: use "signature:" field from tags file when it's present.
+Or list all the fields? (Martin Stubenschrott)
+
Add more tests for all new functionality in Vim 7. Especially new functions.
Add text in user manual for using the undo tree. Example with finding the
means the compound flags of the word are not used.
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or
support both).
-- Support breakpoint character · 0xb7 and ignore it? Makes it possible to
+- Support breakpoint character ? 0xb7 and ignore it? Makes it possible to
use same wordlist for hyphenation.
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
syllables <= COMPOUNDSYLMAX. Specify using AND in the affix file?
files. Vim will search for all help in "doc" directories in 'runtimepath'.
This is only available when compiled with the |+multi_lang| feature.
+At this moment translations are available for:
+ Chinese - multiple authors
+ French - translated by David Blanchet
+ Italian - translated by Antonio Colombo
+ Russian - translated by Vassily Ragosin
+See the Vim website to find them: http://www.vim.org/translations.php
+
A set of translated help files consists of these files:
help.abx
-*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 21
+*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
|:viusage| Help for Vi commands (Nvi command).
-|:cbuffer| Read error lines from a buffer. (partly by Yegappan
- Lakshmanan)
-
|:sort| Sort lines in the buffer without depending on an
external command.
|:caddfile| Add error messages to an existing quickfix list
(Yegappan Lakshmanan).
-
+|:cbuffer| Read error lines from a buffer. (partly by Yegappan
+ Lakshmanan)
+|:cgetbuffer| Create a quickfix list from a buffer but don't jump to
+ the first error.
+|:caddbuffer| Add errors from the current buffer to the quickfix
+ list.
|:cexpr| Read error messages from a Vim expression (Yegappan
Lakshmanan).
-
|:caddexpr| Add error messages from a Vim expression to an
existing quickfix list. (Yegappan Lakshmanan).
-|:caddbuffer| Add errors from the current buffer to the quickfix
- list.
+|:cgetexpr| Create a quickfix list from a Vim expression, but
+ don't jump to the first error. (Yegappan Lakshmanan).
|:lfile| Like |:cfile| but use the location list.
+|:lgetbuffer| Like |:cgetbuffer| but use the location list.
+|:lgetexpr| Like |:cgetexpr| but use the location list.
|:lgetfile| Like |:cgetfile| but use the location list.
|:laddfile| Like |:caddfile| but use the location list.
|:lbuffer| Like |:cbuffer| but use the location list.
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Mar 21
+" Last Change: 2006 Mar 23
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
" HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml()
-" Distinguish between HTML and XHTML
+" Distinguish between HTML, XHTML and Django
fun! s:FThtml()
let n = 1
while n < 10 && n < line("$")
setf xhtml
return
endif
+ if getline(n) =~ '{%\s*\(extends\|block\)\>'
+ setf htmldjango
+ return
+ endif
let n = n + 1
endwhile
setf html
--- /dev/null
+" Vim Keymap file for greek DOS cp737
+" Maintainer: Panagiotis Louridas <louridas@acm.org>
+" Last Updated: Thu Mar 23 14:05:45 EET 2006
+
+" This keyboard layout allows all Greek symbols to be typed,
+" including accented capitals and diaeresis. It does not
+" include diaeresis and accent on the same vowel, nor
+" the greek quotes, as these were not included in the codepage.
+" It includes the Greek semicolon sign.
+
+"
+" accent ";" + letter
+" diaeresis ":" + letter
+" diaeresis + accent ";" + ":" (or ":" + ";") + letter
+" semicolon "q"
+" colon "Q"
+" greek semicolon "W"
+" sigma at end of word "w"
+
+" Use this short name in the status line.
+let b:keymap_name = "greek"
+
+loadkeymap
+" capital
+A <char-128> " \80
+B <char-129> " \81
+G <char-130> " \82
+D <char-131> " \83
+E <char-132> " \84
+Z <char-133> " \85
+H <char-134> " \86
+U <char-135> " \87
+I <char-136> " \88
+K <char-137> " \89
+L <char-138> " \8a
+M <char-139> " \8b
+N <char-140> " \8c
+J <char-141> " \8d
+O <char-142> " \8e
+P <char-143> " \8f
+R <char-144> " \90
+S <char-145> " \91
+T <char-146> " \92
+Y <char-147> " \93
+F <char-148> " \94
+X <char-149> " \95
+C <char-150> " \96
+V <char-151> " \97
+
+" small
+a <char-152> " \98
+b <char-153> " \99
+g <char-154> " \9a
+d <char-155> " \9b
+e <char-156> " \9c
+z <char-157> " \9d
+h <char-158> " \9e
+u <char-159> " \9f
+i <char-160> " Â
+k <char-161> " ¡
+l <char-162> " ¢
+m <char-163> " £
+n <char-164> " ¤
+j <char-165> " ¥
+o <char-166> " ¦
+p <char-167> " §
+r <char-168> " ¨
+s <char-169> " ©
+w <char-170> " ª
+t <char-171> " «
+y <char-172> " ¬
+f <char-173> " Â
+x <char-174> " ®
+c <char-175> " ¯
+v <char-224> " Ã
+
+" accented capital
+;A <char-234> " ê
+;E <char-235> " ë
+;H <char-236> " ì
+;I <char-237> " Ã
+;O <char-238> " î
+;Y <char-239> " ï
+;V <char-240> " ð
+"
+:I <char-244> " ô
+:Y <char-245> " õ
+
+" accented small
+;a <char-225> " á
+;e <char-226> " â
+;h <char-227> " ã
+;i <char-229> " å
+;o <char-230> " æ
+;y <char-231> " ç
+;v <char-233> " é
+"
+:i <char-228> " ä
+:y <char-232> " è
+"
+" symbols
+q ; " ;
+Q : " :
+W <char-250> " ú
+++ /dev/null
-" vimball : construct a file containing both paths and files
-" Author: Charles E. Campbell, Jr.
-" Date: Mar 20, 2006
-" Version: 3
-" 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
-" (see |copyright|) except use "Vimball" instead of "Vim".
-" No warranty, express or implied.
-" *** *** Use At-Your-Own-Risk! *** ***
-
-" ---------------------------------------------------------------------
-" Load Once: {{{1
-if &cp || exists("g:loaded_vimball")
- finish
-endif
-
-let s:keepcpo = &cpo
-let g:loaded_vimball = "v3"
-set cpo&vim
-
-" ------------------------------------------------------------------------------
-" Public Interface: {{{1
-com! -ra -na=+ -bang MkVimball call s:MkVimball(<line1>,<line2>,<bang>0,<f-args>)
-com! -na=0 UseVimball call s:Vimball(1)
-com! -na=0 VimballList call s:Vimball(0)
-au BufReadPost *.vba echohl WarningMsg | echo "Source this file to extract it! (:so %)" | echohl None
-
-" =====================================================================
-" Functions: {{{1
-
-" ---------------------------------------------------------------------
-" MkVimball: creates a vimball given a list of paths to files {{{2
-" Vimball Format:
-" path
-" filesize
-" [file]
-" path
-" filesize
-" [file]
-fun! s:MkVimball(line1,line2,writelevel,vimballname) range
-" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">")
- let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba'
- if !a:writelevel && filereadable(vbname)
- echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None
-" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
- return
- endif
-
- " user option bypass
- let eikeep= &ei
- set ei=all
-
- let home = substitute(&rtp,',.*$','','')
- let curdir = getcwd()
- exe "cd ".home
-
- " record current tab, initialize while loop index
- let curtabnr = tabpagenr()
- let linenr = a:line1
-" call Decho("curtabnr=".curtabnr)
-
- while linenr <= a:line2
- let svfile = getline(linenr)
-" call Decho("svfile<".svfile.">")
-
- if !filereadable(svfile)
- echohl Error | echo "unable to read file<".svfile.">" | echohl None
- let &ei= eikeep
- exe "cd ".curdir
-" call Dret("MkVimball")
- return
- endif
-
- " create/switch to mkvimball tab
- if !exists("vbtabnr")
- tabnew
- silent! file Vimball
- let vbtabnr= tabpagenr()
- else
- exe "tabn ".vbtabnr
- endif
-
- let lastline= line("$") + 1
- if lastline == 2 && getline("$") == ""
- call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
- call setline(2,'UseVimball')
- call setline(3,'finish')
- let lastline= 4
- endif
- call setline(lastline ,svfile)
- call setline(lastline+1,0)
- exe "$r ".svfile
- call setline(lastline+1,line("$") - lastline - 1)
-" call Decho("lastline=".lastline." line$=".line("$"))
-
- " restore to normal tab
- exe "tabn ".curtabnr
- let linenr= linenr + 1
- endwhile
-
- " write the vimball
- exe "tabn ".vbtabnr
- exe "cd ".curdir
- if a:really
- if a:writelevel
- exe "w! ".vbname
- else
- exe "w ".vbname
- endif
- endif
-" call Decho("Vimball<".vbname."> created")
- echo "Vimball<".vbname."> created"
-
- " remove the evidence
- setlocal nomod bh=wipe
- exe "tabn ".curtabnr
- exe "tabc ".vbtabnr
-
- " restore options
- let &ei= eikeep
-
-" call Dret("MkVimball")
-endfun
-
-" ---------------------------------------------------------------------
-" Vimball: {{{2
-fun! s:Vimball(really)
-" call Dfunc("Vimball(really=".a:really.")")
-
- if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
- echoerr "(Vimball) The current file does not appear to be a Vimball!"
-" call Dret("Vimball")
- return
- endif
-
- " initialize
- let regakeep = @a
- let eikeep = &ei
- let vekeep = &ve
- let makeep = getpos("'a")
- let curtabnr = tabpagenr()
- set ei=all ve=all
-
- " set up vimball tab
- tabnew
- silent! file Vimball
- let vbtabnr= tabpagenr()
- let didhelp= ""
-
- " go to vim plugin home
- let home = substitute(&rtp,',.*$','','')
- let curdir = getcwd()
-" call Decho("exe cd ".home)
- exe "cd ".home
- let linenr = 4
- let filecnt = 0
-
- " give title to listing of (extracted) files from Vimball Archive
- if a:really
- echohl Title | echomsg "Vimball Archive" | echohl None
- else
- echohl Title | echomsg "Vimball Archive Listing" | echohl None
- endif
-
- " apportion vimball contents to various files
-" call Decho("exe tabn ".curtabnr)
- exe "tabn ".curtabnr
-" call Decho("linenr=".linenr." line$=".line("$"))
- while 1 < linenr && linenr < line("$")
- let fname = getline(linenr)
- let fsize = getline(linenr+1)
- let filecnt = filecnt + 1
- if a:really
- echomsg "extracted <".fname.">: ".fsize." lines"
- else
- echomsg "would extract <".fname.">: ".fsize." lines"
- endif
-" call Decho(linenr.": will extract file<".fname.">")
-" call Decho((linenr+1).": fsize=".fsize)
-
- " make directories if they don't exist yet
- let fnamebuf= fname
- while fnamebuf =~ '/'
- let dirname = substitute(fnamebuf,'/.*$','','e')
- let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
- if !isdirectory(dirname)
-" call Decho("making <".dirname.">")
- call mkdir(dirname)
- endif
- exe "cd ".dirname
- endwhile
- exe "cd ".home
-
- " grab specified qty of lines and place into "a" buffer
- exe linenr
- norm! jjma
- exe (linenr + fsize + 1)
- silent norm! "ay'a
-" call Decho("yanked ".fsize." lines into register-a")
-
-" call Decho("didhelp<".didhelp."> fname<".fname.">")
- if didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
- let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
-" call Decho("didhelp<".didhelp.">")
- endif
-
- " copy "a" buffer into tab
-" call Decho('copy "a buffer into tab#'.vbtabnr)
- exe "tabn ".vbtabnr
- silent! %d
- silent norm! "aPGdd1G
-" call Decho("rega<".@a.">")
-
- " write tab to file
-" call Decho("exe w! ".fname)
- exe "silent w! ".fname
-
-" call Decho("exe tabn ".curtabnr)
- exe "tabn ".curtabnr
-" let oldlinenr = linenr " Decho
- let linenr = linenr + fsize + 2
-" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] + 2 = ".linenr)
- endwhile
-
- " set up help
-" call Decho("about to set up help: didhelp<".didhelp.">")
- if didhelp != ""
-" call Decho("exe helptags ".home."/".didhelp)
- exe "helptags ".home."/".didhelp
- echomsg "did helptags"
- endif
-
- " make sure a "Press ENTER..." prompt appears to keep the messages showing!
- while filecnt < &ch
- echomsg " "
- let filecnt= filecnt + 1
- endwhile
-
- " restore events, delete tab and buffer
- exe "tabn ".vbtabnr
- setlocal nomod bh=wipe
- exe "tabn ".curtabnr
- exe "tabc ".vbtabnr
- let &ei= eikeep
- let @a = regakeep
- if makeep[0] != 0
- " restore mark a
-" call Decho("restore mark-a: makeep=".string(makeep))
- call setpos("'a",makeep)
- ka
- endif
- exe "cd ".curdir
-
-" call Dret("Vimball")
-endfun
--- /dev/null
+" Vim syntax file
+" Language: Django template
+" Maintainer: Dave Hodder <dmh@dmh.org.uk>
+" Last Change: 2006 Mar 23
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+syntax case match
+
+" Django template built-in tags and parameters
+" 'comment' doesn't appear here because it gets special treatment
+syn keyword djangoStatement contained as block endblock by cycle debug else
+syn keyword djangoStatement contained extends filter endfilter firstof for
+syn keyword djangoStatement contained endfor if endif ifchanged endifchanged
+syn keyword djangoStatement contained ifequal endifequal ifnotequal
+syn keyword djangoStatement contained endifnotequal in include load not now or
+syn keyword djangoStatement contained parsed regroup reversed spaceless
+syn keyword djangoStatement contained endspaceless ssi templatetag openblock
+syn keyword djangoStatement contained closeblock openvariable closevariable
+syn keyword djangoStatement contained widthratio with
+
+" Django templete built-in filters
+syn keyword djangoFilter contained add addslashes capfirst center cut date
+syn keyword djangoFilter contained default default_if_none dictsort
+syn keyword djangoFilter contained dictsortreversed divisibleby escape
+syn keyword djangoFilter contained filesizeformat first fix_ampersands
+syn keyword djangoFilter contained floatformat get_digit join length length_is
+syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust
+syn keyword djangoFilter contained lower make_list phone2numeric pluralize
+syn keyword djangoFilter contained pprint random removetags rjust slice slugify
+syn keyword djangoFilter contained stringformat striptags time timesince title
+syn keyword djangoFilter contained truncatewords unordered_list upper urlencode
+syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno
+
+" Django template constants (always surrounded by double quotes)
+syn region djangoArgument contained start=/"/ skip=/\\"/ end=/"/
+
+" Django template tag and variable blocks
+syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument display
+syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument display
+
+" Django template 'comment' tag
+syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}"
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_django_syn_inits")
+ if version < 508
+ let did_django_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink djangoTagBlock PreProc
+ HiLink djangoVarBlock PreProc
+ HiLink djangoStatement Statement
+ HiLink djangoFilter Identifier
+ HiLink djangoArgument Constant
+ HiLink djangoComment Comment
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "django"
--- /dev/null
+" Vim syntax file
+" Language: Django HTML template
+" Maintainer: Dave Hodder <dmh@dmh.org.uk>
+" Last Change: 2006 Mar 06
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+if !exists("main_syntax")
+ let main_syntax = 'html'
+endif
+
+if version < 600
+ so <sfile>:p:h/django.vim
+ so <sfile>:p:h/html.vim
+else
+ runtime! syntax/django.vim
+ runtime! syntax/html.vim
+ unlet b:current_syntax
+endif
+
+syntax cluster htmlPreproc add=djangoPlaceHolder
+syntax cluster htmlString add=djangoPlaceHolder
+
+let b:current_syntax = "htmldjango"
# spell file is there.
installspell: $(DEST_VIM) $(DEST_RT) $(DEST_SPELL)
if test -f $(SPELLSOURCE)/en.latin1.spl; then \
- $(INSTALL_DATA) $(SPELLSOURCE)/*.spl $(SPELLSOURCE)/*.vim $(DEST_SPELL); \
- chmod $(HELPMOD) $(DEST_SPELL)/*.spl $(DEST_SPELL)/*.vim; \
+ $(INSTALL_DATA) $(SPELLSOURCE)/*.spl $(SPELLSOURCE)/*.sug $(SPELLSOURCE)/*.vim $(DEST_SPELL); \
+ chmod $(HELPMOD) $(DEST_SPELL)/*.spl $(DEST_SPELL)/*.sug $(DEST_SPELL)/*.vim; \
fi
# install helper program xxd
$(DEST_BIN)/$(EVIEWTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(EVIEWTARGET)
-# create links for the manual pages with various names to vim. This is only
+# Create links for the manual pages with various names to vim. This is only
# done when the links (or manpages with the same name) don't exist yet.
INSTALLMLARGS = $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME) \
# Remove the link to the runtime dir, don't want to copy all of that.
-rm $(RESDIR)/vim/runtime
$(INSTALL_DATA_R) $(APPDIR) $(DESTDIR)$(prefix)
+# Generate the help tags file now, it won't work with "make installruntime".
+ -@srcdir=`pwd`; cd $(HELPSOURCE); $(MAKE) VIMEXE=$$srcdir/$(VIMTARGET) vimtags
# Install the runtime files. Recursive!
-mkdir -p $(DESTDIR)$(prefix)/$(RESDIR)/vim/runtime
# -mkdir $(DESTDIR)$(prefix)/$(APPDIR)/bin
mkdir -p $@
bundle-dir: $(APPDIR)/Contents $(VIMTARGET)
- -@srcdir=`pwd`; cd $(HELPSOURCE); $(MAKE) VIMEXE=$$srcdir/$(VIMTARGET) vimtags
# Make a link to the runtime directory, so that we can try out the executable
# without installing it.
mkdir -p $(RESDIR)/vim
GUI_X_LIBS = @GUI_X_LIBS@
MOTIF_LIBNAME = @MOTIF_LIBNAME@
GTK_LIBNAME = @GTK_LIBNAME@
-KDE_PREFIX = @KDE_PREFIX@
-MOC = @MOC@
### Any OS dependent extra source and object file
OS_EXTRA_SRC = @OS_EXTRA_SRC@
fi
fi
- dnl Avoid a bug with -O2 with gcc 4.0. Symptom: malloc() reports double
+ dnl Avoid a bug with -O2 with gcc 4.0.1. Symptom: malloc() reports double
dnl free. This happens in expand_filename(), because the optimizer swaps
- dnl two blocks of code that use "repl" that can't be swapped.
+ dnl two blocks of code, both using "repl", that can't be swapped.
if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-Oz/'`
fi
int var_count = 0;
int semicolon = 0;
char_u op[2];
+ char_u *argend;
- expr = skip_var_list(arg, &var_count, &semicolon);
- if (expr == NULL)
+ argend = skip_var_list(arg, &var_count, &semicolon);
+ if (argend == NULL)
return;
- expr = vim_strchr(expr, '=');
+ expr = vim_strchr(argend, '=');
if (expr == NULL)
{
/*
{
op[0] = '=';
op[1] = NUL;
- if (expr > arg)
+ if (expr > argend)
{
if (vim_strchr((char_u *)"+-.", expr[-1]) != NULL)
op[0] = expr[-1]; /* +=, -= or .= */
n1 = list_find_nr(arg->vval.v_list, 0L, &error);
n2 = list_find_nr(arg->vval.v_list, 1L, &error);
# ifdef WIN3264
- tm->QuadPart = (n1 << 32) + n2;
+ tm->HighPart = n1;
+ tm->LowPart = n2;
# else
tm->tv_sec = n1;
tm->tv_usec = n2;
long n1, n2;
# ifdef WIN3264
- n1 = res.QuadPart >> 32;
- n2 = res.QuadPart & 0xffffffff;
+ n1 = res.HighPart;
+ n2 = res.LowPart;
# else
n1 = res.tv_sec;
n2 = res.tv_usec;
TRLBAR|FILE1|BANG),
EX(CMD_cfirst, "cfirst", ex_cc,
RANGE|NOTADR|COUNT|TRLBAR|BANG),
+EX(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer,
+ RANGE|NOTADR|WORD1|TRLBAR),
EX(CMD_cgetfile, "cgetfile", ex_cfile,
TRLBAR|FILE1|BANG),
+EX(CMD_cgetexpr, "cgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG),
EX(CMD_chdir, "chdir", ex_cd,
BANG|FILE1|TRLBAR|CMDWIN),
EX(CMD_changes, "changes", ex_changes,
RANGE|NOTADR|COUNT|TRLBAR|BANG),
EX(CMD_lgetfile, "lgetfile", ex_cfile,
TRLBAR|FILE1|BANG),
+EX(CMD_lgetbuffer, "lgetbuffer", ex_cbuffer,
+ RANGE|NOTADR|WORD1|TRLBAR),
+EX(CMD_lgetexpr, "lgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG),
EX(CMD_lgrep, "lgrep", ex_make,
RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE),
EX(CMD_lgrepadd, "lgrepadd", ex_make,
end_pos = curwin->w_cursor;
curwin->w_cursor = save_pos;
}
+ else
+ end_pos = curwin->w_cursor; /* shutup gcc 4 */
validate_cursor();
# endif
# include <gnome.h>
# include "version.h"
+# ifdef HAVE_GTK2
+/* missing prototype in bonobo-dock-item.h */
+extern void bonobo_dock_item_set_behavior(BonoboDockItem *dock_item, BonoboDockItemBehavior beh);
+# endif
#endif
#if !defined(FEAT_GUI_GTK) && defined(PROTO)
gnome_app_set_menus(GNOME_APP(gui.mainwin), GTK_MENU_BAR(gui.menubar));
dockitem = gnome_app_get_dock_item_by_name(GNOME_APP(gui.mainwin),
GNOME_APP_MENUBAR_NAME);
- // bonobo_dock_item_set_behavior(dockitem,
- // BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
+ /* We don't want the menu to float. */
+ bonobo_dock_item_set_behavior(dockitem,
+ bonobo_dock_item_get_behavior(dockitem)
+ | BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
gui.menubar_h = GTK_WIDGET(dockitem);
# else
gui.menubar_h = gnome_dock_item_new("VimMainMenu",
GNOME_APP_TOOLBAR_NAME);
gui.toolbar_h = GTK_WIDGET(dockitem);
/* When the toolbar is floating it gets stuck. So long as that isn't
- * fixed let's disallow floating. Also changes it appearance... */
+ * fixed let's disallow floating. */
bonobo_dock_item_set_behavior(dockitem,
- BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
+ bonobo_dock_item_get_behavior(dockitem)
+ | BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
gtk_container_set_border_width(GTK_CONTAINER(gui.toolbar), 0);
# else
GtkWidget *dockitem;
#if defined(FEAT_GUI_TABLINE)
/* 'guitablabel' */
else if (varp == &p_gtl)
- gui_update_tabline();
+ gui_init_which_components(NULL);
#endif
#if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
/*
* ":[range]cbuffer [bufnr]" command.
* ":[range]caddbuffer [bufnr]" command.
+ * ":[range]cgetbuffer [bufnr]" command.
* ":[range]lbuffer [bufnr]" command.
* ":[range]laddbuffer [bufnr]" command.
+ * ":[range]lgetbuffer [bufnr]" command.
*/
void
ex_cbuffer(eap)
buf_T *buf = NULL;
qf_info_T *qi = &ql_info;
- if (eap->cmdidx == CMD_lbuffer || eap->cmdidx == CMD_laddbuffer)
+ if (eap->cmdidx == CMD_lbuffer || eap->cmdidx == CMD_lgetbuffer
+ || eap->cmdidx == CMD_laddbuffer)
{
qi = ll_get_or_alloc_list(curwin);
if (qi == NULL)
EMSG(_(e_invrange));
else
{
- int buffer_cmd = (eap->cmdidx == CMD_cbuffer
- || eap->cmdidx == CMD_lbuffer);
-
- if (qf_init_ext(qi, NULL, buf, NULL, p_efm, buffer_cmd,
+ if (qf_init_ext(qi, NULL, buf, NULL, p_efm,
+ (eap->cmdidx != CMD_caddbuffer
+ && eap->cmdidx != CMD_laddbuffer),
eap->line1, eap->line2) > 0
- && buffer_cmd)
+ && (eap->cmdidx == CMD_cbuffer
+ || eap->cmdidx == CMD_lbuffer))
qf_jump(qi, 0, 0, eap->forceit); /* display first error */
}
}
#if defined(FEAT_EVAL) || defined(PROTO)
/*
- * ":cexpr {expr}" and ":caddexpr {expr}" command.
- * ":lexpr {expr}" and ":laddexpr {expr}" command.
+ * ":cexpr {expr}", ":cgetexpr {expr}", ":caddexpr {expr}" command.
+ * ":lexpr {expr}", ":lgetexpr {expr}", ":laddexpr {expr}" command.
*/
void
ex_cexpr(eap)
typval_T *tv;
qf_info_T *qi = &ql_info;
- if (eap->cmdidx == CMD_lexpr || eap->cmdidx == CMD_laddexpr)
+ if (eap->cmdidx == CMD_lexpr || eap->cmdidx == CMD_lgetexpr
+ || eap->cmdidx == CMD_laddexpr)
{
qi = ll_get_or_alloc_list(curwin);
if (qi == NULL)
if ((tv->v_type == VAR_STRING && tv->vval.v_string != NULL)
|| (tv->v_type == VAR_LIST && tv->vval.v_list != NULL))
{
- int expr_cmd = (eap->cmdidx == CMD_cexpr
- || eap->cmdidx == CMD_lexpr);
- if (qf_init_ext(qi, NULL, NULL, tv, p_efm, expr_cmd,
+ if (qf_init_ext(qi, NULL, NULL, tv, p_efm,
+ (eap->cmdidx != CMD_caddexpr
+ && eap->cmdidx != CMD_laddexpr),
(linenr_T)0, (linenr_T)0) > 0
- && expr_cmd)
+ && (eap->cmdidx == CMD_cexpr
+ || eap->cmdidx == CMD_lexpr))
qf_jump(qi, 0, 0, eap->forceit); /* display first error */
}
else
}
if (no < 0) /* Ordinary character. */
{
+ if (c == K_SPECIAL && src[0] != NUL && src[1] != NUL)
+ {
+ /* Copy a specialy key as-is. */
+ if (copy)
+ {
+ *dst++ = c;
+ *dst++ = *src++;
+ *dst++ = *src++;
+ }
+ else
+ {
+ dst += 3;
+ src += 2;
+ }
+ continue;
+ }
+
if (c == '\\' && *src != NUL)
{
/* Check for abbreviations -- webb */
c = *src++;
}
}
-
- /* Write to buffer, if copy is set. */
#ifdef FEAT_MBYTE
- if (has_mbyte)
+ else if (has_mbyte)
c = mb_ptr2char(src - 1);
#endif
+ /* Write to buffer, if copy is set. */
if (func == (fptr_T)NULL) /* just copy */
cc = c;
else
redraw_tabline = FALSE;
#ifdef FEAT_GUI_TABLINE
- /* When the GUI has the tabline then this always returns zero. */
+ /* Take care of a GUI tabline. */
if (gui_use_tabline())
{
gui_update_tabline();
static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
static void u_doit __ARGS((int count));
static void u_undoredo __ARGS((int undo));
-static void u_undo_end __ARGS((int did_undo));
+static void u_undo_end __ARGS((int did_undo, int absolute));
static void u_add_time __ARGS((char_u *buf, size_t buflen, time_t tt));
static void u_freeheader __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
static void u_freebranch __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev;
}
}
- u_undo_end(undo_undoes);
+ u_undo_end(undo_undoes, FALSE);
}
static int lastmark = 0;
else
{
if (sec)
- closest = time(NULL) - starttime + 1;
+ closest = (long)(time(NULL) - starttime + 1);
else
closest = curbuf->b_u_seq_last + 2;
if (target >= closest)
while (uhp != NULL)
{
uhp->uh_walk = mark;
- val = (dosec ? (uhp->uh_time - starttime) : uhp->uh_seq);
+ val = (long)(dosec ? (uhp->uh_time - starttime) : uhp->uh_seq);
if (round == 1)
{
else if (uhp->uh_next != NULL && uhp->uh_alt_prev == NULL
&& uhp->uh_next->uh_walk != nomark
&& uhp->uh_next->uh_walk != mark)
+ {
+ /* If still at the start we don't go through this change. */
+ if (uhp == curbuf->b_u_curhead)
+ uhp->uh_walk = nomark;
uhp = uhp->uh_next;
+ }
else
{
/* Stop when going backwards in time and didn't find the exact
* header we were looking for. */
if (uhp->uh_seq == target && above)
+ {
+ curbuf->b_u_seq_cur = target - 1;
break;
+ }
u_undoredo(FALSE);
}
}
}
- u_undo_end(did_undo);
+ u_undo_end(did_undo, absolute);
}
/*
* in some cases, but it's better than nothing).
*/
static void
-u_undo_end(did_undo)
+u_undo_end(did_undo, absolute)
int did_undo; /* just did an undo */
+ int absolute; /* used ":undo N" */
{
char *msg;
u_header_T *uhp;
if (curbuf->b_u_curhead != NULL)
{
- if (did_undo)
+ /* For ":undo N" we prefer a "after #N" message. */
+ if (absolute && curbuf->b_u_curhead->uh_next != NULL)
+ {
+ uhp = curbuf->b_u_curhead->uh_next;
+ did_undo = FALSE;
+ }
+ else if (did_undo)
uhp = curbuf->b_u_curhead;
else
uhp = curbuf->b_u_curhead->uh_next;
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 23)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 23, compiled "