]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.0205
authorBram Moolenaar <Bram@vim.org>
Thu, 23 Feb 2006 21:26:58 +0000 (21:26 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 23 Feb 2006 21:26:58 +0000 (21:26 +0000)
12 files changed:
runtime/doc/index.txt
runtime/doc/insert.txt
runtime/doc/tabpage.txt
runtime/syntax/vim.vim
src/diff.c
src/ex_docmd.c
src/normal.c
src/os_vms_conf.h
src/proto/ex_docmd.pro
src/quickfix.c
src/tag.c
src/window.c

index fa4eca4e383ff338c85f1519aa7223fdd3784e17..f7d5125530e821eff58eee4586f037a9b676b7d9 100644 (file)
@@ -1,4 +1,4 @@
-*index.txt*     For Vim version 7.0aa.  Last change: 2006 Feb 18
+*index.txt*     For Vim version 7.0aa.  Last change: 2006 Feb 23
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1442,13 +1442,17 @@ The commands are sorted on the non-optional part of their name.
 |:syncbind|    :sync[bind]     sync scroll binding
 |:t|           :t              same as ":copy"
 |:tNext|       :tN[ext]        jump to previous matching tag
+|:tabNext|     :tabN[ext]      go to previous tab page
 |:tabclose|    :tabc[lose]     close current tab page
 |:tabedit|     :tabe[dit]      edit a file in a new tab page
 |:tabfind|     :tabf[ind]      find file in 'path', edit it in a new tab page
-|:tabnew|      :tabn[ew]       edit a file in a new tab page
+|:tabmove|     :tabm[ove]      move tab page to other position
+|:tabnew|      :tabnew         edit a file in a new tab page
+|:tabnext|     :tabn[ext]      go to next tab page
 |:tabonly|     :tabo[nly]      close all tab pages except the current one
+|:tabprevious| :tabp[revious]  go to previous tab page
 |:tabs|                :tabs           list the tab pages and what they contain
-|:tab|         :tab            jump to another tab page
+|:tab|         :tab            create new tab when opening new window
 |:tag|         :ta[g]          jump to tag
 |:tags|                :tags           show the contents of the tag stack
 |:tcl|         :tc[l]          execute Tcl command
index 5f551312b6f6b39bf8e670157faf988ecf9d0284..721c2dbce73174358d67385e9429a70f392dfece 100644 (file)
@@ -1,4 +1,4 @@
-*insert.txt*    For Vim version 7.0aa.  Last change: 2006 Feb 22
+*insert.txt*    For Vim version 7.0aa.  Last change: 2006 Feb 23
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1083,32 +1083,39 @@ There are two states:
 1. A complete match has been inserted.
 2. Only part of a match has been inserted.
 
+You normally start in the first state, with the first match being inserted.
 When "longest" is in 'completeopt' and there is more than one match you start
 in the second state.
 
+If you select another match, e.g., with CTRL-N or CTRL-P, you go from the
+second to the first state.  This doesn't change the list of matches.
+
+
 In the first state these keys have a special meaning:
 <BS> and CTRL-H   Delete one character, find the matches for the word before
                  the cursor.  This reduces the list of matches, often to one
-                 entry.  Switches to the second state.
+                 entry, and switches to the second state.
 
 In the second state these keys have a special meaning:
 <BS> and CTRL-H   Delete one character, find the matches for the shorter word
                  before the cursor.  This may find more matches.
 CTRL-L           Add one character from the current match, may reduce the
                  number of matches.
-any printable character: Add this character and reduce the number of matches.
+any printable, non-white character:
+                 Add this character and reduce the number of matches.
 
 In both states these can be used:
-<CR> and <Enter>  Accept the currently selected match
-<PageUp>         Select a match several entries back
-<PageDown>       Select a match several entries further
+<CR> and <Enter>  Accept the currently selected match and stop completion.
+<PageUp>         Select a match several entries back, but don't insert it.
+<PageDown>       Select a match several entries further, but don't insert it.
 <Up>             Select the previous match, as if CTRL-P was used, but don't
-                 insert the newly selected word.
+                 insert it.
 <Down>           Select the next match, as if CTRL-N was used, but don't
-                 insert the newly selected word.
-
-If you select another match, e.g., with CTRL-N or CTRL-P, you go back to the
-first state.  However, the list of matches doesn't change.
+                 insert it.
+Any other character:
+                 Stop completion without changing the match and insert the
+                 typed character.  Note that typing a space or <Tab> will
+                 work in both states.
 
 
 The colors of the menu can be changed with these highlight groups:
index 2db521efa38ef88b4665eaf3e9e1e0f98429db24..5f394b398fde54f7fe2c9515f8c180a5ebdfd25e 100644 (file)
@@ -1,4 +1,4 @@
-*tabpage.txt*   For Vim version 7.0aa.  Last change: 2006 Feb 22
+*tabpage.txt*   For Vim version 7.0aa.  Last change: 2006 Feb 23
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -46,11 +46,16 @@ OPENING A NEW TAB PAGE:
 When starting Vim "vim -p filename ..." opens each file argument in a separate
 tab page (up to 10). |-p|
 
-:tabe[dit]                             *:tabe* *:tabedit* *:tabn* *:tabnew*
-:tabn[ew]      Open a new tab page with an empty window.
+A double click with the mouse in the tab pages line opens a new, empty tab
+page.  It is placed left of the position of the click.  The first click may
+select another tab page first, causing an extra screen update.
+
+:tabe[dit]                             *:tabe* *:tabedit* *:tabnew*
+:tabnew                Open a new tab page with an empty window, after the current
+               tab page.
 
 :tabe[dit] [++opt] [+cmd] {file}
-:tabn[ew] [++opt] [+cmd] {file}
+:tabnew [++opt] [+cmd] {file}
                Open a new tab page and edit {file}, like with |:edit|.
 
 :tabf[ind] [++opt] [+cmd] {file}                       *:tabf* *:tabfind*
@@ -59,13 +64,25 @@ tab page (up to 10). |-p|
                {not available when the |+file_in_path| feature was disabled
                at compile time}
 
+:[count]tab {cmd}                                      *:tab*
+               Execute {cmd} and when it opens a new window open a new tab
+               page instead.  Doesn't work for |:diffsplit| or |:diffpatch|.
+               When [count] is omitted the tab page appears after the current
+               one.  When [count] is specified the new tab page comes after
+               tab page [count].  Use ":0tab cmd" to get the new tab page as
+               the first one.  Examples: >
+                       :tab split      " opens current buffer in new tab page
+                       :tab help gt    " opens tab page with help for "gt"
+
 
 CLOSING A TAB PAGE:
 
-Using |:close| in the last window of a tab page closes it.
+Closing the last window of a tab page closes the tab page too, unless there is
+only one tab page.
 
 Using the mouse: If the tab page line is displayed you can click in the "X" at
-the top right to close the current tab page. |'tabline'|
+the top right to close the current tab page.  A custom |'tabline'| may show
+something else.
 
                                                        *:tabc* *:tabclose*
 :tabc[lose][!] Close current tab page.
@@ -94,20 +111,41 @@ the top right to close the current tab page. |'tabline'|
 SWITCHING TO ANOTHER TAB PAGE:
 
 Using the mouse: If the tab page line is displayed you can click in a tab page
-label to switch to that tab page. |'tabline'|
+label to switch to that tab page.  Click where there is no label to go to the
+next tab page.  |'tabline'|
 
-:tab                                                   *:tab* *gt*
+:tabn[ext]                                     *:tabn* *:tabnext* *gt*
 gt             Go to the next tab page.  Wraps around from the last to the
                first one.
 
-:tab {count}
+:tabn[ext] {count}
 {count}gt      Go to tab page {count}.  The first tab page has number one.
 
 
+:tabp[revious]                         *:tabp* *:tabprevious* *gT*
+:tabN[ext]                             *:tabN* *:tabNext*
+gT             Go to the previous tab page.  Wraps around from the first one
+               to the last one.
+
+:tabp[revious] {count}
+:tabN[ext] {count}
+{count}gT      Go {count} tab pages back.  Wraps around from the first one
+               to the last one.
+
+
 Other commands:
                                                        *:tabs*
-:tabs          List the tab pages and the windows they contain.  Shows a "+"
-               for modified buffers.
+:tabs          List the tab pages and the windows they contain.
+               Shows a ">" for the current window.
+               Shows a "+" for modified buffers.
+
+
+REORDERING TAB PAGES:
+
+                                                       *:tabm* *:tabmove*
+:tabmove N     Move the current tab page to after tab page N.  Use zero to
+               make the current tab page the first one.  Without N the tab
+               page is made the last one.
 
 ==============================================================================
 3. Other items                                         *tab-page-other*
index 8aeecb1113d297357a487e6d7aee4611cd8a915e..0e659a12e08db031bf2ccd2765d9ba1e0b2b1909 100644 (file)
@@ -1,8 +1,8 @@
 " Vim syntax file
 " Language:    Vim 7.0 script
 " Maintainer:  Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: February 15, 2006
-" Version:     7.0-26
+" Last Change: February 21, 2006
+" Version:     7.0-27
 " Automatically generated keyword lists: {{{1
 
 " Quit when a syntax file was already loaded {{{2
@@ -16,11 +16,11 @@ syn keyword vimTodo contained       COMBAK  NOT     RELEASED        TODO    WIP
 syn cluster vimCommentGroup    contains=vimTodo,@Spell
 
 " regular vim commands {{{2
-syn keyword vimCommand contained       ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lg[etfile] lgr[ep] lgrepa[dd] lh[elpgrep] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank] 
+syn keyword vimCommand contained       ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lg[etfile] lgr[ep] lgrepa[dd] lh[elpgrep] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t tab tabc[lose] tabe[dit] tabf[ind] tabn[ew] tabo[nly] tabs ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank] 
 syn match   vimCommand contained       "\<z[-+^.=]"
 
 " vimOptions are caught only when contained in a vimSet {{{2
-syn keyword vimOption contained        : acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs fex ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatexpr formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg guicursor guifont guifontset guifontwide guiheadroom guioptions guipty helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma magic makeef makeprg mat matchpairs matchtime maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw oft ofu omnifunc operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabstop tag tagbsearch taglength tagrelative tags tagstack tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww 
+syn keyword vimOption contained        : acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs fex ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatexpr formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg guicursor guifont guifontset guifontwide guiheadroom guioptions guipty helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma magic makeef makeprg mat matchpairs matchtime maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw oft ofu omnifunc operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode showtabline shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta stal startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabline tabstop tag tagbsearch taglength tagrelative tags tagstack tal tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww 
 
 " vimOptions: These are the turn-off setting variants {{{2
 syn keyword vimOption contained        noacd noai noakm noallowrevins noaltkeymap noanti noantialias noar noarab noarabic noarabicshape noari noarshape noautochdir noautoindent noautoread noautowrite noautowriteall noaw noawa nobackup noballooneval nobeval nobin nobinary nobiosk nobioskey nobk nobl nobomb nobuflisted nocf noci nocin nocindent nocompatible noconfirm noconsk noconskey nocopyindent nocp nocscopetag nocscopeverbose nocst nocsverb nodeco nodelcombine nodg nodiff nodigraph nodisable noea noeb noed noedcompatible noek noendofline noeol noequalalways noerrorbells noesckeys noet noex noexpandtab noexrc nofen nofk nofkmap nofoldenable nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkmapp nohkp nohls nohlsearch noic noicon noignorecase noim noimc noimcmdline noimd noincsearch noinf noinfercase noinsertmode nois nojoinspaces nojs nolazyredraw nolbr nolinebreak nolisp nolist noloadplugins nolpl nolz noma nomagic nomh noml nomod nomodeline nomodifiable nomodified nomore nomousef nomousefocus nomousehide nonu nonumber nopaste nopi nopreserveindent nopreviewwindow noprompt nopvw noreadonly noremap norestorescreen norevins nori norightleft norightleftcmd norl norlc noro nors noru noruler nosb nosc noscb noscrollbind noscs nosecure nosft noshellslash noshelltemp noshiftround noshortname noshowcmd noshowfulltag noshowmatch noshowmode nosi nosm nosmartcase nosmartindent nosmarttab nosmd nosn nosol nospell nosplitbelow nosplitright nospr nosr nossl nosta nostartofline nostmp noswapfile noswf nota notagbsearch notagrelative notagstack notbi notbidi notbs notermbidi noterse notextauto notextmode notf notgst notildeop notimeout notitle noto notop notr nottimeout nottybuiltin nottyfast notx novb novisualbell nowa nowarn nowb noweirdinvert nowfh nowildmenu nowinfixheight nowiv nowmnu nowrap nowrapscan nowrite nowriteany nowritebackup nows 
@@ -42,20 +42,20 @@ syn match   vimOption contained     "t_k;"
 " unsupported settings: these are supported by vi but don't do anything in vim {{{2
 syn keyword vimErrSetting contained    hardtabs ht w1200 w300 w9600 
 
-" AutoBuf Events {{{2
+" AutoCmd Events {{{2
 syn case ignore
-syn keyword vimAutoEvent contained     BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave 
+syn keyword vimAutoEvent contained     BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave 
 
 " Highlight commonly used Groupnames {{{2
 syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo 
 
 " Default highlighting groups {{{2
-syn keyword vimHLGroup contained       Cursor CursorIM DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu 
+syn keyword vimHLGroup contained       Cursor CursorIM DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu 
 syn match vimHLGroup contained "Conceal"
 syn case match
 
 " Function Names {{{2
-syn keyword vimFuncName contained      add append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call char2nr cindent col complete_add complete_check confirm copy count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists expand expr8 extend filereadable filewritable filter finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getqflist getreg getregtype getwinposx getwinposy getwinvar glob globpath has has_key hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime map maparg mapcheck match matchend matchlist matchstr max min mkdir mode nextnonblank nr2char prevnonblank printf pumvisible range readfile remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setqflist setreg setwinvar simplify sort soundfold spellbadword spellsuggest split strftime stridx string strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tagfiles taglist tempname tolower toupper tr type values virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth writefile 
+syn keyword vimFuncName contained      add append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call char2nr cindent col complete_add complete_check confirm copy count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists expand expr8 extend filereadable filewritable filter finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getqflist getreg getregtype getwinposx getwinposy getwinvar glob globpath has has_key hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime map maparg mapcheck match matchend matchlist matchstr max min mkdir mode nextnonblank nr2char prevnonblank printf pumvisible range readfile remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setqflist setreg setwinvar simplify sort soundfold spellbadword spellsuggest split strftime stridx string strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tempname tolower toupper tr type values virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth writefile 
 
 "--- syntax above generated by mkvimvim ---
 " Special Vim Highlighting (not automatic) {{{1
index b28e127ccfae327129f812d3e0ac5a7af5557ad1..d5cb97c4e53a7f94ac7895dc45af4704ead4eade 100644 (file)
@@ -974,6 +974,9 @@ ex_diffpatch(eap)
 #ifdef FEAT_GUI
     need_mouse_correct = TRUE;
 #endif
+    /* don't use a new tab page, each tab page has its own diffs */
+    cmdmod.tab = 0;
+
     if (win_split(0, 0) != FAIL)
     {
        /* Pretend it was a ":split fname" command */
@@ -1031,6 +1034,9 @@ ex_diffsplit(eap)
 #ifdef FEAT_GUI
     need_mouse_correct = TRUE;
 #endif
+    /* don't use a new tab page, each tab page has its own diffs */
+    cmdmod.tab = 0;
+
     if (win_split(0, 0) != FAIL)
     {
        /* Pretend it was a ":split fname" command */
index 73bf420f60cf8fa0b7f5a9479eba341d09dc8a05..df6273ffca1ec873f3cd0f46f8fdfd2a00d818d4 100644 (file)
@@ -155,6 +155,9 @@ static void ex_resize __ARGS((exarg_T *eap));
 static void    ex_stag __ARGS((exarg_T *eap));
 static void    ex_tabclose __ARGS((exarg_T *eap));
 static void    ex_tabonly __ARGS((exarg_T *eap));
+static void    ex_tabnext __ARGS((exarg_T *eap));
+static void    ex_tabprevious __ARGS((exarg_T *eap));
+static void    ex_tabmove __ARGS((exarg_T *eap));
 static void    ex_tabs __ARGS((exarg_T *eap));
 #else
 # define ex_close              ex_ni
@@ -163,7 +166,9 @@ static void ex_tabs __ARGS((exarg_T *eap));
 # define ex_resize             ex_ni
 # define ex_splitview          ex_ni
 # define ex_stag               ex_ni
-# define ex_tab                        ex_ni
+# define ex_tabnext            ex_ni
+# define ex_tabprevious                ex_ni
+# define ex_tabmove            ex_ni
 # define ex_tabs               ex_ni
 # define ex_tabclose           ex_ni
 # define ex_tabonly            ex_ni
@@ -1857,7 +1862,25 @@ do_one_cmd(cmdlinep, sourcing,
                        }
                        continue;
 
-           case 't':   if (!checkforcmd(&ea.cmd, "topleft", 2))
+           case 't':   if (checkforcmd(&p, "tab", 3))
+                       {
+#ifdef FEAT_WINDOWS
+                           tabpage_T   *tp;
+
+                           if (vim_isdigit(*ea.cmd))
+                               cmdmod.tab = atoi((char *)ea.cmd) + 1;
+                           else
+                           {
+                               cmdmod.tab = 2;
+                               for (tp = first_tabpage; tp != curtab;
+                                                            tp = tp->tp_next)
+                                   ++cmdmod.tab;
+                           }
+                           ea.cmd = p;
+#endif
+                           continue;
+                       }
+                       if (!checkforcmd(&ea.cmd, "topleft", 2))
                            break;
 #ifdef FEAT_WINDOWS
                        cmdmod.split |= WSP_TOP;
@@ -2380,7 +2403,7 @@ do_one_cmd(cmdlinep, sourcing,
     {
        n = getdigits(&ea.arg);
        ea.arg = skipwhite(ea.arg);
-       if (n <= 0 && !ni)
+       if (n <= 0 && !ni && (ea.argt & ZEROR) == 0)
        {
            errormsg = (char_u *)_(e_zerocount);
            goto doend;
@@ -6957,7 +6980,7 @@ ex_splitview(eap)
            || eap->cmdidx == CMD_tabfind
            || eap->cmdidx == CMD_tabnew)
     {
-       if (win_new_tabpage() != FAIL)
+       if (win_new_tabpage(cmdmod.tab) != FAIL)
        {
            do_exedit(eap, NULL);
 
@@ -6998,13 +7021,48 @@ theend:
 }
 
 /*
- * :tab command
+ * Open a new tab page.
  */
     void
-ex_tab(eap)
+tabpage_new()
+{
+    exarg_T    ea;
+
+    vim_memset(&ea, 0, sizeof(ea));
+    ea.cmdidx = CMD_tabnew;
+    ea.cmd = (char_u *)"tabn";
+    ea.arg = (char_u *)"";
+    ex_splitview(&ea);
+}
+
+/*
+ * :tabnext command
+ */
+    static void
+ex_tabnext(eap)
     exarg_T    *eap;
 {
-    goto_tabpage((int)eap->line2);
+    goto_tabpage(eap->addr_count == 0 ? 0 : (int)eap->line2);
+}
+
+/*
+ * :tabprevious and :tabNext command
+ */
+    static void
+ex_tabprevious(eap)
+    exarg_T    *eap;
+{
+    goto_tabpage(eap->addr_count == 0 ? -1 : -(int)eap->line2);
+}
+
+/*
+ * :tabmove command
+ */
+    static void
+ex_tabmove(eap)
+    exarg_T    *eap;
+{
+    tabpage_move(eap->addr_count == 0 ? 9999 : (int)eap->line2);
 }
 
 /*
@@ -7035,7 +7093,9 @@ ex_tabs(eap)
            wp = tp->tp_firstwin;
        for ( ; wp != NULL && !got_int; wp = wp->w_next)
        {
-           msg_puts((char_u *)"\n  ");
+           msg_putchar('\n');
+           msg_putchar(wp == curwin ? '>' : ' ');
+           msg_putchar(' ');
            msg_putchar(bufIsChanged(wp->w_buffer) ? '+' : ' ');
            msg_putchar(' ');
            if (buf_spname(wp->w_buffer) != NULL)
index 07857f5baf43d64b67c23fef5b7851954a8411cc..4f4ffa954da72b5236647b5ec192a6fc51c6c71d 100644 (file)
@@ -2437,13 +2437,23 @@ do_mouse(oap, c, dir, count, fixindent)
            c1 = TabPageIdxs[mouse_col];
            if (c1 >= 0)
            {
-               /* Go to specified tab page, or next one if not clicking on a
-                * label. */
-               goto_tabpage(c1);
-
-               /* It's like clicking on the status line of a window. */
-               if (curwin != old_curwin)
+               if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_2CLICK)
+               {
+                   /* double click opens new page */
                    end_visual_mode();
+                   tabpage_new();
+                   tabpage_move(c1 == 0 ? 9999 : c1 - 1);
+               }
+               else
+               {
+                   /* Go to specified tab page, or next one if not clicking
+                    * on a label. */
+                   goto_tabpage(c1);
+
+                   /* It's like clicking on the status line of a window. */
+                   if (curwin != old_curwin)
+                       end_visual_mode();
+               }
            }
            else if (c1 < 0)
            {
@@ -7895,6 +7905,9 @@ nv_g_cmd(cap)
     case 't':
        goto_tabpage((int)cap->count0);
        break;
+    case 'T':
+       goto_tabpage(-(int)cap->count1);
+       break;
 #endif
 
     default:
index 00646082473a40c4f2bc10b294dbeb04627dcd10..2ede37d9161dfaa5f36a8f065183cf5e81a8c185 100644 (file)
 #define HAVE_FSYNC
 #define HAVE_GETPWUID
 #define HAVE_GETPWNAM
+#define HAVE_STDARG_H
 #define        HAVE_STDLIB_H
 #define        HAVE_STRING_H
 #define        HAVE_ERRNO_H
index a171e9730be4892a77b939a3e7fb0b44a092141f..94e1393ce077eba923fada4b7f7645cd7f95c295 100644 (file)
@@ -35,8 +35,7 @@ void alist_set __ARGS((alist_T *al, int count, char_u **files, int use_curbuf, i
 void alist_add __ARGS((alist_T *al, char_u *fname, int set_fnum));
 void alist_slash_adjust __ARGS((void));
 void ex_splitview __ARGS((exarg_T *eap));
-void ex_tabedit __ARGS((exarg_T *eap));
-void ex_tab __ARGS((exarg_T *eap));
+void tabpage_new __ARGS((void));
 void do_exedit __ARGS((exarg_T *eap, win_T *old_curwin));
 void free_cd_dir __ARGS((void));
 void do_sleep __ARGS((long msec));
index a29f0678457f68ecb9083cc4657d6f6b8b299595..7319e80777ae583891e0e039c5fb3e8689041a71 100644 (file)
@@ -1472,14 +1472,17 @@ qf_jump(qi, dir, errornr, forceit)
     /*
      * For ":helpgrep" find a help window or open one.
      */
-    if (qf_ptr->qf_type == 1 && !curwin->w_buffer->b_help)
+    if (qf_ptr->qf_type == 1 && (!curwin->w_buffer->b_help || cmdmod.tab != 0))
     {
        win_T   *wp;
        int     n;
 
-       for (wp = firstwin; wp != NULL; wp = wp->w_next)
-           if (wp->w_buffer != NULL && wp->w_buffer->b_help)
-               break;
+       if (cmdmod.tab != 0)
+           wp = NULL;
+       else
+           for (wp = firstwin; wp != NULL; wp = wp->w_next)
+               if (wp->w_buffer != NULL && wp->w_buffer->b_help)
+                   break;
        if (wp != NULL && wp->w_buffer->b_nwindows > 0)
            win_enter(wp, TRUE);
        else
@@ -2182,6 +2185,7 @@ ex_copen(eap)
     qf_info_T  *qi = &ql_info;
     int                height;
     win_T      *win;
+    tabpage_T  *prevtab = curtab;
 
     if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
     {
@@ -2210,7 +2214,7 @@ ex_copen(eap)
      */
     win = qf_find_win(qi);
 
-    if (win != NULL)
+    if (win != NULL && cmdmod.tab == 0)
        win_goto(win);
     else
     {
@@ -2247,10 +2251,13 @@ ex_copen(eap)
        set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL);
        set_option_value((char_u *)"diff", 0L, (char_u *)"", OPT_LOCAL);
 
+       /* Only set the height when still in the same tab page and there is no
+        * window to the side. */
+       if (curtab == prevtab
 #ifdef FEAT_VERTSPLIT
-       /* Only set the height when there is no window to the side. */
-       if (curwin->w_width == Columns)
+               && curwin->w_width == Columns
 #endif
+          )
            win_setheight(height);
        curwin->w_p_wfh = TRUE;     /* set 'winfixheight' */
        if (win_valid(win))
index ed2889e4bf72cefc92713ae41ddfd12e2f7616d6..8cef850d2be6cbb83bef587588f04050ff74a778 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -3076,8 +3076,9 @@ jumpto_tag(lbuf, forceit, keep_help)
        }
     }
 
-    /* if it was a CTRL-W CTRL-] command split window now */
-    if (postponed_split)
+    /* If it was a CTRL-W CTRL-] command split window now.  For ":tab tag"
+     * open a new tab page. */
+    if (postponed_split || cmdmod.tab != 0)
     {
        win_split(postponed_split > 0 ? postponed_split : 0,
                                                       postponed_split_flags);
index 548113dfc087511080d385c11c1115d82329578b..c116dfc840577fe82815f869f1d7e0c011e8725f 100644 (file)
@@ -622,6 +622,10 @@ win_split(size, flags)
     int                size;
     int                flags;
 {
+    /* When the ":tab" modifier was used open a new tab page instead. */
+    if (may_open_tabpage() == OK)
+       return OK;
+
     /* Add flags from ":vertical", ":topleft" and ":botright". */
     flags |= cmdmod.split;
     if ((flags & WSP_TOP) && (flags & WSP_BOT))
@@ -2303,14 +2307,13 @@ alt_tabpage()
 {
     tabpage_T  *tp;
 
-    /* Use the next tab page if we are currently at the first one. */
-    if (curtab == first_tabpage)
+    /* Use the next tab page if possible. */
+    if (curtab->tp_next != NULL)
        return curtab->tp_next;
 
-    /* Find the previous tab page. */
-    for (tp = first_tabpage; tp->tp_next != NULL; tp = tp->tp_next)
-       if (tp->tp_next == curtab)
-           break;
+    /* Find the last but one tab page. */
+    for (tp = first_tabpage; tp->tp_next != curtab; tp = tp->tp_next)
+       ;
     return tp;
 }
 
@@ -2990,14 +2993,17 @@ free_tabpage(tp)
 /*
  * Create a new Tab page with one window.
  * It will edit the current buffer, like after ":split".
- * Put it just after the current Tab page.
+ * When "after" is 0 put it just after the current Tab page.
+ * Otherwise put it just before tab page "after".
  * Return FAIL or OK.
  */
     int
-win_new_tabpage()
+win_new_tabpage(after)
+    int                after;
 {
     tabpage_T  *tp = curtab;
     tabpage_T  *newtp;
+    int                n;
 
     newtp = alloc_tabpage();
     if (newtp == NULL)
@@ -3015,8 +3021,25 @@ win_new_tabpage()
     if (win_alloc_firstwin(tp->tp_curwin) == OK)
     {
        /* Make the new Tab page the new topframe. */
-       newtp->tp_next = tp->tp_next;
-       tp->tp_next = newtp;
+       if (after == 1)
+       {
+           /* New tab page becomes the first one. */
+           newtp->tp_next = first_tabpage;
+           first_tabpage = newtp;
+       }
+       else
+       {
+           if (after > 0)
+           {
+               /* Put new tab page before tab page "after". */
+               n = 2;
+               for (tp = first_tabpage; tp->tp_next != NULL
+                                              && n < after; tp = tp->tp_next)
+                   ++n;
+           }
+           newtp->tp_next = tp->tp_next;
+           tp->tp_next = newtp;
+       }
        win_init_size();
        firstwin->w_winrow = tabpageline_height();
 
@@ -3035,6 +3058,24 @@ win_new_tabpage()
     return FAIL;
 }
 
+/*
+ * Open a new tab page if ":tab cmd" was used.  It will edit the same buffer,
+ * like with ":split".
+ * Returns OK if a new tab page was created, FAIL otherwise.
+ */
+    int
+may_open_tabpage()
+{
+    int                n = cmdmod.tab;
+
+    if (cmdmod.tab != 0)
+    {
+       cmdmod.tab = 0;     /* reset it to avoid doing it twice */
+       return win_new_tabpage(n);
+    }
+    return FAIL;
+}
+
 /*
  * Create up to "maxcount" tabpages with empty windows.
  * Returns the number of resulting tab pages.
@@ -3059,7 +3100,7 @@ make_tabpages(maxcount)
 #endif
 
     for (todo = count - 1; todo > 0; --todo)
-       if (win_new_tabpage() == FAIL)
+       if (win_new_tabpage(0) == FAIL)
            break;
 
 #ifdef FEAT_AUTOCMD
@@ -3212,6 +3253,7 @@ goto_tabpage(n)
     int            n;
 {
     tabpage_T  *tp;
+    tabpage_T  *ttp;
     int                i;
 
     /* If there is only one it can't work. */
@@ -3230,6 +3272,19 @@ goto_tabpage(n)
        else
            tp = curtab->tp_next;
     }
+    else if (n < 0)
+    {
+       /* "gT": go to previous tab page, wrap around end.  "N gT" repeats
+        * this N times. */
+       ttp = curtab;
+       for (i = n; i < 0; ++i)
+       {
+           for (tp = first_tabpage; tp->tp_next != ttp && tp->tp_next != NULL;
+                   tp = tp->tp_next)
+               ;
+           ttp = tp;
+       }
+    }
     else
     {
        /* Go to tab page "n". */
@@ -3243,7 +3298,7 @@ goto_tabpage(n)
        }
     }
 
-    if (leave_tabpage(tp->tp_curwin->w_buffer) == OK)
+    if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer) == OK)
     {
        if (valid_tabpage(tp))
            enter_tabpage(tp, curbuf);
@@ -3252,6 +3307,51 @@ goto_tabpage(n)
     }
 }
 
+/*
+ * Move the current tab page to before tab page "nr".
+ */
+    void
+tabpage_move(nr)
+    int                nr;
+{
+    int                n = nr;
+    tabpage_T  *tp;
+
+    if (first_tabpage->tp_next == NULL)
+       return;
+
+    /* Remove the current tab page from the list of tab pages. */
+    if (curtab == first_tabpage)
+       first_tabpage = curtab->tp_next;
+    else
+    {
+       for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
+           if (tp->tp_next == curtab)
+               break;
+       if (tp == NULL) /* "cannot happen" */
+           return;
+       tp->tp_next = curtab->tp_next;
+    }
+
+    /* Re-insert it at the specified position. */
+    if (n == 0)
+    {
+       curtab->tp_next = first_tabpage;
+       first_tabpage = curtab;
+    }
+    else
+    {
+       for (tp = first_tabpage; tp->tp_next != NULL && n > 1; tp = tp->tp_next)
+           --n;
+       curtab->tp_next = tp->tp_next;
+       tp->tp_next = curtab;
+    }
+
+    /* Need to redraw the tabline.  Tab page contents doesn't change. */
+    redraw_tabline = TRUE;
+}
+
+
 /*
  * Go to another window.
  * When jumping to another buffer, stop Visual mode.  Do this before