openSUSE Commits
Threads by month
- ----- 2024 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2012
- 1 participants
- 1446 discussions
Hello community,
here is the log from the commit of package vim-plugins for openSUSE:Factory checked in at 2012-06-29 10:25:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vim-plugins (Old)
and /work/SRC/openSUSE:Factory/.vim-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vim-plugins", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/vim-plugins/vim-plugins.changes 2011-10-19 13:51:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.vim-plugins.new/vim-plugins.changes 2012-06-29 10:45:39.000000000 +0200
@@ -1,0 +2,19 @@
+Wed Jun 27 12:35:19 UTC 2012 - puzel(a)suse.com
+
+- fixed some license strings (bnc#768672)
+- updated following plugins to latest versions:
+ o align
+ o bufexplorer
+ o calendar
+ o colorsel
+ o diffchanges
+ o nerdcommenter
+ o nerdtree
+ o tlib
+ o tselectbuffer
+ o zoomwin
+ o latex
+ o rails
+- drop colorsel-disable-nogui-warning-error.patch (upstream)
+
+-------------------------------------------------------------------
Old:
----
colorsel-disable-nogui-warning-error.patch
vimplugin-NERDcommenter-2.2.2.tar.bz2
vimplugin-NERDtree-4.1.0.tar.bz2
vimplugin-align-35.41.tar.bz2
vimplugin-bufexplorer-7.2.6.tar.bz2
vimplugin-calendar-2.1.tar.bz2
vimplugin-colorsel-20051121.tar.bz2
vimplugin-diffchanges-0.2.6.tar.bz2
vimplugin-latex-20100129.tar.bz2
vimplugin-rails-4.3.tar.bz2
vimplugin-tlib-0.36.tar.bz2
vimplugin-tselectbuffer-0.6.tar.bz2
vimplugin-zoomwin-23.tar.bz2
New:
----
vimplugin-NERDcommenter-2.3.0.tar.bz2
vimplugin-NERDtree-4.2.0.tar.bz2
vimplugin-align-36.42.tar.bz2
vimplugin-bufexplorer-7.2.8.tar.bz2
vimplugin-calendar-2.4.tar.bz2
vimplugin-colorsel-20110107.tar.bz2
vimplugin-diffchanges-0.6.346dae2.tar.bz2
vimplugin-latex-20120125.tar.bz2
vimplugin-rails-4.4.tar.bz2
vimplugin-tlib-0.42.tar.bz2
vimplugin-tselectbuffer-0.7.tar.bz2
vimplugin-zoomwin-24.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vim-plugins.spec ++++++
--- /var/tmp/diff_new_pack.dfqjb4/_old 2012-06-29 10:45:41.000000000 +0200
+++ /var/tmp/diff_new_pack.dfqjb4/_new 2012-06-29 10:45:41.000000000 +0200
@@ -16,38 +16,38 @@
#
-%define align_version 35.41
+%define align_version 36.42
%define a_version 2.18
-%define bufexplorer_version 7.2.6
-%define calendar_version 2.1
-%define colorsel_version 20051121
+%define bufexplorer_version 7.2.8
+%define calendar_version 2.4
+%define colorsel_version 20110107
%define colorschemes_version 1.0
-%define diffchanges_version 0.2.6
+%define diffchanges_version 0.6.346dae2
%define locateopen_version 1.3
%define matchit_version 1.13.2
%define matrix_version 1.10
%define minibufexpl_version 6.3.2
%define multiplesearch_version 1.3
-%define NERDcommenter_version 2.2.2
-%define NERDtree_version 4.1.0
+%define NERDcommenter_version 2.3.0
+%define NERDtree_version 4.2.0
%define project_version 1.4.1
%define searchcomplete_version 1.1
%define showmarks_version 2.2
%define supertab_version 1.0
%define taglist_version 4.5
-%define tlib_version 0.36
+%define tlib_version 0.42
%define tregisters_version 0.2
-%define tselectbuffer_version 0.6
+%define tselectbuffer_version 0.7
%define tselectfiles_version 0.10
%define utl_version 2.0
-%define zoomwin_version 23
-%define latex_version 20100129
+%define zoomwin_version 24
+%define latex_version 20120125
%define quilt_version 0.9.6
%define vimwiki_version 1.1.1
%define gnupg_version 3026
%define gitdiff_version 2
%define snipmate_version 0.83
-%define rails_version 4.3
+%define rails_version 4.4
Name: vim-plugins
Version: 7.2.22
@@ -89,7 +89,6 @@
Source30: vimplugin-snipmate-%{snipmate_version}.tar.bz2
Source31: vimplugin-rails-%{rails_version}.tar.bz2
Source100: spec.snippets
-Patch0: colorsel-disable-nogui-warning-error.patch
Patch1: locateopen-1.3-locate-support.patch
BuildRequires: vim
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -103,7 +102,7 @@
%package -n vim-plugin-align
Version: %align_version
Release: 3
-License: MIT
+License: SUSE-Vim
Summary: Plugin to produce aligned text, equations, declarations, etc
Group: Productivity/Text/Editors
Requires: vim
@@ -117,7 +116,7 @@
%package -n vim-plugin-a
Version: %a_version
Release: 3
-License: MIT
+License: ISC
Summary: Alternate files quickly
Group: Productivity/Text/Editors
Requires: vim
@@ -131,7 +130,7 @@
%package -n vim-plugin-bufexplorer
Version: %bufexplorer_version
Release: 3
-License: MIT
+License: ISC
Summary: Buffer Explorer / Browser
Group: Productivity/Text/Editors
Requires: vim
@@ -158,7 +157,7 @@
%package -n vim-plugin-colorsel
Version: %colorsel_version
Release: 3
-License: Public Domain
+License: SUSE-Public-Domain
Summary: A RGB/HSV color selector
Group: Productivity/Text/Editors
Requires: gvim
@@ -171,7 +170,7 @@
%package -n vim-plugin-colorschemes
Version: %colorschemes_version
Release: 3
-License: Various - see contained files for details
+License: GPL-2.0
Summary: Vim color schemes selection
Group: Productivity/Text/Editors
Requires: vim
@@ -183,7 +182,7 @@
%package -n vim-plugin-diffchanges
Version: %diffchanges_version
Release: 3
-License: Public Domain
+License: SUSE-Vim
Summary: Show changes since the last save
Group: Productivity/Text/Editors
Requires: diffutils
@@ -198,7 +197,7 @@
%package -n vim-plugin-locateopen
Version: %locateopen_version
Release: 3
-License: Other uncritical OpenSource License
+License: SUSE-Vim
Summary: Edit file without entering the whole path
Group: Productivity/Text/Editors
Requires: findutils-locate
@@ -234,7 +233,7 @@
%package -n vim-plugin-matrix
Version: %matrix_version
Release: 3
-License: Public Domain
+License: SUSE-Public-Domain
Summary: Matrix screensaver for vim
Group: Productivity/Text/Editors
Requires: vim
@@ -245,7 +244,7 @@
%package -n vim-plugin-minibufexpl
Version: %minibufexpl_version
Release: 3
-License: MIT
+License: ISC
Summary: Elegant buffer explorer that takes very little screen space
Group: Productivity/Text/Editors
Requires: vim
@@ -259,7 +258,7 @@
%package -n vim-plugin-multiplesearch
Version: %multiplesearch_version
Release: 3
-License: Other uncritical OpenSource License
+License: SUSE-Vim
Summary: Display multiple searches at the same time
Group: Productivity/Text/Editors
Requires: vim
@@ -273,7 +272,7 @@
%package -n vim-plugin-NERDcommenter
Version: %NERDcommenter_version
Release: 3
-License: WTFPL
+License: SUSE-WTFPL-2.0
Summary: A plugin that allows for easy commenting of code for many filetypes
Group: Productivity/Text/Editors
Requires: vim
@@ -286,7 +285,7 @@
%package -n vim-plugin-NERDtree
Version: %NERDtree_version
Release: 3
-License: WTFPL
+License: SUSE-WTFPL-2.0
Summary: A tree explorer plugin for navigating the filesystem
Group: Productivity/Text/Editors
Requires: vim
@@ -318,7 +317,7 @@
%package -n vim-plugin-searchcomplete
Version: %searchcomplete_version
Release: 3
-License: GPLv2
+License: GPL-2.0
Summary: Tab completion of words inside of a search
Group: Productivity/Text/Editors
Requires: vim
@@ -330,7 +329,7 @@
%package -n vim-plugin-showmarks
Version: %showmarks_version
Release: 3
-License: Public Domain
+License: SUSE-Public-Domain
Summary: Visually shows the location of marks
Group: Productivity/Text/Editors
Requires: vim
@@ -346,7 +345,7 @@
%package -n vim-plugin-supertab
Version: %supertab_version
Release: 3
-License: BSD
+License: BSD-3-Clause
Summary: Visually shows the location of marks
Group: Productivity/Text/Editors
Requires: vim
@@ -357,7 +356,7 @@
%package -n vim-plugin-taglist
Version: %taglist_version
Release: 3
-License: MIT
+License: ISC
Summary: Source code browser with support for many languages
Group: Productivity/Text/Editors
Requires: ctags
@@ -371,7 +370,7 @@
%package -n vim-plugin-tlib
Version: %tlib_version
Release: 3
-License: GPL
+License: GPL-1.0+
Summary: Utility functions for vim
Group: Productivity/Text/Editors
Requires: vim
@@ -383,7 +382,7 @@
%package -n vim-plugin-tregisters
Version: %tregisters_version
Release: 3
-License: GPL
+License: GPL-1.0+
Summary: List, edit, and run/execute registers/clipboards
Group: Productivity/Text/Editors
Requires: vim
@@ -395,7 +394,7 @@
%package -n vim-plugin-tselectbuffer
Version: %tselectbuffer_version
Release: 3
-License: GPL
+License: GPL-1.0+
Summary: A quick buffer selector/switcher
Group: Productivity/Text/Editors
Requires: vim
@@ -408,7 +407,7 @@
%package -n vim-plugin-tselectfiles
Version: %tselectfiles_version
Release: 3
-License: GPL
+License: GPL-1.0+
Summary: A quick file selector/browser/explorer
Group: Productivity/Text/Editors
Requires: vim
@@ -422,7 +421,7 @@
%package -n vim-plugin-utl
Version: %utl_version
Release: 3
-License: MIT
+License: GPL-1.0+
Summary: Universal text linking for vim
Group: Productivity/Text/Editors
Requires: vim
@@ -435,7 +434,7 @@
%package -n vim-plugin-zoomwin
Version: %zoomwin_version
Release: 3
-License: Other uncritical OpenSource License
+License: SUSE-Vim
Summary: Zoom in/out of windows (toggle between one window and multi-window)
Group: Productivity/Text/Editors
Requires: vim
@@ -450,7 +449,7 @@
%package -n vim-plugin-latex
Version: %latex_version
Release: 3
-License: Other uncritical OpenSource License
+License: SUSE-Vim
Summary: A rich set of tools for editing LaTeX
Group: Productivity/Text/Editors
Requires: texlive-latex
@@ -465,7 +464,7 @@
%package -n vim-plugin-quilt
Version: %quilt_version
Release: 3
-License: GPL
+License: GPL-2.0
Summary: Quilt support for vim
Group: Productivity/Text/Editors
Requires: quilt
@@ -477,7 +476,7 @@
%package -n vim-plugin-vimwiki
Version: %vimwiki_version
Release: 1
-License: GPL v2
+License: GPL-2.0
Summary: Personal wiki for vim
Group: Productivity/Text/Editors
Requires: vim
@@ -491,7 +490,7 @@
%package -n vim-plugin-gnupg
Version: %gnupg_version
Release: 3
-License: GPL
+License: GPL-1.0+
Summary: Plugin for transparent editing of gpg encrypted files
Group: Productivity/Text/Editors
Requires: gpg2
@@ -542,6 +541,7 @@
Version: %rails_version
Release: 1
+License: SUSE-Vim
Summary: Support for Ruby on Rails development
Group: Productivity/Text/Editors
Requires: rubygem-rails
@@ -556,11 +556,6 @@
%patch1
popd
-# -------- patch colorsel -------
-pushd vimplugin-colorsel-%colorsel_version
-%patch0 -p1
-popd
-
%build
%install
@@ -575,6 +570,11 @@
cp %{SOURCE100} %{buildroot}/%vimplugin_dir/snippets/
+# delete unneeded files
+rm -rf %{buildroot}/%vimplugin_dir/doc/Makefile*
+rm -rf %{buildroot}/%vimplugin_dir/doc/README*
+rm -rf %{buildroot}/%vimplugin_dir/doc/*.{xml,xsl,css}
+
%clean
rm -rf %{buildroot}
@@ -771,6 +771,26 @@
vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags %vimplugin_dir/doc/' '+qa!' < /dev/null &> /dev/null
fi
+# documentation: vim-plugin-colorsel
+
+%post -n vim-plugin-colorsel
+vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags %vimplugin_dir/doc/' '+qa!' < /dev/null &> /dev/null
+
+%postun -n vim-plugin-colorsel
+if [ $1 == 0 ]; then
+ vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags %vimplugin_dir/doc/' '+qa!' < /dev/null &> /dev/null
+fi
+
+# documentation: vim-plugin-diffchanges
+
+%post -n vim-plugin-diffchanges
+vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags %vimplugin_dir/doc/' '+qa!' < /dev/null &> /dev/null
+
+%postun -n vim-plugin-diffchanges
+if [ $1 == 0 ]; then
+ vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags %vimplugin_dir/doc/' '+qa!' < /dev/null &> /dev/null
+fi
+
%post
vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags %vimplugin_dir/doc/' '+qa!' < /dev/null &> /dev/null
@@ -805,6 +825,8 @@
%files -n vim-plugin-colorsel
%defattr(-,root,root,0755)
%vimplugin_dir/plugin/colorsel.vim
+%vimplugin_dir/autoload/colorsel.vim
+%vimplugin_dir/doc/colorsel.txt
%files -n vim-plugin-colorschemes
%defattr(-,root,root,0755)
@@ -813,6 +835,7 @@
%files -n vim-plugin-diffchanges
%defattr(-,root,root,0755)
%vimplugin_dir/plugin/diffchanges.vim
+%vimplugin_dir/doc/diffchanges.txt
%files -n vim-plugin-locateopen
%defattr(-,root,root,0755)
@@ -846,6 +869,7 @@
%defattr(-,root,root,0755)
%vimplugin_dir/doc/NERD_tree.txt
%vimplugin_dir/plugin/NERD_tree.vim
+%vimplugin_dir/syntax/nerdtree.vim
%doc %{_defaultdocdir}/vimplugin-NERDtree
%files -n vim-plugin-project
@@ -886,6 +910,8 @@
%files -n vim-plugin-tselectbuffer
%defattr(-,root,root,0755)
%vimplugin_dir/plugin/tselectbuffer.vim
+%vimplugin_dir/autoload/tselectbuffer.vim
+%vimplugin_dir/doc/tselectbuffer.txt
%files -n vim-plugin-tselectfiles
%defattr(-,root,root,0755)
@@ -927,6 +953,7 @@
%vimplugin_dir/ftplugin/tex_latexSuite.vim
%vimplugin_dir/ftplugin/bib_latexSuite.vim
%vimplugin_dir/ltags
+%vimplugin_dir/latextags
%files -n vim-plugin-quilt
%defattr(-,root,root,0755)
++++++ vimplugin-NERDcommenter-2.2.2.tar.bz2 -> vimplugin-NERDcommenter-2.3.0.tar.bz2 ++++++
++++ 2259 lines of diff (skipped)
++++++ vimplugin-NERDtree-4.1.0.tar.bz2 -> vimplugin-NERDtree-4.2.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-NERDtree-4.1.0/doc/NERD_tree.txt new/vimplugin-NERDtree-4.2.0/doc/NERD_tree.txt
--- old/vimplugin-NERDtree-4.1.0/doc/NERD_tree.txt 2009-12-01 10:20:00.000000000 +0100
+++ new/vimplugin-NERDtree-4.2.0/doc/NERD_tree.txt 2011-12-28 14:17:41.000000000 +0100
@@ -129,9 +129,13 @@
Close the NERD tree in this tab.
:NERDTreeFind *:NERDTreeFind*
- Find the current file in the tree. If no tree exists for the current tab,
- or the file is not under the current root, then initialize a new tree where
- the root is the directory of the current file.
+ Find the current file in the tree.
+
+ If not tree exists and the current file is under vim's CWD, then init a
+ tree at the CWD and reveal the file. Otherwise init a tree in the current
+ file's directory.
+
+ In any case, the current file is revealed and the cursor is placed on it.
------------------------------------------------------------------------------
2.2. Bookmarks *NERDTreeBookmarks*
@@ -155,6 +159,8 @@
:Bookmark <name>
Bookmark the current node as <name>. If there is already a <name>
bookmark, it is overwritten. <name> must not contain spaces.
+ If <name> is not provided, it defaults to the file or directory name.
+ For directories, a trailing slash is present.
:BookmarkToRoot <bookmark>
Make the directory corresponding to <bookmark> the new root. If a treenode
@@ -642,6 +648,12 @@
|'NERDTreeWinSize'| Sets the window size when the NERD tree is
opened.
+|'NERDTreeMinimalUI'| Disables display of the 'Bookmarks' label and
+ 'Press ? for help' text.
+
+|'NERDTreeDirArrows'| Tells the NERD tree to use arrows instead of
+ + ~ chars when displaying directories.
+
------------------------------------------------------------------------------
3.2. Customisation details *NERDTreeOptionDetails*
@@ -921,6 +933,30 @@
This option is used to change the size of the NERD tree when it is loaded.
+------------------------------------------------------------------------------
+ *'NERDTreeMinimalUI'*
+Values: 0 or 1
+Default: 0
+
+This options disables the 'Bookmarks' label 'Press ? for help' text. Use one
+of the following lines to set this option: >
+ let NERDTreeMinimalUI=0
+ let NERDTreeMinimalUI=1
+<
+
+------------------------------------------------------------------------------
+ *'NERDTreeDirArrows'*
+Values: 0 or 1
+Default: 0.
+
+This option is used to change the default look of directory nodes displayed in
+the tree. When set to 0 it shows old-school bars (|), + and ~ chars. If set to
+1 it shows right and down arrows. Use one of the follow lines to set this
+option: >
+ let NERDTreeDirArrows=0
+ let NERDTreeDirArrows=1
+<
+
==============================================================================
4. The NERD tree API *NERDTreeAPI*
@@ -1080,6 +1116,23 @@
==============================================================================
6. Changelog *NERDTreeChangelog*
+4.2.0
+ - Add NERDTreeDirArrows option to make the UI use pretty arrow chars
+ instead of the old +~| chars to define the tree structure (sickill)
+ - shift the syntax highlighting out into its own syntax file (gnap)
+ - add some mac specific options to the filesystem menu - for macvim
+ only (andersonfreitas)
+ - Add NERDTreeMinimalUI option to remove some non functional parts of the
+ nerdtree ui (camthompson)
+ - tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the
+ new behaviour (benjamingeiger)
+ - if no name is given to :Bookmark, make it default to the name of the
+ target file/dir (minyoung)
+ - use 'file' completion when doing copying, create, and move
+ operations (EvanDotPro)
+ - lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly
+ Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!)
+
4.1.0
features:
- NERDTreeFind to reveal the node for the current buffer in the tree,
@@ -1214,6 +1267,22 @@
Ricky
jfilip1024
Chris Chambers
+ Vitaly Bogdanov
+ Patrick O'Loughlin (paddyoloughlin)
+ Cam Thompson (camthompson)
+ Marcin Kulik (sickill)
+ Steve DeWald (sdewald)
+ Ivan Necas (iNecas)
+ George Ang (gnap)
+ Evan Coury (EvanDotPro)
+ Andrew Radev (AndrewRadev)
+ Matt Gauger (mathias)
+ Scott Stevenson (scottstvnsn)
+ Anderson Freitas (andersonfreitas)
+ Kamil K. Lemański (kml)
+ Yehuda Katz (wycats)
+ Min-Young Wu (minyoung)
+ Benjamin Geiger (benjamingeiger)
==============================================================================
8. License *NERDTreeLicense*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-NERDtree-4.1.0/nerdtree_plugin/fs_menu.vim new/vimplugin-NERDtree-4.2.0/nerdtree_plugin/fs_menu.vim
--- old/vimplugin-NERDtree-4.1.0/nerdtree_plugin/fs_menu.vim 2009-10-10 01:20:00.000000000 +0200
+++ new/vimplugin-NERDtree-4.2.0/nerdtree_plugin/fs_menu.vim 2011-12-28 14:17:41.000000000 +0100
@@ -16,8 +16,15 @@
let g:loaded_nerdtree_fs_menu = 1
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
-call NERDTreeAddMenuItem({'text': '(m)ove the curent node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
-call NERDTreeAddMenuItem({'text': '(d)elete the curent node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
+call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
+call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
+
+if has("gui_mac") || has("gui_macvim")
+ call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'})
+ call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'})
+ call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'})
+endif
+
if g:NERDTreePath.CopyingSupported()
call NERDTreeAddMenuItem({'text': '(c)copy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
endif
@@ -57,7 +64,7 @@
let newNodeName = input("Add a childnode\n".
\ "==========================================================\n".
\ "Enter the dir/file name to be created. Dirs end with a '/'\n" .
- \ "", curDirNode.path.str({'format': 'Glob'}) . g:NERDTreePath.Slash())
+ \ "", curDirNode.path.str() . g:NERDTreePath.Slash(), "file")
if newNodeName ==# ''
call s:echo("Node Creation Aborted.")
@@ -85,7 +92,7 @@
let newNodePath = input("Rename the current node\n" .
\ "==========================================================\n" .
\ "Enter the new path for the node: \n" .
- \ "", curNode.path.str())
+ \ "", curNode.path.str(), "file")
if newNodePath ==# ''
call s:echo("Node Renaming Aborted.")
@@ -163,7 +170,7 @@
let newNodePath = input("Copy the current node\n" .
\ "==========================================================\n" .
\ "Enter the new path to copy the node to: \n" .
- \ "", currentNode.path.str())
+ \ "", currentNode.path.str(), "file")
if newNodePath != ""
"strip trailing slash
@@ -179,8 +186,10 @@
if confirmed
try
let newNode = currentNode.copy(newNodePath)
- call NERDTreeRender()
- call newNode.putCursorHere(0, 0)
+ if !empty(newNode)
+ call NERDTreeRender()
+ call newNode.putCursorHere(0, 0)
+ endif
catch /^NERDTree/
call s:echoWarning("Could not copy node")
endtry
@@ -191,4 +200,25 @@
redraw
endfunction
+function! NERDTreeQuickLook()
+ let treenode = g:NERDTreeFileNode.GetSelected()
+ if treenode != {}
+ call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'")
+ endif
+endfunction
+
+function! NERDTreeRevealInFinder()
+ let treenode = g:NERDTreeFileNode.GetSelected()
+ if treenode != {}
+ let x = system("open -R '" . treenode.path.str() . "'")
+ endif
+endfunction
+
+function! NERDTreeExecuteFile()
+ let treenode = g:NERDTreeFileNode.GetSelected()
+ if treenode != {}
+ let x = system("open '" . treenode.path.str() . "'")
+ endif
+endfunction
+
" vim: set sw=4 sts=4 et fdm=marker:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-NERDtree-4.1.0/plugin/NERD_tree.vim new/vimplugin-NERDtree-4.2.0/plugin/NERD_tree.vim
--- old/vimplugin-NERDtree-4.1.0/plugin/NERD_tree.vim 2009-12-01 10:20:00.000000000 +0100
+++ new/vimplugin-NERDtree-4.2.0/plugin/NERD_tree.vim 2011-12-28 14:17:41.000000000 +0100
@@ -2,7 +2,7 @@
" File: NERD_tree.vim
" Description: vim global plugin that provides a nice tree explorer
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
-" Last Change: 1 December, 2009
+" Last Change: 28 December, 2011
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
@@ -10,7 +10,7 @@
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" ============================================================================
-let s:NERD_tree_version = '4.1.0'
+let s:NERD_tree_version = '4.2.0'
" SECTION: Script init stuff {{{1
"============================================================
@@ -27,6 +27,8 @@
let s:old_cpo = &cpo
set cpo&vim
+let s:running_windows = has("win16") || has("win32") || has("win64")
+
"Function: s:initVariable() function {{{2
"This function is used to initialise a given variable to a given value. The
"variable is only initialised if it does not exist prior
@@ -39,7 +41,7 @@
"1 if the var is set, 0 otherwise
function! s:initVariable(var, value)
if !exists(a:var)
- exec 'let ' . a:var . ' = ' . "'" . a:value . "'"
+ exec 'let ' . a:var . ' = ' . "'" . substitute(a:value, "'", "''", "g") . "'"
return 1
endif
return 0
@@ -51,6 +53,7 @@
call s:initVariable("g:NERDTreeAutoCenterThreshold", 3)
call s:initVariable("g:NERDTreeCaseSensitiveSort", 0)
call s:initVariable("g:NERDTreeChDirMode", 0)
+call s:initVariable("g:NERDTreeMinimalUI", 0)
if !exists("g:NERDTreeIgnore")
let g:NERDTreeIgnore = ['\~$']
endif
@@ -65,6 +68,7 @@
call s:initVariable("g:NERDTreeShowHidden", 0)
call s:initVariable("g:NERDTreeShowLineNumbers", 0)
call s:initVariable("g:NERDTreeSortDirs", 1)
+call s:initVariable("g:NERDTreeDirArrows", !s:running_windows)
if !exists("g:NERDTreeSortOrder")
let g:NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$']
@@ -90,8 +94,6 @@
call s:initVariable("g:NERDTreeWinPos", "left")
call s:initVariable("g:NERDTreeWinSize", 31)
-let s:running_windows = has("win16") || has("win32") || has("win64")
-
"init the shell commands that will be used to copy nodes, and remove dir trees
"
"Note: the space after the command is important
@@ -142,12 +144,12 @@
if s:running_windows
let s:escape_chars = " `\|\"#%&,?()\*^<>"
else
- let s:escape_chars = " \\`\|\"#%&,?()\*^<>"
+ let s:escape_chars = " \\`\|\"#%&,?()\*^<>[]"
endif
let s:NERDTreeBufName = 'NERD_tree_'
let s:tree_wid = 2
-let s:tree_markup_reg = '^[ `|]*[\-+~]'
+let s:tree_markup_reg = '^[ `|]*[\-+~▾▸ ]\+'
let s:tree_up_dir_line = '.. (up a dir)'
"the number to add to the nerd tree buffer name to make the buf name unique
@@ -167,6 +169,10 @@
augroup NERDTree
"Save the cursor position whenever we close the nerd tree
exec "autocmd BufWinLeave ". s:NERDTreeBufName ."* call <SID>saveScreenState()"
+
+ "disallow insert mode in the NERDTree
+ exec "autocmd BufEnter ". s:NERDTreeBufName ."* stopinsert"
+
"cache bookmarks when vim loads
autocmd VimEnter * call s:Bookmark.CacheBookmarks(0)
@@ -194,6 +200,7 @@
if self.validate()
let n = s:TreeFileNode.New(self.path)
call n.open()
+ call s:closeTreeIfQuitOnOpen()
endif
endif
endfunction
@@ -372,7 +379,7 @@
" FUNCTION: Bookmark.New(name, path) {{{3
" Create a new bookmark object with the given name and path object
function! s:Bookmark.New(name, path)
- if a:name =~ ' '
+ if a:name =~# ' '
throw "NERDTree.IllegalBookmarkNameError: illegal name:" . a:name
endif
@@ -389,7 +396,7 @@
tabnew
call s:initNerdTree(self.name)
else
- exec "tabedit " . bookmark.path.str({'format': 'Edit'})
+ exec "tabedit " . self.path.str({'format': 'Edit'})
endif
if has_key(a:options, 'stayInCurrentTab')
@@ -558,7 +565,7 @@
endfunction
"FUNCTION: MenuController._current(key) {{{3
-"get the MenuItem that is curently selected
+"get the MenuItem that is currently selected
function! s:MenuController._current()
return self.menuItems[self.selection]
endfunction
@@ -806,15 +813,23 @@
"FUNCTION: TreeFileNode.bookmark(name) {{{3
"bookmark this node with a:name
function! s:TreeFileNode.bookmark(name)
+
+ "if a bookmark exists with the same name and the node is cached then save
+ "it so we can update its display string
+ let oldMarkedNode = {}
try
let oldMarkedNode = s:Bookmark.GetNodeForName(a:name, 1)
- call oldMarkedNode.path.cacheDisplayString()
catch /^NERDTree.BookmarkNotFoundError/
+ catch /^NERDTree.BookmarkedNodeNotFoundError/
endtry
call s:Bookmark.AddBookmark(a:name, self.path)
call self.path.cacheDisplayString()
call s:Bookmark.Write()
+
+ if !empty(oldMarkedNode)
+ call oldMarkedNode.path.cacheDisplayString()
+ endif
endfunction
"FUNCTION: TreeFileNode.cacheParent() {{{3
"initializes self.parent if it isnt already
@@ -855,8 +870,10 @@
let parent = b:NERDTreeRoot.findNode(newPath.getParent())
if !empty(parent)
call parent.refresh()
+ return parent.findNode(newPath)
+ else
+ return {}
endif
- return parent.findNode(newPath)
endfunction
"FUNCTION: TreeFileNode.delete {{{3
@@ -1028,7 +1045,7 @@
"gets the line number of the root node
function! s:TreeFileNode.GetRootLineNum()
let rootLine = 1
- while getline(rootLine) !~ '^\(/\|<\)'
+ while getline(rootLine) !~# '^\(/\|<\)'
let rootLine = rootLine + 1
endwhile
return rootLine
@@ -1304,33 +1321,50 @@
"get all the leading spaces and vertical tree parts for this line
if a:depth > 1
for j in a:vertMap[0:-2]
- if j ==# 1
- let treeParts = treeParts . '| '
- else
+ if g:NERDTreeDirArrows
let treeParts = treeParts . ' '
+ else
+ if j ==# 1
+ let treeParts = treeParts . '| '
+ else
+ let treeParts = treeParts . ' '
+ endif
endif
endfor
endif
"get the last vertical tree part for this line which will be different
"if this node is the last child of its parent
- if a:isLastChild
- let treeParts = treeParts . '`'
- else
- let treeParts = treeParts . '|'
+ if !g:NERDTreeDirArrows
+ if a:isLastChild
+ let treeParts = treeParts . '`'
+ else
+ let treeParts = treeParts . '|'
+ endif
endif
-
"smack the appropriate dir/file symbol on the line before the file/dir
"name itself
if self.path.isDirectory
if self.isOpen
- let treeParts = treeParts . '~'
+ if g:NERDTreeDirArrows
+ let treeParts = treeParts . '▾ '
+ else
+ let treeParts = treeParts . '~'
+ endif
else
- let treeParts = treeParts . '+'
+ if g:NERDTreeDirArrows
+ let treeParts = treeParts . '▸ '
+ else
+ let treeParts = treeParts . '+'
+ endif
endif
else
- let treeParts = treeParts . '-'
+ if g:NERDTreeDirArrows
+ let treeParts = treeParts . ' '
+ else
+ let treeParts = treeParts . '-'
+ endif
endif
let line = treeParts . self.displayString()
@@ -1593,7 +1627,7 @@
"filter out the .. and . directories
"Note: we must match .. AND ../ cos sometimes the globpath returns
"../ for path with strange chars (eg $)
- if i !~ '\/\.\.\/\?$' && i !~ '\/\.\/\?$'
+ if i !~# '\/\.\.\/\?$' && i !~# '\/\.\/\?$'
"put the next file in a new node and attach it
try
@@ -1730,7 +1764,7 @@
"filter out the .. and . directories
"Note: we must match .. AND ../ cos sometimes the globpath returns
"../ for path with strange chars (eg $)
- if i !~ '\/\.\.\/\?$' && i !~ '\/\.\/\?$'
+ if i !~# '\/\.\.\/\?$' && i !~# '\/\.\/\?$'
try
"create a new path and see if it exists in this nodes children
@@ -1852,9 +1886,9 @@
function! s:Path.AbsolutePathFor(str)
let prependCWD = 0
if s:running_windows
- let prependCWD = a:str !~ '^.:\(\\\|\/\)'
+ let prependCWD = a:str !~# '^.:\(\\\|\/\)'
else
- let prependCWD = a:str !~ '^/'
+ let prependCWD = a:str !~# '^/'
endif
let toReturn = a:str
@@ -1971,7 +2005,7 @@
try
"if it ends with a slash, assume its a dir create it
- if a:fullpath =~ '\(\\\|\/\)$'
+ if a:fullpath =~# '\(\\\|\/\)$'
"whack the trailing slash off the end if it exists
let fullpath = substitute(a:fullpath, '\(\\\|\/\)$', '', '')
@@ -2001,7 +2035,7 @@
let dest = s:Path.WinToUnixPath(a:dest)
- let cmd = g:NERDTreeCopyCmd . " " . self.str() . " " . dest
+ let cmd = g:NERDTreeCopyCmd . " " . escape(self.str(), s:escape_chars) . " " . escape(dest, s:escape_chars)
let success = system(cmd)
if success != 0
throw "NERDTree.CopyError: Could not copy ''". self.str() ."'' to: '" . a:dest . "'"
@@ -2144,7 +2178,7 @@
function! s:Path.getSortOrderIndex()
let i = 0
while i < len(g:NERDTreeSortOrder)
- if self.getLastPathComponent(1) =~ g:NERDTreeSortOrder[i]
+ if self.getLastPathComponent(1) =~# g:NERDTreeSortOrder[i]
return i
endif
let i = i + 1
@@ -2160,14 +2194,14 @@
"filter out the user specified paths to ignore
if b:NERDTreeIgnoreEnabled
for i in g:NERDTreeIgnore
- if lastPathComponent =~ i
+ if lastPathComponent =~# i
return 1
endif
endfor
endif
"dont show hidden files unless instructed to
- if b:NERDTreeShowHidden ==# 0 && lastPathComponent =~ '^\.'
+ if b:NERDTreeShowHidden ==# 0 && lastPathComponent =~# '^\.'
return 1
endif
@@ -2257,7 +2291,7 @@
let self.isExecutable = 0
if !self.isDirectory
- let self.isExecutable = getfperm(a:fullpath) =~ 'x'
+ let self.isExecutable = getfperm(a:fullpath) =~# 'x'
endif
"grab the last part of the path (minus the trailing slash)
@@ -2276,7 +2310,7 @@
"we always wanna treat MS windows shortcuts as files for
"simplicity
- if hardPath !~ '\.lnk$'
+ if hardPath !~# '\.lnk$'
let self.symLinkDest = self.symLinkDest . '/'
endif
@@ -2508,7 +2542,7 @@
" FUNCTION: s:completeBookmarks(A,L,P) {{{2
" completion function for the bookmark commands
function! s:completeBookmarks(A,L,P)
- return filter(s:Bookmark.BookmarkNames(), 'v:val =~ "^' . a:A . '"')
+ return filter(s:Bookmark.BookmarkNames(), 'v:val =~# "^' . a:A . '"')
endfunction
" FUNCTION: s:exec(cmd) {{{2
" same as :exec cmd but eventignore=all is set for the duration
@@ -2521,14 +2555,25 @@
" FUNCTION: s:findAndRevealPath() {{{2
function! s:findAndRevealPath()
try
- let p = s:Path.New(expand("%"))
+ let p = s:Path.New(expand("%:p"))
catch /^NERDTree.InvalidArgumentsError/
call s:echo("no file for the current buffer")
return
endtry
if !s:treeExistsForTab()
- call s:initNerdTree(p.getParent().str())
+ try
+ let cwd = s:Path.New(getcwd())
+ catch /^NERDTree.InvalidArgumentsError/
+ call s:echo("current directory does not exist.")
+ let cwd = p.getParent()
+ endtry
+
+ if p.isUnder(cwd)
+ call s:initNerdTree(cwd.str())
+ else
+ call s:initNerdTree(p.getParent().str())
+ endif
else
if !p.isUnder(s:TreeFileNode.GetRootForTab().path)
call s:initNerdTree(p.getParent().str())
@@ -2555,7 +2600,7 @@
let dir = a:name ==# '' ? getcwd() : a:name
"hack to get an absolute path if a relative path is given
- if dir =~ '^\.'
+ if dir =~# '^\.'
let dir = getcwd() . s:Path.Slash() . dir
endif
let dir = resolve(dir)
@@ -2624,43 +2669,9 @@
let b:NERDTreeRoot = s:TreeDirNode.New(path)
call b:NERDTreeRoot.open()
- "throwaway buffer options
- setlocal noswapfile
- setlocal buftype=nofile
- setlocal bufhidden=hide
- setlocal nowrap
- setlocal foldcolumn=0
- setlocal nobuflisted
- setlocal nospell
- if g:NERDTreeShowLineNumbers
- setlocal nu
- else
- setlocal nonu
- endif
-
- iabc <buffer>
-
- if g:NERDTreeHighlightCursorline
- setlocal cursorline
- endif
-
- call s:setupStatusline()
-
- let b:treeShowHelp = 0
- let b:NERDTreeIgnoreEnabled = 1
- let b:NERDTreeShowFiles = g:NERDTreeShowFiles
- let b:NERDTreeShowHidden = g:NERDTreeShowHidden
- let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks
-
+ call s:setCommonBufOptions()
let b:NERDTreeType = "secondary"
- call s:bindMappings()
- setfiletype nerdtree
- " syntax highlighting
- if has("syntax") && exists("g:syntax_on")
- call s:setupSyntaxHighlighting()
- endif
-
call s:renderView()
endfunction
" FUNCTION: s:initNerdTreeMirror() {{{2
@@ -2812,9 +2823,17 @@
endif
if winnr("$") != 1
+ if winnr() == s:getTreeWinNum()
+ wincmd p
+ let bufnr = bufnr("")
+ wincmd p
+ else
+ let bufnr = bufnr("")
+ endif
+
call s:exec(s:getTreeWinNum() . " wincmd w")
close
- call s:exec("wincmd p")
+ call s:exec(bufwinnr(bufnr) . " wincmd w")
else
close
endif
@@ -2852,34 +2871,7 @@
endif
setlocal winfixwidth
-
- "throwaway buffer options
- setlocal noswapfile
- setlocal buftype=nofile
- setlocal nowrap
- setlocal foldcolumn=0
- setlocal nobuflisted
- setlocal nospell
- if g:NERDTreeShowLineNumbers
- setlocal nu
- else
- setlocal nonu
- endif
-
- iabc <buffer>
-
- if g:NERDTreeHighlightCursorline
- setlocal cursorline
- endif
-
- call s:setupStatusline()
-
- call s:bindMappings()
- setfiletype nerdtree
- " syntax highlighting
- if has("syntax") && exists("g:syntax_on")
- call s:setupSyntaxHighlighting()
- endif
+ call s:setCommonBufOptions()
endfunction
"FUNCTION: s:dumpHelp {{{2
@@ -2979,12 +2971,12 @@
let @h=@h."\" :OpenBookmark <name>\n"
let @h=@h."\" :ClearBookmarks [<names>]\n"
let @h=@h."\" :ClearAllBookmarks\n"
- else
+ silent! put h
+ elseif g:NERDTreeMinimalUI == 0
let @h="\" Press ". g:NERDTreeMapHelp ." for help\n"
+ silent! put h
endif
- silent! put h
-
let @h = old_h
endfunction
"FUNCTION: s:echo {{{2
@@ -3050,9 +3042,11 @@
return b:NERDTreeRoot.path
endif
- " in case called from outside the tree
- if line !~ '^ *[|`]' || line =~ '^$'
- return {}
+ if !g:NERDTreeDirArrows
+ " in case called from outside the tree
+ if line !~# '^ *[|`▸▾ ]' || line =~# '^$'
+ return {}
+ endif
endif
if line ==# s:tree_up_dir_line
@@ -3065,7 +3059,7 @@
let curFile = s:stripMarkupFromLine(line, 0)
let wasdir = 0
- if curFile =~ '/$'
+ if curFile =~# '/$'
let wasdir = 1
let curFile = substitute(curFile, '/\?$', '/', "")
endif
@@ -3082,7 +3076,7 @@
let dir = b:NERDTreeRoot.path.str({'format': 'UI'}) . dir
break
endif
- if curLineStripped =~ '/$'
+ if curLineStripped =~# '/$'
let lpindent = s:indentLevelFor(curLine)
if lpindent < indent
let indent = indent - 1
@@ -3108,7 +3102,13 @@
endfunction
"FUNCTION: s:indentLevelFor(line) {{{2
function! s:indentLevelFor(line)
- return match(a:line, '[^ \-+~`|]') / s:tree_wid
+ let level = match(a:line, '[^ \-+~▸▾`|]') / s:tree_wid
+ " check if line includes arrows
+ if match(a:line, '[▸▾]') > -1
+ " decrement level as arrow uses 3 ascii chars
+ let level = level - 1
+ endif
+ return level
endfunction
"FUNCTION: s:isTreeOpen() {{{2
function! s:isTreeOpen()
@@ -3198,16 +3198,20 @@
throw "NERDTree.IllegalOperationError: cant find bookmark table, bookmarks arent active"
endif
+ if g:NERDTreeMinimalUI
+ return cursor(1, 2)
+ endif
+
let rootNodeLine = s:TreeFileNode.GetRootLineNum()
let line = 1
- while getline(line) !~ '^>-\+Bookmarks-\+$'
+ while getline(line) !~# '^>-\+Bookmarks-\+$'
let line = line + 1
if line >= rootNodeLine
throw "NERDTree.BookmarkTableNotFoundError: didnt find the bookmarks table"
endif
endwhile
- call cursor(line, 0)
+ call cursor(line, 2)
endfunction
"FUNCTION: s:putCursorInTreeWin(){{{2
@@ -3223,8 +3227,10 @@
"FUNCTION: s:renderBookmarks {{{2
function! s:renderBookmarks()
- call setline(line(".")+1, ">----------Bookmarks----------")
- call cursor(line(".")+1, col("."))
+ if g:NERDTreeMinimalUI == 0
+ call setline(line(".")+1, ">----------Bookmarks----------")
+ call cursor(line(".")+1, col("."))
+ endif
for i in s:Bookmark.Bookmarks()
call setline(line(".")+1, i.str())
@@ -3251,16 +3257,20 @@
call s:dumpHelp()
"delete the blank line before the help and add one after it
- call setline(line(".")+1, "")
- call cursor(line(".")+1, col("."))
+ if g:NERDTreeMinimalUI == 0
+ call setline(line(".")+1, "")
+ call cursor(line(".")+1, col("."))
+ endif
if b:NERDTreeShowBookmarks
call s:renderBookmarks()
endif
"add the 'up a dir' line
- call setline(line(".")+1, s:tree_up_dir_line)
- call cursor(line(".")+1, col("."))
+ if !g:NERDTreeMinimalUI
+ call setline(line(".")+1, s:tree_up_dir_line)
+ call cursor(line(".")+1, col("."))
+ endif
"draw the header line
let header = b:NERDTreeRoot.path.str({'format': 'UI', 'truncateTo': winwidth(0)})
@@ -3340,103 +3350,49 @@
endtry
endfunction
+"FUNCTION: s:setCommonBufOptions() {{{2
+function! s:setCommonBufOptions()
+ "throwaway buffer options
+ setlocal noswapfile
+ setlocal buftype=nofile
+ setlocal bufhidden=hide
+ setlocal nowrap
+ setlocal foldcolumn=0
+ setlocal nobuflisted
+ setlocal nospell
+ if g:NERDTreeShowLineNumbers
+ setlocal nu
+ else
+ setlocal nonu
+ if v:version >= 703
+ setlocal nornu
+ endif
+ endif
+
+ iabc <buffer>
+
+ if g:NERDTreeHighlightCursorline
+ setlocal cursorline
+ endif
+
+ call s:setupStatusline()
+
+
+ let b:treeShowHelp = 0
+ let b:NERDTreeIgnoreEnabled = 1
+ let b:NERDTreeShowFiles = g:NERDTreeShowFiles
+ let b:NERDTreeShowHidden = g:NERDTreeShowHidden
+ let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks
+ setfiletype nerdtree
+ call s:bindMappings()
+endfunction
+
"FUNCTION: s:setupStatusline() {{{2
function! s:setupStatusline()
if g:NERDTreeStatusline != -1
let &l:statusline = g:NERDTreeStatusline
endif
endfunction
-"FUNCTION: s:setupSyntaxHighlighting() {{{2
-function! s:setupSyntaxHighlighting()
- "treeFlags are syntax items that should be invisible, but give clues as to
- "how things should be highlighted
- syn match treeFlag #\~#
- syn match treeFlag #\[RO\]#
-
- "highlighting for the .. (up dir) line at the top of the tree
- execute "syn match treeUp #". s:tree_up_dir_line ."#"
-
- "highlighting for the ~/+ symbols for the directory nodes
- syn match treeClosable #\~\<#
- syn match treeClosable #\~\.#
- syn match treeOpenable #+\<#
- syn match treeOpenable #+\.#he=e-1
-
- "highlighting for the tree structural parts
- syn match treePart #|#
- syn match treePart #`#
- syn match treePartFile #[|`]-#hs=s+1 contains=treePart
-
- "quickhelp syntax elements
- syn match treeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
- syn match treeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
- syn match treeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=treeFlag
- syn match treeToggleOn #".*(on)#hs=e-2,he=e-1 contains=treeHelpKey
- syn match treeToggleOff #".*(off)#hs=e-3,he=e-1 contains=treeHelpKey
- syn match treeHelpCommand #" :.\{-}\>#hs=s+3
- syn match treeHelp #^".*# contains=treeHelpKey,treeHelpTitle,treeFlag,treeToggleOff,treeToggleOn,treeHelpCommand
-
- "highlighting for readonly files
- syn match treeRO #.*\[RO\]#hs=s+2 contains=treeFlag,treeBookmark,treePart,treePartFile
-
- "highlighting for sym links
- syn match treeLink #[^-| `].* -> # contains=treeBookmark,treeOpenable,treeClosable,treeDirSlash
-
- "highlighing for directory nodes and file nodes
- syn match treeDirSlash #/#
- syn match treeDir #[^-| `].*/# contains=treeLink,treeDirSlash,treeOpenable,treeClosable
- syn match treeExecFile #[|`]-.*\*\($\| \)# contains=treeLink,treePart,treeRO,treePartFile,treeBookmark
- syn match treeFile #|-.*# contains=treeLink,treePart,treeRO,treePartFile,treeBookmark,treeExecFile
- syn match treeFile #`-.*# contains=treeLink,treePart,treeRO,treePartFile,treeBookmark,treeExecFile
- syn match treeCWD #^/.*$#
-
- "highlighting for bookmarks
- syn match treeBookmark # {.*}#hs=s+1
-
- "highlighting for the bookmarks table
- syn match treeBookmarksLeader #^>#
- syn match treeBookmarksHeader #^>-\+Bookmarks-\+$# contains=treeBookmarksLeader
- syn match treeBookmarkName #^>.\{-} #he=e-1 contains=treeBookmarksLeader
- syn match treeBookmark #^>.*$# contains=treeBookmarksLeader,treeBookmarkName,treeBookmarksHeader
-
- if g:NERDChristmasTree
- hi def link treePart Special
- hi def link treePartFile Type
- hi def link treeFile Normal
- hi def link treeExecFile Title
- hi def link treeDirSlash Identifier
- hi def link treeClosable Type
- else
- hi def link treePart Normal
- hi def link treePartFile Normal
- hi def link treeFile Normal
- hi def link treeClosable Title
- endif
-
- hi def link treeBookmarksHeader statement
- hi def link treeBookmarksLeader ignore
- hi def link treeBookmarkName Identifier
- hi def link treeBookmark normal
-
- hi def link treeHelp String
- hi def link treeHelpKey Identifier
- hi def link treeHelpCommand Identifier
- hi def link treeHelpTitle Macro
- hi def link treeToggleOn Question
- hi def link treeToggleOff WarningMsg
-
- hi def link treeDir Directory
- hi def link treeUp Directory
- hi def link treeCWD Statement
- hi def link treeLink Macro
- hi def link treeOpenable Title
- hi def link treeFlag ignore
- hi def link treeRO WarningMsg
- hi def link treeBookmark Statement
-
- hi def link NERDTreeCurrentNode Search
-endfunction
-
"FUNCTION: s:stripMarkupFromLine(line, removeLeadingSpaces){{{2
"returns the given line with all the tree parts stripped off
"
@@ -3459,7 +3415,7 @@
let line = substitute (line, '*\ze\($\| \)', "","")
let wasdir = 0
- if line =~ '/$'
+ if line =~# '/$'
let wasdir = 1
endif
let line = substitute (line,' -> .*',"","") " remove link to
@@ -3579,7 +3535,7 @@
"bind all the user custom maps
call s:KeyMap.BindAll()
- command! -buffer -nargs=1 Bookmark :call <SID>bookmarkNode('<args>')
+ command! -buffer -nargs=? Bookmark :call <SID>bookmarkNode('<args>')
command! -buffer -complete=customlist,s:completeBookmarks -nargs=1 RevealBookmark :call <SID>revealBookmark('<args>')
command! -buffer -complete=customlist,s:completeBookmarks -nargs=1 OpenBookmark :call <SID>openBookmark('<args>')
command! -buffer -complete=customlist,s:completeBookmarks -nargs=* ClearBookmarks call <SID>clearBookmarks('<args>')
@@ -3591,11 +3547,15 @@
" FUNCTION: s:bookmarkNode(name) {{{2
" Associate the current node with the given name
-function! s:bookmarkNode(name)
+function! s:bookmarkNode(...)
let currentNode = s:TreeFileNode.GetSelected()
if currentNode != {}
+ let name = a:1
+ if empty(name)
+ let name = currentNode.path.getLastPathComponent(0)
+ endif
try
- call currentNode.bookmark(a:name)
+ call currentNode.bookmark(name)
call s:renderView()
catch /^NERDTree.IllegalBookmarkNameError/
call s:echo("bookmark names must not contain spaces")
@@ -3612,19 +3572,17 @@
let currentNode = s:TreeFileNode.GetSelected()
if currentNode != {}
let startToCur = strpart(getline(line(".")), 0, col("."))
- let char = strpart(startToCur, strlen(startToCur)-1, 1)
- "if they clicked a dir, check if they clicked on the + or ~ sign
- "beside it
if currentNode.path.isDirectory
- if startToCur =~ s:tree_markup_reg . '$' && char =~ '[+~]'
+ if startToCur =~# s:tree_markup_reg . '$' && startToCur =~# '[+~▾▸]$'
call s:activateNode(0)
return
endif
endif
if (g:NERDTreeMouseMode ==# 2 && currentNode.path.isDirectory) || g:NERDTreeMouseMode ==# 3
- if char !~ s:tree_markup_reg && startToCur !~ '\/$'
+ let char = strpart(startToCur, strlen(startToCur)-1, 1)
+ if char !~# s:tree_markup_reg
call s:activateNode(0)
return
endif
@@ -4024,7 +3982,7 @@
"re-rendered
function! s:upDir(keepState)
let cwd = b:NERDTreeRoot.path.str({'format': 'UI'})
- if cwd ==# "/" || cwd =~ '^[^/]..$'
+ if cwd ==# "/" || cwd =~# '^[^/]..$'
call s:echo("already at top dir")
else
if !a:keepState
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-NERDtree-4.1.0/syntax/nerdtree.vim new/vimplugin-NERDtree-4.2.0/syntax/nerdtree.vim
--- old/vimplugin-NERDtree-4.1.0/syntax/nerdtree.vim 1970-01-01 01:00:00.000000000 +0100
+++ new/vimplugin-NERDtree-4.2.0/syntax/nerdtree.vim 2011-12-28 14:17:41.000000000 +0100
@@ -0,0 +1,88 @@
+let s:tree_up_dir_line = '.. (up a dir)'
+"NERDTreeFlags are syntax items that should be invisible, but give clues as to
+"how things should be highlighted
+syn match NERDTreeFlag #\~#
+syn match NERDTreeFlag #\[RO\]#
+
+"highlighting for the .. (up dir) line at the top of the tree
+execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
+
+"highlighting for the ~/+ symbols for the directory nodes
+syn match NERDTreeClosable #\~\<#
+syn match NERDTreeClosable #\~\.#
+syn match NERDTreeOpenable #+\<#
+syn match NERDTreeOpenable #+\.#he=e-1
+
+"highlighting for the tree structural parts
+syn match NERDTreePart #|#
+syn match NERDTreePart #`#
+syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
+
+"quickhelp syntax elements
+syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
+syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
+syn match NERDTreeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=NERDTreeFlag
+syn match NERDTreeToggleOn #".*(on)#hs=e-2,he=e-1 contains=NERDTreeHelpKey
+syn match NERDTreeToggleOff #".*(off)#hs=e-3,he=e-1 contains=NERDTreeHelpKey
+syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
+syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
+
+"highlighting for readonly files
+syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
+
+"highlighting for sym links
+syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
+
+"highlighing for directory nodes and file nodes
+syn match NERDTreeDirSlash #/#
+syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
+syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
+syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
+syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
+syn match NERDTreeCWD #^[</].*$#
+
+"highlighting for bookmarks
+syn match NERDTreeBookmark # {.*}#hs=s+1
+
+"highlighting for the bookmarks table
+syn match NERDTreeBookmarksLeader #^>#
+syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
+syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
+syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
+
+if exists("g:NERDChristmasTree") && g:NERDChristmasTree
+ hi def link NERDTreePart Special
+ hi def link NERDTreePartFile Type
+ hi def link NERDTreeFile Normal
+ hi def link NERDTreeExecFile Title
+ hi def link NERDTreeDirSlash Identifier
+ hi def link NERDTreeClosable Type
+else
+ hi def link NERDTreePart Normal
+ hi def link NERDTreePartFile Normal
+ hi def link NERDTreeFile Normal
+ hi def link NERDTreeClosable Title
+endif
+
+hi def link NERDTreeBookmarksHeader statement
+hi def link NERDTreeBookmarksLeader ignore
+hi def link NERDTreeBookmarkName Identifier
+hi def link NERDTreeBookmark normal
+
+hi def link NERDTreeHelp String
+hi def link NERDTreeHelpKey Identifier
+hi def link NERDTreeHelpCommand Identifier
+hi def link NERDTreeHelpTitle Macro
+hi def link NERDTreeToggleOn Question
+hi def link NERDTreeToggleOff WarningMsg
+
+hi def link NERDTreeDir Directory
+hi def link NERDTreeUp Directory
+hi def link NERDTreeCWD Statement
+hi def link NERDTreeLink Macro
+hi def link NERDTreeOpenable Title
+hi def link NERDTreeFlag ignore
+hi def link NERDTreeRO WarningMsg
+hi def link NERDTreeBookmark Statement
+
+hi def link NERDTreeCurrentNode Search
++++++ vimplugin-align-35.41.tar.bz2 -> vimplugin-align-36.42.tar.bz2 ++++++
++++ 2097 lines of diff (skipped)
++++++ vimplugin-bufexplorer-7.2.6.tar.bz2 -> vimplugin-bufexplorer-7.2.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-bufexplorer-7.2.6/doc/bufexplorer.txt new/vimplugin-bufexplorer-7.2.8/doc/bufexplorer.txt
--- old/vimplugin-bufexplorer-7.2.6/doc/bufexplorer.txt 2010-02-12 09:25:00.000000000 +0100
+++ new/vimplugin-bufexplorer-7.2.8/doc/bufexplorer.txt 2010-11-08 13:54:42.000000000 +0100
@@ -1,7 +1,7 @@
-*bufexplorer.txt* Buffer Explorer Last Change: 10 Feb 2010
+*bufexplorer.txt* Buffer Explorer Last Change: 22 Oct 2010
Buffer Explorer *buffer-explorer* *bufexplorer*
- Version 7.2.6
+ Version 7.2.8
Plugin for easily exploring (or browsing) Vim |:buffers|.
@@ -106,6 +106,10 @@
===============================================================================
CUSTOMIZATION *bufexplorer-customization*
+ *g:bufExplorerChgWin*
+If set, bufexplorer will bring up the selected buffer in the window specified
+by g:bufExplorerChgWin.
+
*g:bufExplorerDefaultHelp*
To control whether the default help is displayed or not, use: >
let g:bufExplorerDefaultHelp=0 " Do not show default help.
@@ -125,6 +129,10 @@
let g:bufExplorerFindActive=1 " Go to active window.
The default is to be taken to the active window.
+ *g:bufExplorerFuncRef*
+When a buffer is selected, the functions specified either singly or as a list
+will be called.
+
*g:bufExplorerReverseSort*
To control whether to sort the buffer in reverse order or not, use: >
let g:bufExplorerReverseSort=0 " Do not sort in reverse order.
@@ -145,6 +153,12 @@
let g:bufExplorerShowRelativePath=1 " Show relative paths.
The default is to show absolute paths.
+ *g:bufExplorerShowTabBuffer*
+To control weither or not to show buffers on for the specific tab or not, use: >
+ let g:bufExplorerShowTabBuffer=0 " No.
+ let g:bufExplorerShowTabBuffer=1 " Yes.
+The default is not to show.
+
*g:bufExplorerShowUnlisted*
To control whether to show unlisted buffer or not, use: >
let g:bufExplorerShowUnlisted=0 " Do not show unlisted buffers.
@@ -182,15 +196,16 @@
let g:bufExplorerSplitRight=1 " Split right.
The default is to use the global &splitright.
- *g:bufExplorerShowTabBuffer*
-To control weither or not to show buffers on for the specific tab or not, use: >
- let g:bufExplorerShowTabBuffer=0 " No.
- let g:bufExplorerShowTabBuffer=1 " Yes.
-The default is not to show.
-
===============================================================================
CHANGE LOG *bufexplorer-changelog*
+7.2.8 - Enhancements:
+ * Thanks to Charles Campbell for integrating bufexplorer with GDBMGR.
+ http://mysite.verizon.net/astronaut/vim/index.html#GDBMGR
+7.2.7 - Fix:
+ * My 1st attempt to fix the "cache" issue where buffers information
+ has changed but the cache/display does not reflect those changes.
+ More work still needs to be done.
7.2.6 - Fix:
* Thanks to Michael Henry for pointing out that I totally forgot to
update the inline help to reflect the previous change to the 'd'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-bufexplorer-7.2.6/plugin/bufexplorer.vim new/vimplugin-bufexplorer-7.2.8/plugin/bufexplorer.vim
--- old/vimplugin-bufexplorer-7.2.6/plugin/bufexplorer.vim 2010-02-12 09:23:00.000000000 +0100
+++ new/vimplugin-bufexplorer-7.2.8/plugin/bufexplorer.vim 2010-11-08 13:54:18.000000000 +0100
@@ -10,7 +10,7 @@
" Name Of File: bufexplorer.vim
" Description: Buffer Explorer Vim Plugin
" Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com)
-" Last Changed: Friday, 12 Feb 2010
+" Last Changed: Friday, 22 October 2010
" Version: See g:bufexplorer_version for version number.
" Usage: This file should reside in the plugin directory and be
" automatically sourced.
@@ -38,7 +38,7 @@
"1}}}
" Version number
-let g:bufexplorer_version = "7.2.6"
+let g:bufexplorer_version = "7.2.8"
" Check for Vim version 700 or greater {{{1
if v:version < 700
@@ -228,13 +228,9 @@
call s:BEMRUPop(_bufnr)
if a:remove
-"XXX moved above call s:BEMRUPop(_bufnr)
call s:BEDeleteBufferListing(_bufnr)
else
- if ! s:BEIgnoreBuffer(_bufnr) == 1
- " If the buffer is unlisted, refresh the list.
- let s:refreshBufferList = 1
- endif
+ let s:refreshBufferList = 1
endif
endfunction
@@ -304,6 +300,7 @@
" Do not add the BufExplorer window to the list.
if fnamemodify(bufname(a:buf), ":t") == s:name
+ call s:BEError("The buffer name was [".s:name."] so it was skipped.")
return 1
endif
@@ -316,12 +313,12 @@
" BECleanup {{{1
function! s:BECleanup()
- let &insertmode = s:_insertmode
- let &showcmd = s:_showcmd
- let &cpo = s:_cpo
- let &report = s:_report
- let &list = s:_list
- let s:running = 0
+ if exists("s:_insertmode")|let &insertmode = s:_insertmode|endif
+ if exists("s:_showcmd") |let &showcmd = s:_showcmd |endif
+ if exists("s:_cpo") |let &cpo = s:_cpo |endif
+ if exists("s:_report") |let &report = s:_report |endif
+ if exists("s:_list") |let &list = s:_list |endif
+ let s:running = 0
let s:splitMode = ""
delmarks!
@@ -341,37 +338,42 @@
" StartBufExplorer {{{1
function! StartBufExplorer(open)
- let name = s:name
-
- if !has("win32")
- " On non-Windows boxes, escape the name so that is shows up correctly.
- let name = escape(name, "[]")
- endif
+ let name = s:name
- " Make sure there is only one explorer open at a time.
- if s:running == 1
- " Go to the open buffer.
- if has("gui")
- exec "drop" name
+ if !has("win32")
+ " On non-Windows boxes, escape the name so that is shows up correctly.
+ let name = escape(name, "[]")
+ call s:BEError("Escaped")
endif
- return
- endif
+ " Make sure there is only one explorer open at a time.
+ if s:running == 1
+ call s:BEError("WHAT THE 1")
+ " Go to the open buffer.
+ if has("gui")
+ call s:BEError("WHAT THE 2")
+ call s:BEError(name)
+ exec "drop" name
+ endif
- " Add zero to ensure the variable is treated as a Number.
- let s:originBuffer = bufnr("%") + 0
+ return
+ endif
- if !exists('s:raw_buffer_listing') ||
- \ empty(s:raw_buffer_listing) ||
- \ s:refreshBufferList == 1
- silent let s:raw_buffer_listing = s:BEGetBufferInfo(0)
- endif
+ " Add zero to ensure the variable is treated as a Number.
+ let s:originBuffer = bufnr("%") + 0
- let copy = copy(s:raw_buffer_listing)
+ " Create or rebuild the raw buffer list if necessary.
+ if !exists('s:raw_buffer_listing') ||
+ \ empty(s:raw_buffer_listing) ||
+ \ s:refreshBufferList == 1
+ silent let s:raw_buffer_listing = s:BEGetBufferInfo(0)
+ endif
- if (g:bufExplorerShowUnlisted == 0)
- call filter(copy, 'v:val.attributes !~ "u"')
- endif
+ let copy = copy(s:raw_buffer_listing)
+
+ if (g:bufExplorerShowUnlisted == 0)
+ call filter(copy, 'v:val.attributes !~ "u"')
+ endif
" We may have to split the current window.
if (s:splitMode != "")
@@ -442,14 +444,9 @@
nnoremap <buffer> <silent> D :call <SID>BERemoveBuffer("wipe", "n")<cr>
xnoremap <buffer> <silent> D :call <SID>BERemoveBuffer("wipe", "v")<cr>
-"XXX nnoremap <buffer> <silent> d :call <SID>BERemoveBuffer("wipe", "n")<cr>
-"XXX xnoremap <buffer> <silent> d :call <SID>BERemoveBuffer("wipe", "v")<cr>
-"XXX nnoremap <buffer> <silent> D :call <SID>BERemoveBuffer("delete", "n")<cr>
-"XXX xnoremap <buffer> <silent> D :call <SID>BERemoveBuffer("delete", "v")<cr>
-
nnoremap <buffer> <silent> m :call <SID>BEMRUListShow()<cr>
nnoremap <buffer> <silent> p :call <SID>BEToggleSplitOutPathName()<cr>
- nnoremap <buffer> <silent> q :call <SID>BEClose()<cr>
+ nnoremap <buffer> <silent> q :call <SID>BEClose("quit")<cr>
nnoremap <buffer> <silent> r :call <SID>BESortReverse()<cr>
nnoremap <buffer> <silent> R :call <SID>BEToggleShowRelativePath()<cr>
nnoremap <buffer> <silent> s :call <SID>BESortSelect()<cr>
@@ -634,62 +631,65 @@
let s:listedpads[n] = repeat(' ', max(listedwidths[n]))
endfor
- let s:refreshBufferList = 0
+ let s:refreshBufferList = 1
return all
endfunction
" BEBuildBufferList {{{1
function! s:BEBuildBufferList()
- let lines = []
+ let lines = []
- " Loop through every buffer.
- for buf in s:raw_buffer_listing
- if (!g:bufExplorerShowUnlisted && buf.attributes =~ "u")
- " Skip unlisted buffers if we are not to show them.
- continue
- endif
- if (g:bufExplorerShowTabBuffer)
- let show_buffer = 0
- for bufnr in s:tabSpace[tabpagenr()]
- if (buf.attributes =~ '^\s*'.bufnr.'\>')
- " Only buffers shown on the current tabpagenr
- let show_buffer = 1
- break
+ " Loop through every buffer.
+ for buf in s:raw_buffer_listing
+ " Skip unlisted buffers if we are not to show them.
+ if (!g:bufExplorerShowUnlisted && buf.attributes =~ "u")
+ continue
endif
- endfor
- if show_buffer == 0
- continue
- endif
- endif
- let line = buf.attributes." "
+ if (g:bufExplorerShowTabBuffer)
+ let show_buffer = 0
- if g:bufExplorerSplitOutPathName
- let type = (g:bufExplorerShowRelativePath) ? "relativepath" : "path"
- let path = buf[type]
- let pad = (g:bufExplorerShowUnlisted) ? s:allpads.shortname : s:listedpads.shortname
- let line .= buf.shortname." ".strpart(pad.path, len(buf.shortname))
- else
- let type = (g:bufExplorerShowRelativePath) ? "relativename" : "fullname"
- let path = buf[type]
- let line .= path
- endif
+ for bufnr in s:tabSpace[tabpagenr()]
+ if (buf.attributes =~ '^\s*'.bufnr.'\>')
+ " Only buffers shown on the current tabpagenr
+ let show_buffer = 1
+ break
+ endif
+ endfor
+
+ if show_buffer == 0
+ continue
+ endif
+ endif
- let pads = (g:bufExplorerShowUnlisted) ? s:allpads : s:listedpads
+ let line = buf.attributes." "
- if !empty(pads[type])
- let line .= strpart(pads[type], len(path))." "
- endif
+ if g:bufExplorerSplitOutPathName
+ let type = (g:bufExplorerShowRelativePath) ? "relativepath" : "path"
+ let path = buf[type]
+ let pad = (g:bufExplorerShowUnlisted) ? s:allpads.shortname : s:listedpads.shortname
+ let line .= buf.shortname." ".strpart(pad.path, len(buf.shortname))
+ else
+ let type = (g:bufExplorerShowRelativePath) ? "relativename" : "fullname"
+ let path = buf[type]
+ let line .= path
+ endif
- let line .= buf.line
+ let pads = (g:bufExplorerShowUnlisted) ? s:allpads : s:listedpads
- call add(lines, line)
- endfor
+ if !empty(pads[type])
+ let line .= strpart(pads[type], len(path))." "
+ endif
+
+ let line .= buf.line
+
+ call add(lines, line)
+ endfor
- call setline(s:firstBufferLine, lines)
+ call setline(s:firstBufferLine, lines)
- call s:BESortListing()
+ call s:BESortListing()
endfunction
" BESelectBuffer {{{1
@@ -720,8 +720,8 @@
endif
if bufexists(_bufNbr)
- if bufnr("#") == _bufNbr
- return s:BEClose()
+ if bufnr("#") == _bufNbr && !exists("g:bufExplorerChgWin")
+ return s:BEClose("")
endif
" Are we suppose to open the selected buffer in a tab?
@@ -746,12 +746,14 @@
exec s:BEGetWinNbr(tabNbr, _bufNbr) . "wincmd w"
endif
else
- "No, the use did not ask to open the selected buffer in a tab.
+ "No, the use did not ask to open the selected buffer in a tab.
- " Are we suppose to move to the tab where this active buffer is?
- if bufloaded(_bufNbr) && g:bufExplorerFindActive
- " Close the BE window.
- call s:BEClose()
+ " Are we suppose to move to the tab where this active buffer is?
+ if exists("g:bufExplorerChgWin")
+ exe g:bufExplorerChgWin."wincmd w"
+ elseif bufloaded(_bufNbr) && g:bufExplorerFindActive
+ " Close the BE window.
+ call s:BEClose("")
" Get the tab number where this buffer is located at.
let tabNbr = s:BEGetTabNbr(_bufNbr)
@@ -773,6 +775,23 @@
" Make the buffer 'listed' again.
call setbufvar(_bufNbr, "&buflisted", "1")
+
+ " call any associated function references
+ " g:bufExplorerFuncRef may be an individual function reference
+ " or it may be a list containing function references.
+ " It will ignore anything that's not a function reference.
+ " See :help FuncRef for more on function references.
+ if exists("g:BufExplorerFuncRef")
+ if type(g:BufExplorerFuncRef) == 2
+ keepj call g:BufExplorerFuncRef()
+ elseif type(g:BufExplorerFuncRef) == 3
+ for FncRef in g:BufExplorerFuncRef
+ if type(FncRef) == 2
+ keepj call FncRef()
+ endif
+ endfor
+ endif
+ endif
else
call s:BEError("Sorry, that buffer no longer exists, please select another")
call s:BEDeleteBuffer(_bufNbr, "wipe")
@@ -781,218 +800,217 @@
" BEDeleteBufferListing {{{1
function! s:BEDeleteBufferListing(buf)
- if exists('s:raw_buffer_listing') && !empty(s:raw_buffer_listing)
- " Delete the buffer from the raw buffer list.
- " Careful use of ' and " so we do not have to escape all the \'s
- " Regex: ^\s*\(10\|20\)\>
- " ^ - Starting at the beginning of the string
- " \s* - optional whitespace
- " \(10\|20\) - either a 10 or a 20
- " \> - end of word (so it can't make 100 or 201)
- call filter(s:raw_buffer_listing, "v:val.attributes !~ '".'^\s*\('.substitute(a:buf, ' ', '\\|', 'g').'\)\>'."'")
- endif
+ if exists('s:raw_buffer_listing') && !empty(s:raw_buffer_listing)
+ " Delete the buffer from the raw buffer list.
+ " Careful use of ' and " so we do not have to escape all the \'s
+ " Regex: ^\s*\(10\|20\)\>
+ " ^ - Starting at the beginning of the string
+ " \s* - optional whitespace
+ " \(10\|20\) - either a 10 or a 20
+ " \> - end of word (so it can't make 100 or 201)
+ call filter(s:raw_buffer_listing, "v:val.attributes !~ '".'^\s*\('.substitute(a:buf, ' ', '\\|', 'g').'\)\>'."'")
+ endif
endfunction
" BERemoveBuffer {{{1
function! s:BERemoveBuffer(type, mode) range
- " Are we on a line with a file name?
- if line('.') < s:firstBufferLine
- return
- endif
+ " Are we on a line with a file name?
+ if line('.') < s:firstBufferLine
+ return
+ endif
- " These commands are to temporarily suspend the activity of winmanager.
- if exists("b:displayMode") && b:displayMode == "winmanager"
- call WinManagerSuspendAUs()
- endif
+ " These commands are to temporarily suspend the activity of winmanager.
+ if exists("b:displayMode") && b:displayMode == "winmanager"
+ call WinManagerSuspendAUs()
+ endif
- let _bufNbrs = ''
+ let _bufNbrs = ''
- for lineNum in range(a:firstline, a:lastline)
- let line = getline(lineNum)
+ for lineNum in range(a:firstline, a:lastline)
+ let line = getline(lineNum)
- if line =~ '^\s*\(\d\+\)'
- " Regex: ^\s*\(10\|20\)\>
- " ^ - Starting at the beginning of the string
- " \s* - optional whitespace
- " \zs - start the match here
- " \d\+ - any digits
- " \> - end of word (so it can't make 100 or 201)
- let bufNbr = matchstr(line, '^\s*\zs\d\+\>')
-
- " Add 0 to bufNbr to ensure Vim treats it as a Number
- " for use with the getbufvar() function
- if bufNbr !~ '^\d\+$' || getbufvar(bufNbr+0, '&modified') != 0
- call s:BEError("Sorry, no write since last change for buffer ".bufNbr.", unable to delete")
- else
- let _bufNbrs = _bufNbrs . (_bufNbrs==''?'':' '). bufNbr
- endif
- endif
- endfor
+ if line =~ '^\s*\(\d\+\)'
+ " Regex: ^\s*\(10\|20\)\>
+ " ^ - Starting at the beginning of the string
+ " \s* - optional whitespace
+ " \zs - start the match here
+ " \d\+ - any digits
+ " \> - end of word (so it can't make 100 or 201)
+ let bufNbr = matchstr(line, '^\s*\zs\d\+\>')
+
+ " Add 0 to bufNbr to ensure Vim treats it as a Number
+ " for use with the getbufvar() function
+ if bufNbr !~ '^\d\+$' || getbufvar(bufNbr+0, '&modified') != 0
+ call s:BEError("Sorry, no write since last change for buffer ".bufNbr.", unable to delete")
+ else
+ let _bufNbrs = _bufNbrs . (_bufNbrs==''?'':' '). bufNbr
+ endif
+ endif
+ endfor
- " Okay, everything is good, delete or wipe the buffers.
- call s:BEDeleteBuffer(_bufNbrs, a:type)
+ " Okay, everything is good, delete or wipe the buffers.
+ call s:BEDeleteBuffer(_bufNbrs, a:type)
- " Reactivate winmanager autocommand activity.
- if exists("b:displayMode") && b:displayMode == "winmanager"
- call WinManagerForceReSize("BufExplorer")
- call WinManagerResumeAUs()
- endif
+ " Reactivate winmanager autocommand activity.
+ if exists("b:displayMode") && b:displayMode == "winmanager"
+ call WinManagerForceReSize("BufExplorer")
+ call WinManagerResumeAUs()
+ endif
endfunction
" BEDeleteBuffer {{{1
function! s:BEDeleteBuffer(bufNbr, mode)
- " This routine assumes that the buffer to be removed is on the current line.
- try
- if a:mode == "wipe"
- exe "bwipe" a:bufNbr
- else
- exe "bdelete" a:bufNbr
- endif
-
- setlocal modifiable
-
- " Remove each of the lines beginning with the buffer numbers we are removing
- " Regex: ^\s*\(10\|20\)\>
- " ^ - Starting at the beginning of the string
- " \s* - optional whitespace
- " \(10\|20\) - either a 10 or a 20
- " \> - end of word (so it can't make 100 or 201)
- exec 'silent! g/^\s*\('.substitute(a:bufNbr, ' ', '\\|', 'g').'\)\>/d_'
+ " This routine assumes that the buffer to be removed is on the current line.
+ try
+ if a:mode == "wipe"
+ exe "bwipe" a:bufNbr
+ else
+ exe "bdelete" a:bufNbr
+ endif
- setlocal nomodifiable
+ setlocal modifiable
- call s:BEDeleteBufferListing(a:bufNbr)
- catch
- call s:BEError(v:exception)
- endtry
+ " Remove each of the lines beginning with the buffer numbers we are removing
+ " Regex: ^\s*\(10\|20\)\>
+ " ^ - Starting at the beginning of the string
+ " \s* - optional whitespace
+ " \(10\|20\) - either a 10 or a 20
+ " \> - end of word (so it can't make 100 or 201)
+ exec 'silent! g/^\s*\('.substitute(a:bufNbr, ' ', '\\|', 'g').'\)\>/d_'
+
+ setlocal nomodifiable
+
+ call s:BEDeleteBufferListing(a:bufNbr)
+ catch
+ call s:BEError(v:exception)
+ endtry
endfunction
" BEClose {{{1
-function! s:BEClose()
- " Get only the listed buffers.
- let listed = filter(copy(s:MRUList), "buflisted(v:val)")
-
- " If we needed to split the main window, close the split one.
- if (s:splitMode != "")
- exec "wincmd c"
- endif
+function! s:BEClose(mode)
+ " Get only the listed buffers.
+ let listed = filter(copy(s:MRUList), "buflisted(v:val)")
+
+ " If we needed to split the main window, close the split one.
+" if (s:splitMode)
+" if (s:splitMode != "")
+ if (s:splitMode != "" && a:mode == "quit")
+ exec "wincmd c"
+ endif
- if len(listed) == 0
- exe "enew"
- else
- for b in reverse(listed[0:1])
- exec "keepjumps silent b ".b
- endfor
- endif
+ if len(listed) == 0
+ exe "enew"
+ else
+ for b in reverse(listed[0:1])
+ exec "keepjumps silent b ".b
+ endfor
+ endif
endfunction
" BEToggleSplitOutPathName {{{1
function! s:BEToggleSplitOutPathName()
- let g:bufExplorerSplitOutPathName = !g:bufExplorerSplitOutPathName
- call s:BERebuildBufferList()
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerSplitOutPathName = !g:bufExplorerSplitOutPathName
+ call s:BERebuildBufferList()
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleShowRelativePath {{{1
function! s:BEToggleShowRelativePath()
- let g:bufExplorerShowRelativePath = !g:bufExplorerShowRelativePath
- call s:BERebuildBufferList()
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerShowRelativePath = !g:bufExplorerShowRelativePath
+ call s:BERebuildBufferList()
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleShowUnlisted {{{1
function! s:BEToggleShowUnlisted()
- let g:bufExplorerShowUnlisted = !g:bufExplorerShowUnlisted
- let num_bufs = s:BERebuildBufferList(g:bufExplorerShowUnlisted == 0)
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerShowUnlisted = !g:bufExplorerShowUnlisted
+ let num_bufs = s:BERebuildBufferList(g:bufExplorerShowUnlisted == 0)
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleFindActive {{{1
function! s:BEToggleFindActive()
- let g:bufExplorerFindActive = !g:bufExplorerFindActive
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerFindActive = !g:bufExplorerFindActive
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleShowTabBuffer {{{1
function! s:BEToggleShowTabBuffer()
- let g:bufExplorerShowTabBuffer = !g:bufExplorerShowTabBuffer
- call s:BEDisplayBufferList()
+ let g:bufExplorerShowTabBuffer = !g:bufExplorerShowTabBuffer
+ call s:BEDisplayBufferList()
endfunction
" BEToggleOnlyOneTab {{{1
function! s:BEToggleOnlyOneTab()
- let g:bufExplorerOnlyOneTab = !g:bufExplorerOnlyOneTab
- call s:BEDisplayBufferList()
+ let g:bufExplorerOnlyOneTab = !g:bufExplorerOnlyOneTab
+ call s:BEDisplayBufferList()
endfunction
" BERebuildBufferList {{{1
function! s:BERebuildBufferList(...)
- setlocal modifiable
+ setlocal modifiable
- let curPos = getpos('.')
+ let curPos = getpos('.')
- if a:0
- " Clear the list first.
- exec "keepjumps ".s:firstBufferLine.',$d "_'
- endif
+ if a:0
+ " Clear the list first.
+ exec "keepjumps ".s:firstBufferLine.',$d "_'
+ endif
- let num_bufs = s:BEBuildBufferList()
+ let num_bufs = s:BEBuildBufferList()
- call setpos('.', curPos)
+ call setpos('.', curPos)
- setlocal nomodifiable
+ setlocal nomodifiable
- return num_bufs
+ return num_bufs
endfunction
" BEUpdateHelpStatus {{{1
function! s:BEUpdateHelpStatus()
- setlocal modifiable
+ setlocal modifiable
- let text = s:BEGetHelpStatus()
- call setline(s:firstBufferLine - 2, text)
+ let text = s:BEGetHelpStatus()
+ call setline(s:firstBufferLine - 2, text)
- setlocal nomodifiable
+ setlocal nomodifiable
endfunction
" BEMRUCmp {{{1
function! s:BEMRUCmp(line1, line2)
- return index(s:MRUList, str2nr(a:line1)) - index(s:MRUList, str2nr(a:line2))
+ return index(s:MRUList, str2nr(a:line1)) - index(s:MRUList, str2nr(a:line2))
endfunction
" BESortReverse {{{1
function! s:BESortReverse()
- let g:bufExplorerReverseSort = !g:bufExplorerReverseSort
-
- call s:BEReSortListing()
+ let g:bufExplorerReverseSort = !g:bufExplorerReverseSort
+ call s:BEReSortListing()
endfunction
" BESortSelect {{{1
function! s:BESortSelect()
- let g:bufExplorerSortBy = get(s:sort_by, index(s:sort_by, g:bufExplorerSortBy) + 1, s:sort_by[0])
-
- call s:BEReSortListing()
+ let g:bufExplorerSortBy = get(s:sort_by, index(s:sort_by, g:bufExplorerSortBy) + 1, s:sort_by[0])
+ call s:BEReSortListing()
endfunction
" BEReverseSortSelect {{{1
function! s:BEReverseSortSelect()
- let g:bufExplorerSortBy = get(s:sort_by, (index(s:sort_by, g:bufExplorerSortBy) + len(s:sort_by) - 1) % len(s:sort_by), s:sort_by[0])
-
- call s:BEReSortListing()
+ let g:bufExplorerSortBy = get(s:sort_by, (index(s:sort_by, g:bufExplorerSortBy) + len(s:sort_by) - 1) % len(s:sort_by), s:sort_by[0])
+ call s:BEReSortListing()
endfunction
" BEReSortListing {{{1
function! s:BEReSortListing()
- setlocal modifiable
+ setlocal modifiable
- let curPos = getpos('.')
+ let curPos = getpos('.')
- call s:BESortListing()
- call s:BEUpdateHelpStatus()
+ call s:BESortListing()
+ call s:BEUpdateHelpStatus()
- call setpos('.', curPos)
+ call setpos('.', curPos)
- setlocal nomodifiable
+ setlocal nomodifiable
endfunction
" BESortListing {{{1
@@ -1032,35 +1050,35 @@
" BEMRUListShow {{{1
function! s:BEMRUListShow()
- echomsg "MRUList=".string(s:MRUList)
+ echomsg "MRUList=".string(s:MRUList)
endfunction
" BEError {{{1
function! s:BEError(msg)
- echohl ErrorMsg | echo a:msg | echohl none
+ echohl ErrorMsg | echo a:msg | echohl none
endfunction
" BEWarning {{{1
function! s:BEWarning(msg)
- echohl WarningMsg | echo a:msg | echohl none
+ echohl WarningMsg | echo a:msg | echohl none
endfunction
" GetTabNbr {{{1
function! s:BEGetTabNbr(bufNbr)
- " Searching buffer bufno, in tabs.
- for i in range(tabpagenr("$"))
- if index(tabpagebuflist(i + 1), a:bufNbr) != -1
- return i + 1
- endif
- endfor
+ " Searching buffer bufno, in tabs.
+ for i in range(tabpagenr("$"))
+ if index(tabpagebuflist(i + 1), a:bufNbr) != -1
+ return i + 1
+ endif
+ endfor
- return 0
+ return 0
endfunction
" GetWinNbr" {{{1
function! s:BEGetWinNbr(tabNbr, bufNbr)
- " window number in tabpage.
- return index(tabpagebuflist(a:tabNbr), a:bufNbr) + 1
+ " window number in tabpage.
+ return index(tabpagebuflist(a:tabNbr), a:bufNbr) + 1
endfunction
" Winmanager Integration {{{1
@@ -1072,19 +1090,19 @@
" This is to figure out how this plugin was called. In a standalone fashion
" or by winmanager.
function! BufExplorer_Start()
- let b:displayMode = "winmanager"
- call StartBufExplorer("e")
+ let b:displayMode = "winmanager"
+ call StartBufExplorer("e")
endfunction
" Returns whether the display is okay or not.
function! BufExplorer_IsValid()
- return 0
+ return 0
endfunction
" Handles dynamic refreshing of the window.
function! BufExplorer_Refresh()
- let b:displayMode = "winmanager"
- call StartBufExplorer("e")
+ let b:displayMode = "winmanager"
+ call StartBufExplorer("e")
endfunction
function! BufExplorer_ReSize()
++++++ vimplugin-calendar-2.1.tar.bz2 -> vimplugin-calendar-2.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-calendar-2.1/plugin/calendar.vim new/vimplugin-calendar-2.4/plugin/calendar.vim
--- old/vimplugin-calendar-2.1/plugin/calendar.vim 2010-03-31 16:37:49.000000000 +0200
+++ new/vimplugin-calendar-2.4/plugin/calendar.vim 2012-06-26 11:20:40.000000000 +0200
@@ -2,12 +2,13 @@
" What Is This: Calendar
" File: calendar.vim
" Author: Yasuhiro Matsumoto <mattn.jp(a)gmail.com>
-" Last Change: 25-Mar-2010.
-" Version: 2.1
+" Last Change: 27-Jan-2011.
+" Version: 2.5
" Thanks:
-" thinca : bug fix
+" SethMilliken : gave a hint for 2.4
+" bw1 : bug fix
" Ingo Karkat : bug fix
-" Thinca : bug report
+" Thinca : bug report, bug fix
" Yu Pei : bug report
" Per Winkvist : bug fix
" Serge (gentoosiast) Koksharov : bug fix
@@ -52,11 +53,17 @@
" :CalendarH ...
" show horizontal calendar ...
"
-" <Leader>ca
+" <Leader>cal
" show calendar in normal mode
-" <Leader>ch
+" <Leader>caL
" show horizontal calendar ...
" ChangeLog:
+" 2.5 : bug fix, 7.2 don't have relativenumber.
+" 2.4 : added g:calendar_options.
+" 2.3 : week number like ISO8601
+" g:calendar_monday and g:calendar_weeknm work together
+" 2.2 : http://gist.github.com/355513#file_customizable_keymap.diff
+" http://gist.github.com/355513#file_winfixwidth.diff
" 2.1 : bug fix, set filetype 'calendar'.
" 2.0 : bug fix, many bug fix and enhancements.
" 1.9 : bug fix, use nnoremap.
@@ -253,7 +260,6 @@
" *if you want to show week number, add this to your .vimrc:
"
" set g:calendar_weeknm as below
-" (Can't be used together with g:calendar_monday.)
"
" let g:calendar_weeknm = 1 " WK01
" let g:calendar_weeknm = 2 " WK 1
@@ -317,7 +323,7 @@
" :echo calendar_version
" GetLatestVimScripts: 52 1 :AutoInstall: calendar.vim
-let g:calendar_version = "2.1"
+let g:calendar_version = "2.5"
if &compatible
finish
endif
@@ -356,6 +362,12 @@
\&& g:calendar_datetime != 'statusline')
let g:calendar_datetime = 'title'
endif
+if !exists("g:calendar_options")
+ let g:calendar_options="fdc=0 nonu"
+ if has("+relativenumber")
+ let g:calendar_options .= " nornu"
+ endif
+endif
"*****************************************************************
"* Calendar commands
@@ -452,7 +464,7 @@
if b:CalendarDir
let dir = 'H'
- if !exists('g:calendar_monday') && exists('g:calendar_weeknm')
+ if exists('g:calendar_weeknm')
let cnr = col('.') - (col('.')%(24+5)) + 1
else
let cnr = col('.') - (col('.')%(24)) + 1
@@ -677,33 +689,41 @@
let vnweek = 7
endif
let vnweek = vnweek - 1
- elseif exists('g:calendar_weeknm')
+ endif
+
+ if exists('g:calendar_weeknm')
" if given g:calendar_weeknm, show week number(ref:ISO8601)
- let viweek = vparam / 7
- let vfweek = vparam % 7
- if vnweek == 0
- let vfweek = vfweek - 7
- let viweek = viweek + 1
- else
- let vfweek = vfweek - vnweek
- endif
- if vfweek <= 0 && viweek > 0
- let viweek = viweek - 1
- let vfweek = vfweek + 7
- endif
- if vfweek > -4
- let viweek = viweek + 1
- endif
- if vfweek > 3
- let viweek = viweek + 1
+
+ "vparam <= 1. day of month
+ "vnweek <= 1. weekday of month (0-6)
+ "viweek <= number of week
+ "vfweek <= 1. day of year
+
+ " mo di mi do fr sa so
+ " 6 5 4 3 2 1 0 vfweek
+ " 0 1 2 3 4 5 6 vnweek
+
+ let vfweek =((vparam % 7) -vnweek+ 14-2) % 7
+ let viweek = (vparam - vfweek-2+7 ) / 7 +1
+
+ if vfweek < 3
+ let viweek = viweek - 1
+ endif
+
+ "vfweekl <=year length
+ let vfweekl = 52
+ if (vfweek == 3)
+ let vfweekl = 53
endif
+
if viweek == 0
- let viweek = '??'
- elseif viweek > 52
- if vnweek != 0 && vnweek < 4
- let viweek = 1
+ let viweek = 52
+ if ((vfweek == 2) && (((vyear-1) % 4) !=0))
+ \ || ((vfweek == 1) && (((vyear-1) % 4) ==0))
+ let viweek = 53
endif
endif
+
let vcolumn = vcolumn + 5
endif
@@ -813,7 +833,7 @@
let vinpcur = vinpcur + 1
if vinpcur % 7 == 0
- if !exists('g:calendar_monday') && exists('g:calendar_weeknm')
+ if exists('g:calendar_weeknm')
if g:calendar_mark != 'right'
let vdisplay2=vdisplay2.' '
endif
@@ -836,6 +856,11 @@
endif
endif
let viweek = viweek + 1
+
+ if viweek > vfweekl
+ let viweek = 1
+ endif
+
endif
let vdisplay2=vdisplay2."\n"
if g:calendar_mark == 'right'
@@ -850,7 +875,7 @@
let vdisplay2=vdisplay2.' '
let vinpcur = vinpcur + 1
endwhile
- if !exists('g:calendar_monday') && exists('g:calendar_weeknm')
+ if exists('g:calendar_weeknm')
if g:calendar_mark != 'right'
let vdisplay2=vdisplay2.' '
endif
@@ -992,26 +1017,32 @@
" or not
if dir
- execute 'bo '.vheight.'split __Calendar'
+ silent execute 'bo '.vheight.'split __Calendar'
setlocal winfixheight
else
- execute 'to '.vcolumn.'vsplit __Calendar'
+ silent execute 'to '.vcolumn.'vsplit __Calendar'
+ setlocal winfixwidth
endif
+ call s:CalendarBuildKeymap(dir, vyear, vmnth)
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=delete
- setlocal nonumber
+ silent! exe "setlocal " . g:calendar_options
+ let nontext_columns = &foldcolumn + &nu * &numberwidth
+ if has("+relativenumber")
+ let nontext_columns += &rnu * &numberwidth
+ endif
" Without this, the 'sidescrolloff' setting may cause the left side of the
" calendar to disappear if the last inserted element is near the right
" window border.
- setlocal wrap
+ setlocal nowrap
setlocal norightleft
- setlocal foldcolumn=0
setlocal modifiable
setlocal nolist
let b:Calendar='Calendar'
setlocal filetype=calendar
" is this a vertical (0) or a horizontal (1) split?
+ exe vcolumn + nontext_columns . "wincmd |"
endif
if g:calendar_datetime == "statusline"
setlocal statusline=%{strftime('%c')}
@@ -1066,24 +1097,6 @@
let vmnth = vmnth_org
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- "+++ build keymap
- "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- " make keymap
- execute 'nnoremap <silent> <buffer> q :close<bar>wincmd p<cr>'
-
- execute 'nnoremap <silent> <buffer> <cr> :call <SID>CalendarDoAction()<cr>'
- execute 'nnoremap <silent> <buffer> <2-LeftMouse> :call <SID>CalendarDoAction()<cr>'
- execute 'nnoremap <silent> <buffer> t :call Calendar(b:CalendarDir)<cr>'
- execute 'nnoremap <silent> <buffer> ? :call <SID>CalendarHelp()<cr>'
- execute 'nnoremap <silent> <buffer> r :call Calendar(' . dir . ',' . vyear . ',' . vmnth . ')<cr>'
- let pnav = s:GetToken(g:calendar_navi_label, ',', 1)
- let nnav = s:GetToken(g:calendar_navi_label, ',', 3)
- execute 'nnoremap <silent> <buffer> <Left> :call <SID>CalendarDoAction("<' . pnav . '")<cr>'
- execute 'nnoremap <silent> <buffer> <Right> :call <SID>CalendarDoAction("' . nnav . '>")<cr>'
- execute 'nnoremap <silent> <buffer> <Up> :call Calendar('.dir.','.(vyear-1).','.vmnth.')<cr>'
- execute 'nnoremap <silent> <buffer> <Down> :call Calendar('.dir.','.(vyear+1).','.vmnth.')<cr>'
-
- "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"+++ build highlight
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" today
@@ -1238,6 +1251,38 @@
endfunction
"*****************************************************************
+"* CalendarBuildKeymap : build keymap
+"*----------------------------------------------------------------
+"*****************************************************************
+function! s:CalendarBuildKeymap(dir, vyear, vmnth)
+ " make keymap
+ execute 'nnoremap <silent> <buffer> q :close<bar>wincmd p<cr>'
+
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarDoAction :call <SID>CalendarDoAction()<cr>'
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarDoAction :call <SID>CalendarDoAction()<cr>'
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarGotoToday :call Calendar(b:CalendarDir)<cr>'
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarShowHelp :call <SID>CalendarHelp()<cr>'
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarReDisplay :call Calendar(' . a:dir . ',' . a:vyear . ',' . a:vmnth . ')<cr>'
+ let pnav = s:GetToken(g:calendar_navi_label, ',', 1)
+ let nnav = s:GetToken(g:calendar_navi_label, ',', 3)
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarGotoPrevMonth :call <SID>CalendarDoAction("<' . pnav . '")<cr>'
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarGotoNextMonth :call <SID>CalendarDoAction("' . nnav . '>")<cr>'
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarGotoPrevYear :call Calendar('.a:dir.','.(a:vyear-1).','.a:vmnth.')<cr>'
+ execute 'nnoremap <silent> <buffer> <Plug>CalendarGotoNextYear :call Calendar('.a:dir.','.(a:vyear+1).','.a:vmnth.')<cr>'
+
+ nmap <buffer> <CR> <Plug>CalendarDoAction
+ nmap <buffer> <2-LeftMouse> <Plug>CalendarDoAction
+ nmap <buffer> t <Plug>CalendarGotoToday
+ nmap <buffer> ? <Plug>CalendarShowHelp
+ nmap <buffer> r <Plug>CalendarReDisplay
+
+ nmap <buffer> <Left> <Plug>CalendarGotoPrevMonth
+ nmap <buffer> <Right> <Plug>CalendarGotoNextMonth
+ nmap <buffer> <Up> <Plug>CalendarGotoPrevYear
+ nmap <buffer> <Down> <Plug>CalendarGotoNextYear
+endfunction
+
+"*****************************************************************
"* CalendarHelp : show help for Calendar
"*----------------------------------------------------------------
"*****************************************************************
++++++ vimplugin-colorsel-20051121.tar.bz2 -> vimplugin-colorsel-20110107.tar.bz2 ++++++
++++ 1701 lines of diff (skipped)
++++++ vimplugin-diffchanges-0.2.6.tar.bz2 -> vimplugin-diffchanges-0.6.346dae2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-diffchanges-0.2.6/doc/diffchanges.txt new/vimplugin-diffchanges-0.6.346dae2/doc/diffchanges.txt
--- old/vimplugin-diffchanges-0.2.6/doc/diffchanges.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/vimplugin-diffchanges-0.6.346dae2/doc/diffchanges.txt 2012-03-09 15:26:32.000000000 +0100
@@ -0,0 +1,31 @@
+*diffchanges.txt* Shows the changes made to a buffer
+
+Author: Jeremy Cantrell <jmcantrell(a)gmail.com> *diffchanges-author*
+License: Same terms as Vim itself (see |license|)
+
+INTRODUCTION *diffchanges* *diffchanges.vim*
+
+The diffchanges plugin shows changes made to a buffer since the last save to
+disk. It provides commands for showing changes using vimdiff and as a patch,
+and a command to write a patch (without viewing it).
+
+COMMANDS *diffchanges-commands*
+
+:DiffChanges [FILENAME] Write a patch to FILENAME. If FILENAME is not
+ given, a unique one will be generated.
+
+:DiffChangesDiffToggle Toggles diff mode. Changes are shown using vimdiff.
+
+:DiffChangesPatchToggle Toggles patch mode. Changes are show as a unified
+ diff in another window.
+
+CONFIGURATION *diffchanges-configuration*
+
+g:diffchanges_loaded *g:diffchanges_loaded*
+ If set in your |vimrc|, diffchanges.vim is not loaded.
+
+g:diffchanges_patch_cmd *g:diffchanges_patch_cmd*
+ This command will be used to generate the diff in patch mode. It defaults
+ to 'diff -u'.
+
+vim:tw=78:et:ft=help:norl:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-diffchanges-0.2.6/plugin/diffchanges.vim new/vimplugin-diffchanges-0.6.346dae2/plugin/diffchanges.vim
--- old/vimplugin-diffchanges-0.2.6/plugin/diffchanges.vim 2010-03-31 16:37:48.000000000 +0200
+++ new/vimplugin-diffchanges-0.6.346dae2/plugin/diffchanges.vim 2012-03-09 15:26:32.000000000 +0100
@@ -1,17 +1,12 @@
-" Filename: diffchanges.vim
-" Description: Shows the changes made to the current buffer in a diff format
-" Maintainer: Jeremy Cantrell <jmcantrell(a)gmail.com>
-" Last Modified: Sun 2009-11-29 20:24:26 (-0500)
+" Filename: diffchanges.vim
+" Description: Shows the changes made to the current buffer.
+" Maintainer: Jeremy Cantrell <jmcantrell(a)gmail.com>
-if v:version < 700
+if exists("g:diffchanges_loaded")
finish
endif
-if exists("loaded_diffchanges")
- finish
-endif
-
-let loaded_diffchanges = 1
+let g:diffchanges_loaded = 1
let g:diffchanges_diff = []
let g:diffchanges_patch = []
@@ -24,27 +19,37 @@
let s:save_cpo = &cpo
set cpo&vim
-" Mappings {{{
-if !hasmapto('<Plug>DiffChangesDiffToggle')
- nmap <silent> <unique> <leader>dcd <Plug>DiffChangesDiffToggle
-endif
-
-if !hasmapto('<Plug>DiffChangesPatchToggle')
- nmap <silent> <unique> <leader>dcp <Plug>DiffChangesPatchToggle
-endif
-
-nnoremap <unique> <script> <Plug>DiffChangesDiffToggle <SID>DiffChangesDiffToggle
-nnoremap <unique> <script> <Plug>DiffChangesPatchToggle <SID>DiffChangesPatchToggle
-
-nnoremap <SID>DiffChangesDiffToggle :DiffChangesDiffToggle<cr>
-nnoremap <SID>DiffChangesPatchToggle :DiffChangesPatchToggle<cr>
-
-command! -bar DiffChangesDiffToggle :call s:DiffChangesToggle('diff')
+command! -bar -complete=file -nargs=? DiffChanges :call s:DiffChanges(<q-args>)
+command! -bar DiffChangesDiffToggle :call s:DiffChangesToggle('diff')
command! -bar DiffChangesPatchToggle :call s:DiffChangesToggle('patch')
+nnoremenu <script> &Plugin.&DiffChanges.&Write\ Patch <SID>DiffChanges
nnoremenu <script> &Plugin.&DiffChanges.&Diff\ Toggle <SID>DiffChangesDiffToggle
nnoremenu <script> &Plugin.&DiffChanges.&Patch\ Toggle <SID>DiffChangesPatchToggle
-"}}}
+
+function! s:GetDiff() "{{{1
+ let filename = expand('%')
+ let diffname = tempname()
+ execute 'silent w! '.diffname
+ let diff = system(g:diffchanges_patch_cmd.' '.shellescape(filename).' '.diffname)
+ call delete(diffname)
+ return diff
+endfunction
+
+function! s:GetPatchFilename(filename) "{{{1
+ return a:filename.'.'.strftime('%Y%m%d%H%M%S').'.patch'
+endfunction
+
+function! s:DiffChanges(...) "{{{1
+ if a:0 == 0 || len(a:1) == 0
+ let filename = s:GetPatchFilename(expand('%'))
+ else
+ let filename = a:1
+ endif
+ let diff = s:GetDiff()
+ call writefile(split(diff, '\n'), filename)
+ echo 'Patch written to "'.filename.'"'
+endfunction
function! s:DiffChangesToggle(mode) "{{{1
if count(s:diffchanges_modes, a:mode) == 0
@@ -68,35 +73,33 @@
return
endif
let filename = expand('%')
- let diffname = tempname()
let buforig = bufnr('%')
- execute 'silent w! '.diffname
- let diff = system(g:diffchanges_patch_cmd.' '.filename.' '.diffname)
- call delete(diffname)
+ let diff = s:GetDiff()
if len(diff) == 0
call s:Warn('No changes found')
return
endif
if a:mode == 'diff'
- call writefile(readfile(filename, 'b'), diffname, 'b')
let b:diffchanges_savefdm = &fdm
let b:diffchanges_savefdl = &fdl
let save_ft=&ft
diffthis
+ 1
vert new
let &ft=save_ft
execute '0read '.filename
diffthis
1
+ set buftype=nofile
+ let bufname = "Changes made to '".filename."'"
elseif a:mode == 'patch'
below new
setlocal filetype=diff
setlocal foldmethod=manual
silent 0put=diff
1
+ let bufname = s:GetPatchFilename(filename)
endif
- set buftype=nofile
- let bufname = "Changes made to '".filename."'"
silent file `=bufname`
autocmd BufUnload <buffer> call s:DiffChangesOff()
let bufdiff = bufnr('%')
@@ -136,6 +139,7 @@
function! s:Error(message) "{{{1
echohl ErrorMsg | echo a:message | echohl None
endfunction
+
"}}}
let &cpo = s:save_cpo
++++++ vimplugin-latex-20100129.tar.bz2 -> vimplugin-latex-20120125.tar.bz2 ++++++
++++ 6984 lines of diff (skipped)
++++++ vimplugin-rails-4.3.tar.bz2 -> vimplugin-rails-4.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-rails-4.3/autoload/rails.vim new/vimplugin-rails-4.4/autoload/rails.vim
--- old/vimplugin-rails-4.3/autoload/rails.vim 2010-09-10 20:26:57.000000000 +0200
+++ new/vimplugin-rails-4.4/autoload/rails.vim 2011-09-01 19:20:00.000000000 +0200
@@ -1,12 +1,12 @@
" autoload/rails.vim
-" Author: Tim Pope <vimNOSPAM(a)tpope.org>
+" Author: Tim Pope <http://tpo.pe/>
" Install this file as autoload/rails.vim.
if exists('g:autoloaded_rails') || &cp
finish
endif
-let g:autoloaded_rails = '4.3'
+let g:autoloaded_rails = '4.4'
let s:cpo_save = &cpo
set cpo&vim
@@ -44,6 +44,20 @@
return s:sub(s:sub(s:gsub(a:ary,'\n\n+','\n'),'\n$',''),'^\n','')
endfunction
+function! s:uniq(list)
+ let seen = {}
+ let i = 0
+ while i < len(a:list)
+ if has_key(seen,a:list[i])
+ call remove(a:list, i)
+ else
+ let seen[a:list[i]] = 1
+ let i += 1
+ endif
+ endwhile
+ return a:list
+endfunction
+
function! s:scrub(collection,item)
" Removes item from a newline separated collection
let col = "\n" . a:collection
@@ -302,10 +316,10 @@
call s:add_methods('readable',['end_of','last_opening_line','last_method_line','last_method','last_format','define_pattern'])
-let s:view_types = 'rhtml,erb,rxml,builder,rjs,mab,liquid,haml,dryml,mn'
+let s:view_types = split('rhtml,erb,rxml,builder,rjs,mab,liquid,haml,dryml,mn,slim',',')
function! s:viewspattern()
- return '\%('.s:gsub(s:view_types,',','\\|').'\)'
+ return '\%('.join(s:view_types,'\|').'\)'
endfunction
function! s:controller(...)
@@ -344,8 +358,10 @@
return s:sub(f,'.*<components/(.{-})/\k+\.\k+$','\1')
elseif f =~ '\<app/models/.*\.rb$' && self.type_name('mailer')
return s:sub(f,'.*<app/models/(.{-})\.rb$','\1')
- elseif f =~ '\<public/stylesheets/.*\.css$'
- return s:sub(f,'.*<public/stylesheets/(.{-})\.css$','\1')
+ elseif f =~ '\<\%(public\|app/assets\)/stylesheets/.*\.css\%(\.\w\+\)\=$'
+ return s:sub(f,'.*<%(public|app/assets)/stylesheets/(.{-})\.css%(\.\w+)=$','\1')
+ elseif f =~ '\<\%(public\|app/assets\)/javascripts/.*\.js\%(\.\w\+\)\=$'
+ return s:sub(f,'.*<%(public|app/assets)/javascripts/(.{-})\.js%(\.\w+)=$','\1')
elseif a:0 && a:1
return rails#pluralize(self.model_name())
endif
@@ -510,7 +526,7 @@
return word
endif
let word = s:sub(word,'eople$','ersons')
- let word = s:sub(word,'[aeio]@<!ies$','ys')
+ let word = s:sub(word,'%([Mm]ov|[aeio])@<!ies$','ys')
let word = s:sub(word,'xe[ns]$','xs')
let word = s:sub(word,'ves$','fs')
let word = s:sub(word,'ss%(es)=$','sss')
@@ -921,10 +937,7 @@
command! -buffer -bar -nargs=0 -bang Rrefresh :if <bang>0|unlet! g:autoloaded_rails|source `=s:file`|endif|call s:Refresh(<bang>0)
if exists(":NERDTree")
command! -buffer -bar -nargs=? -complete=customlist,s:Complete_cd Rtree :NERDTree `=rails#app().path(<f-args>)`
- elseif exists(":Project")
- command! -buffer -bar -nargs=? Rtree :call s:Project(<bang>0,<q-args>)
endif
- command! -buffer -bar -nargs=? Rproject :call s:warn("Warning: :Rproject has been deprecated in favor of :Rtree") | Rtree<bang> <args>
if exists("g:loaded_dbext")
command! -buffer -bar -nargs=? -complete=customlist,s:Complete_environments Rdbext :call s:BufDatabase(2,<q-args>)|let b:dbext_buffer_defaulted = 1
endif
@@ -997,29 +1010,17 @@
endif
return
endif
- let dir = ""
- if a:1 !~ '^-' && a:1 !=# 'new'
- let dir = a:1
- elseif a:{a:0} =~ '[\/]'
- let dir = a:{a:0}
- else
- let dir = a:1
- endif
- let str = ""
- let c = 1
- while c <= a:0
- let str .= " " . s:rquote(expand(a:{c}))
- let c += 1
- endwhile
- let dir = expand(dir)
- let append = ""
+ let args = map(copy(a:000),'expand(v:val)')
if a:bang
- let append .= " --force"
- endif
- exe "!rails".append.str
- if filereadable(dir."/".g:rails_default_file)
- edit `=dir.'/'.g:rails_default_file`
+ let args = ['--force'] + args
endif
+ exe '!rails '.join(map(copy(args),'s:rquote(v:val)'),' ')
+ for dir in args
+ if dir !~# '^-' && filereadable(dir.'/'.g:rails_default_file)
+ edit `=dir.'/'.g:rails_default_file`
+ return
+ endif
+ endfor
endfunction
function! s:app_tags_command() dict
@@ -1108,6 +1109,8 @@
\.'%\\s%#from\ %f:%l:%m,'
\.'%\\s%#from\ %f:%l:,'
\.'%\\s#{RAILS_ROOT}/%f:%l:\ %#%m,'
+ \.'%\\s%##\ %f:%l:%m,'
+ \.'%\\s%##\ %f:%l,'
\.'%\\s%#[%f:%l:\ %#%m,'
\.'%\\s%#%f:%l:\ %#%m,'
\.'%\\s%#%f:%l:,'
@@ -1132,7 +1135,9 @@
let old_makeprg = &l:makeprg
let old_errorformat = &l:errorformat
try
- if &l:makeprg !~# 'rake'
+ if exists('b:bundler_root') && b:bundler_root ==# rails#app().path()
+ let &l:makeprg = 'bundle exec rake'
+ else
let &l:makeprg = 'rake'
endif
let &l:errorformat = s:efm_backtrace
@@ -1374,6 +1379,10 @@
let urls = urls + [s:sub(s:sub(self.name(),'^public/stylesheets/sass/','/stylesheets/'),'\.s[ac]ss$','.css')]
elseif self.name() =~ '^public/'
let urls = urls + [s:sub(self.name(),'^public','')]
+ elseif self.name() =~ '^app/assets/stylesheets/'
+ let urls = urls + ['/assets/application.css']
+ elseif self.name() =~ '^app/assets/javascripts/'
+ let urls = urls + ['/assets/application.js']
elseif self.name() =~ '^app/stylesheets/'
let urls = urls + [s:sub(s:sub(self.name(),'^app/stylesheets/','/stylesheets/'),'\.less$','.css')]
elseif self.name() =~ '^app/scripts/'
@@ -1788,8 +1797,7 @@
endfor
endif
endfor
- let results = sort(map(keys(seen),'s:sub(v:val,"[.]rb$","")'))
- return s:autocamelize(results,a:ArgLead)
+ return s:autocamelize(sort(keys(seen)),a:ArgLead)
endfunction
function! s:Complete_edit(ArgLead, CmdLine, CursorPos)
@@ -1846,7 +1854,7 @@
endfunction
function! s:findasymbol(sym,repl)
- return s:findit('\s*:\%('.a:sym.'\)\s*=>\s*(\=\s*[@:'."'".'"]\(\f\+\)\>.\=',a:repl)
+ return s:findit('\s*\%(:\%('.a:sym.'\)\s*=>\|\<'.a:sym.':\)\s*(\=\s*[@:'."'".'"]\(\f\+\)\>.\=',a:repl)
endfunction
function! s:findfromview(func,repl)
@@ -1901,10 +1909,10 @@
let res = s:findasymbol('to','app/controllers/\1')
if res =~ '#'|return s:sub(res,'#','_controller.rb#')|endif
- let res = s:findamethod('root\s*:to\s*=>\s*','app/controllers/\1')
+ let res = s:findamethod('root\s*\%(:to\s*=>\|\<to:\)\s*','app/controllers/\1')
if res =~ '#'|return s:sub(res,'#','_controller.rb#')|endif
- let res = s:findamethod('\%(match\|get\|put\|post\|delete\|redirect\)\s*(\=\s*[:''"][^''"]*[''"]\=\s*\%(,\s*:to\s*\)\==>\s*','app/controllers/\1')
+ let res = s:findamethod('\%(match\|get\|put\|post\|delete\|redirect\)\s*(\=\s*[:''"][^''"]*[''"]\=\s*\%(\%(,\s*:to\s*\)\==>\|,\s*to:\)\s*','app/controllers/\1')
if res =~ '#'|return s:sub(res,'#','_controller.rb#')|endif
let res = s:findamethod('layout','\=s:findlayout(submatch(1))')
@@ -1925,20 +1933,20 @@
let res = s:findasymbol('template','app/views/\1')
if res != ""|return res|endif
- let res = s:sub(s:sub(s:findasymbol('partial','\1'),'^/',''),'\k+$','_&')
+ let res = s:sub(s:sub(s:findasymbol('partial','\1'),'^/',''),'[^/]+$','_&')
if res != ""|return res."\n".s:findview(res)|endif
- let res = s:sub(s:sub(s:findfromview('render\s*(\=\s*:partial\s\+=>\s*','\1'),'^/',''),'\k+$','_&')
+ let res = s:sub(s:sub(s:findfromview('render\s*(\=\s*\%(:partial\s\+=>\|partial:\)\s*','\1'),'^/',''),'[^/]+$','_&')
if res != ""|return res."\n".s:findview(res)|endif
- let res = s:findamethod('render\s*:\%(template\|action\)\s\+=>\s*','\1.'.format.'\n\1')
+ let res = s:findamethod('render\>\s*\%(:\%(template\|action\)\s\+=>\|template:\|action:\)\s*','\1.'.format.'\n\1')
if res != ""|return res|endif
let res = s:sub(s:findfromview('render','\1'),'^/','')
if buffer.type_name('view') | let res = s:sub(res,'[^/]+$','_&') | endif
if res != ""|return res."\n".s:findview(res)|endif
- let res = s:findamethod('redirect_to\s*(\=\s*:action\s\+=>\s*','\1')
+ let res = s:findamethod('redirect_to\s*(\=\s*\%\(:action\s\+=>\|\<action:\)\s*','\1')
if res != ""|return res|endif
let res = s:findfromview('stylesheet_link_tag','public/stylesheets/\1')
@@ -2033,7 +2041,7 @@
" Classes should always be in .rb files
let str .= '.rb'
elseif line =~# ':partial\s*=>\s*'
- let str = s:sub(str,'([^/]+)$','_\1')
+ let str = s:sub(str,'[^/]+$','_&')
let str = s:findview(str)
elseif line =~# '\<layout\s*(\=\s*' || line =~# ':layout\s*=>\s*'
let str = s:findview(s:sub(str,'^/=','layouts/'))
@@ -2229,11 +2237,21 @@
endfunction
function! s:stylesheetList(A,L,P)
- return s:completion_filter(rails#app().relglob("public/stylesheets/","**/*",".css"),a:A)
+ let list = rails#app().relglob('app/assets/stylesheets/','**/*.*','')
+ call map(list,'s:sub(v:val,"\\..*$","")')
+ let list += rails#app().relglob('public/stylesheets/','**/*','.css')
+ if rails#app().has('sass')
+ call extend(list,rails#app().relglob('public/stylesheets/sass/','**/*','.s?ss'))
+ call s:uniq(list)
+ endif
+ return s:completion_filter(list,a:A)
endfunction
function! s:javascriptList(A,L,P)
- return s:completion_filter(rails#app().relglob("public/javascripts/","**/*",".js"),a:A)
+ let list = rails#app().relglob('app/assets/javascripts/','**/*.*','')
+ call map(list,'s:sub(v:val,"\\..*$","")')
+ let list += rails#app().relglob("public/javascripts/","**/*",".js")
+ return s:completion_filter(list,a:A)
endfunction
function! s:metalList(A,L,P)
@@ -2471,11 +2489,18 @@
else
let glob = '*'.rails#underscore(arg).'*rb'
endif
- let migr = s:sub(glob(self.path('db/migrate/').glob),'.*\n','')
- if s:startswith(migr,self.path())
- let migr = strpart(migr,1+strlen(self.path()))
+ let files = split(glob(self.path('db/migrate/').glob),"\n")
+ if arg == ''
+ return get(files,-1,'')
+ endif
+ call map(files,'strpart(v:val,1+strlen(self.path()))')
+ let keep = get(files,0,'')
+ if glob =~# '^\*.*\*rb'
+ let pattern = glob[1:-4]
+ call filter(files,'v:val =~# ''db/migrate/\d\+_''.pattern.''\.rb''')
+ let keep = get(files,0,keep)
endif
- return migr
+ return keep
endfunction
call s:add_methods('app', ['migration'])
@@ -2591,7 +2616,7 @@
return pre.name
else
for format in ['.'.s:format('html'), '']
- for type in split(s:view_types,',')
+ for type in s:view_types
if self.app().has_file(pre.name.format.'.'.type)
return pre.name.format.'.'.type
endif
@@ -2652,7 +2677,12 @@
elseif rails#app().has('lesscss') && rails#app().has_file('app/stylesheets/'.name.'.less')
return s:EditSimpleRb(a:cmd,"stylesheet",name,"app/stylesheets/",".less",1)
else
- return s:EditSimpleRb(a:cmd,"stylesheet",name,"public/stylesheets/",".css",1)
+ let types = rails#app().relglob('app/assets/stylesheets/'.name,'.*','')
+ if !empty(types)
+ return s:EditSimpleRb(a:cmd,'stylesheet',name,'app/assets/stylesheets/',types[0],1)
+ else
+ return s:EditSimpleRb(a:cmd,'stylesheet',name,'public/stylesheets/','.css',1)
+ endif
endif
endfunction
@@ -2663,7 +2693,12 @@
elseif rails#app().has('coffee') && rails#app().has_file('app/scripts/'.name.'.js')
return s:EditSimpleRb(a:cmd,'javascript',name,'app/scripts/','.js',1)
else
- return s:EditSimpleRb(a:cmd,'javascript',name,'public/javascripts/','.js',1)
+ let types = rails#app().relglob('app/assets/javascripts/'.name,'.*','')
+ if !empty(types)
+ return s:EditSimpleRb(a:cmd,'javascript',name,'app/assets/javascripts/',types[0],1)
+ else
+ return s:EditSimpleRb(a:cmd,'javascript',name,'public/javascripts/','.js',1)
+ endif
endif
endfunction
@@ -3023,6 +3058,10 @@
return "config/application.rb\nconfig/environment.rb"
elseif f =~ '\<config/\%(application\|environment\)\.rb$'
return "config/database.yml"
+ elseif f ==# 'Gemfile'
+ return 'Gemfile.lock'
+ elseif f ==# 'Gemfile.lock'
+ return 'Gemfile'
elseif f =~ '\<db/migrate/'
let migrations = sort(self.app().relglob('db/migrate/','*','.rb'))
let me = matchstr(f,'\<db/migrate/\zs.*\ze\.rb$')
@@ -3309,9 +3348,9 @@
endif
let add .= s:mkeep(line)
elseif line =~ '\<remove_index\>'
- let add = s:sub(s:sub(line,'<remove_index','add_index'),':column\s*=>\s*','')
- elseif line =~ '\<rename_\%(table\|column\)\>'
- let add = s:sub(line,'<rename_%(table\s*\(=\s*|column\s*\(=\s*[^,]*,\s*)\zs([^,]*)(,\s*)([^,]*)','\3\2\1')
+ let add = s:sub(s:sub(line,'<remove_index','add_index'),':column\s*\=\>\s*','')
+ elseif line =~ '\<rename_\%(table\|column\|index\)\>'
+ let add = s:sub(line,'<rename_%(table\s*\(=\s*|%(column|index)\s*\(=\s*[^,]*,\s*)\zs([^,]*)(,\s*)([^,]*)','\3\2\1')
elseif line =~ '\<change_column\>'
let add = s:migspc(line).'change_column'.s:mextargs(line,2).s:mkeep(line)
elseif line =~ '\<change_column_default\>'
@@ -3509,7 +3548,7 @@
syn keyword rubyRailsARCallbackMethod after_create after_destroy after_save after_update after_validation after_validation_on_create after_validation_on_update
syn keyword rubyRailsARCallbackMethod around_create around_destroy around_save around_update
syn keyword rubyRailsARCallbackMethod after_commit after_find after_initialize after_rollback after_touch
- syn keyword rubyRailsARClassMethod attr_accessible attr_protected establish_connection set_inheritance_column set_locking_column set_primary_key set_sequence_name set_table_name
+ syn keyword rubyRailsARClassMethod attr_accessible attr_protected attr_readonly establish_connection set_inheritance_column set_locking_column set_primary_key set_sequence_name set_table_name
syn keyword rubyRailsARValidationMethod validate validates validate_on_create validate_on_update validates_acceptance_of validates_associated validates_confirmation_of validates_each validates_exclusion_of validates_format_of validates_inclusion_of validates_length_of validates_numericality_of validates_presence_of validates_size_of validates_uniqueness_of
syn keyword rubyRailsMethod logger
endif
@@ -3542,7 +3581,7 @@
syn keyword rubyRailsFilterMethod verify
endif
if buffer.type_name('db-migration','db-schema')
- syn keyword rubyRailsMigrationMethod create_table change_table drop_table rename_table add_column rename_column change_column change_column_default remove_column add_index remove_index
+ syn keyword rubyRailsMigrationMethod create_table change_table drop_table rename_table add_column rename_column change_column change_column_default remove_column add_index remove_index rename_index execute
endif
if buffer.type_name('test')
if !empty(rails#app().user_assertions())
@@ -3556,7 +3595,7 @@
syn keyword rubyRailsTestControllerMethod assert_response assert_redirected_to assert_template assert_recognizes assert_generates assert_routing assert_dom_equal assert_dom_not_equal assert_select assert_select_rjs assert_select_encoded assert_select_email assert_tag assert_no_tag
endif
elseif buffer.type_name('spec')
- syn keyword rubyRailsTestMethod describe context it its specify shared_examples_for it_should_behave_like before after subject fixtures controller_name helper_name
+ syn keyword rubyRailsTestMethod describe context it its specify shared_examples_for it_should_behave_like before after around subject fixtures controller_name helper_name
syn match rubyRailsTestMethod '\<let\>!\='
syn keyword rubyRailsTestMethod violated pending expect double mock mock_model stub_model
syn match rubyRailsTestMethod '\.\@<!\<stub\>!\@!'
@@ -3580,7 +3619,7 @@
syn keyword rubyRailsMethod debugger
syn keyword rubyRailsMethod alias_attribute alias_method_chain attr_accessor_with_default attr_internal attr_internal_accessor attr_internal_reader attr_internal_writer delegate mattr_accessor mattr_reader mattr_writer superclass_delegating_accessor superclass_delegating_reader superclass_delegating_writer
syn keyword rubyRailsMethod cattr_accessor cattr_reader cattr_writer class_inheritable_accessor class_inheritable_array class_inheritable_array_writer class_inheritable_hash class_inheritable_hash_writer class_inheritable_option class_inheritable_reader class_inheritable_writer inheritable_attributes read_inheritable_attribute reset_inheritable_attributes write_inheritable_array write_inheritable_attribute write_inheritable_hash
- syn keyword rubyRailsInclude require_dependency gem
+ syn keyword rubyRailsInclude require_dependency
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(:order\s*=>\s*\)\@<="+ skip=+\\\\\|\\"+ end=+"+ contains=@rubyStringSpecial,railsOrderSpecial
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(:order\s*=>\s*\)\@<='+ skip=+\\\\\|\\'+ end=+'+ contains=@rubyStringSpecial,railsOrderSpecial
@@ -3610,7 +3649,7 @@
syn cluster htmlArgCluster add=@rubyStringSpecial
syn cluster htmlPreProc add=@rubyStringSpecial
- elseif &syntax == 'eruby' || &syntax == 'haml'
+ elseif &syntax =~# '^eruby\>' || &syntax == 'haml'
syn case match
if classes != ''
exe 'syn keyword '.&syntax.'RailsUserClass '.classes.' contained containedin=@'.&syntax.'RailsRegions'
@@ -3764,91 +3803,6 @@
endfunction
" }}}1
-" Statusline {{{1
-
-function! s:addtostatus(letter,status)
- let status = a:status
- if status !~ 'rails' && g:rails_statusline
- let status=substitute(status,'\C%'.tolower(a:letter),'%'.tolower(a:letter).'%{rails#statusline()}','')
- if status !~ 'rails'
- let status=substitute(status,'\C%'.toupper(a:letter),'%'.toupper(a:letter).'%{rails#STATUSLINE()}','')
- endif
- endif
- return status
-endfunction
-
-function! s:BufInitStatusline()
- if g:rails_statusline
- if &l:statusline == ''
- let &l:statusline = &g:statusline
- endif
- if &l:statusline == ''
- let &l:statusline='%<%f %h%m%r%='
- if &ruler
- let &l:statusline .= '%-14.(%l,%c%V%) %P'
- endif
- endif
- let &l:statusline = s:InjectIntoStatusline(&l:statusline)
- endif
-endfunction
-
-function! s:InitStatusline()
- if g:rails_statusline
- if &g:statusline == ''
- let &g:statusline='%<%f %h%m%r%='
- if &ruler
- let &g:statusline .= '%-16( %l,%c-%v %)%P'
- endif
- endif
- let &g:statusline = s:InjectIntoStatusline(&g:statusline)
- endif
-endfunction
-
-function! s:InjectIntoStatusline(status)
- let status = a:status
- if status !~ 'rails'
- let status = s:addtostatus('y',status)
- let status = s:addtostatus('r',status)
- let status = s:addtostatus('m',status)
- let status = s:addtostatus('w',status)
- let status = s:addtostatus('h',status)
- if status !~ 'rails'
- let status=substitute(status,'%=','%{rails#statusline()}%=','')
- endif
- if status !~ 'rails' && status != ''
- let status .= '%{rails#statusline()}'
- endif
- endif
- return status
-endfunction
-
-function! rails#statusline(...)
- if exists("b:rails_root")
- let t = rails#buffer().type_name()
- if t != "" && a:0 && a:1
- return "[Rails-".t."]"
- else
- return "[Rails]"
- endif
- else
- return ""
- endif
-endfunction
-
-function! rails#STATUSLINE(...)
- if exists("b:rails_root")
- let t = rails#buffer().type_name()
- if t != "" && a:0 && a:1
- return ",RAILS-".toupper(t)
- else
- return ",RAILS"
- endif
- else
- return ""
- endif
-endfunction
-
-" }}}1
" Mappings {{{1
function! s:BufMappings()
@@ -3885,111 +3839,6 @@
endfunction
" }}}1
-" Project {{{
-
-function! s:Project(bang,arg)
- let rr = rails#app().path()
- exe "Project ".a:arg
- let line = search('^[^ =]*="'.s:gsub(rr,'[\/]','[\\/]').'"')
- let projname = s:gsub(fnamemodify(rr,':t'),'\=','-') " .'_on_rails'
- if line && a:bang
- let projname = matchstr(getline('.'),'^[^=]*')
- " Most of this would be unnecessary if the project.vim author had just put
- " the newlines AFTER each project rather than before. Ugh.
- norm zR0"_d%
- if line('.') > 2
- delete _
- endif
- if line('.') != line('$')
- .-2
- endif
- let line = 0
- elseif !line
- $
- endif
- if !line
- if line('.') > 1
- append
-
-.
- endif
- let line = line('.')+1
- call s:NewProject(projname,rr)
- endif
- normal! zMzo
- if search("^ app=app {","W",line+10)
- normal! zo
- exe line
- endif
- normal! 0zt
-endfunction
-
-function! s:NewProject(proj,rr)
- let line = line('.')+1
- let template = s:NewProjectTemplate(a:proj,a:rr)
- silent put =template
- exe line
- " Ugh. how else can I force detecting folds?
- setlocal foldmethod=manual
- norm! $%
- silent exe "doautocmd User ".s:escarg(a:rr)."/Rproject"
- let newline = line('.')
- exe line
- norm! $%
- if line('.') != newline
- call s:warn("Warning: Rproject autocommand failed to leave cursor at end of project")
- endif
- exe line
- setlocal foldmethod=marker
- setlocal nomodified
- " FIXME: make undo stop here
- if !exists("g:maplocalleader")
- silent! normal \R
- else " Needs to be tested
- exe 'silent! normal '.g:maplocalleader.'R'
- endif
-endfunction
-
-function! s:NewProjectTemplate(proj,rr)
- let str = a:proj.'="'.a:rr."\" CD=. filter=\"*\" {\n"
- let str .= " app=app {\n"
- for dir in ['apis','controllers','helpers','models','views']
- let str .= s:addprojectdir(a:rr,'app',dir)
- endfor
- let str .= " }\n"
- let str .= " config=config {\n environments=environments {\n }\n }\n"
- let str .= " db=db {\n"
- let str .= s:addprojectdir(a:rr,'db','migrate')
- let str .= " }\n"
- let str .= " lib=lib filter=\"* */**/*.rb \" {\n tasks=tasks filter=\"**/*.rake\" {\n }\n }\n"
- let str .= " public=public {\n images=images {\n }\n javascripts=javascripts {\n }\n stylesheets=stylesheets {\n }\n }\n"
- if isdirectory(a:rr.'/spec')
- let str .= " spec=spec {\n"
- for dir in ['controllers','fixtures','helpers','models','views']
- let str .= s:addprojectdir(a:rr,'spec',dir)
- endfor
- let str .= " }\n"
- endif
- if isdirectory(a:rr.'/test')
- let str .= " test=test {\n"
- for dir in ['fixtures','functional','integration','mocks','unit']
- let str .= s:addprojectdir(a:rr,'test',dir)
- endfor
- let str .= " }\n"
- end
- let str .= "}\n"
- return str
-endfunction
-
-function! s:addprojectdir(rr,parentdir,dir)
- if isdirectory(a:rr.'/'.a:parentdir.'/'.a:dir)
- return ' '.a:dir.'='.a:dir." filter=\"**\" {\n }\n"
- else
- return ''
- endif
-endfunction
-
-" }}}1
" Database {{{1
function! s:extractdbvar(str,arg)
@@ -4008,7 +3857,7 @@
let cmde = '}]; i=0; e=y[e] while e.respond_to?(:to_str) && (i+=1)<16; e.each{|k,v|puts k.to_s+%{=}+v.to_s}}'
let out = self.lightweight_ruby_eval(cmdb.a:environment.cmde)
let adapter = s:extractdbvar(out,'adapter')
- let adapter = get({'mysql2': 'mysql', 'postgresql': 'pgsql', 'sqlite3': 'sqlite', 'sqlserver': 'sqlsrv', 'sybase': 'asa', 'oci': 'ora'},adapter,adapter)
+ let adapter = get({'mysql2': 'mysql', 'postgresql': 'pgsql', 'sqlite3': 'sqlite', 'sqlserver': 'sqlsrv', 'sybase': 'asa', 'oracle': 'ora'},adapter,adapter)
let dict['type'] = toupper(adapter)
let dict['user'] = s:extractdbvar(out,'username')
let dict['passwd'] = s:extractdbvar(out,'password')
@@ -4026,7 +3875,11 @@
let dict['dbname'] = self.path(dict['dbname'])
endif
let dict['profile'] = ''
- let dict['srvname'] = s:extractdbvar(out,'host')
+ if adapter == 'ora'
+ let dict['srvname'] = s:extractdbvar(out,'database')
+ else
+ let dict['srvname'] = s:extractdbvar(out,'host')
+ endif
let dict['host'] = s:extractdbvar(out,'host')
let dict['port'] = s:extractdbvar(out,'port')
let dict['dsnname'] = s:extractdbvar(out,'dsn')
@@ -4231,7 +4084,6 @@
Rabbrev AM:: ActionMailer
Rabbrev AO:: ActiveModel
Rabbrev AE:: ActiveResource
- Rabbrev AWS:: ActionWebService
endif
endfunction
@@ -4508,37 +4360,14 @@
let g:RAILS_HISTORY = s:sub(g:RAILS_HISTORY,'%(.{-}\n){,'.g:rails_history_size.'}\zs.*','')
endif
call app.source_callback("config/syntax.vim")
- if &ft == "mason"
- setlocal filetype=eruby
- elseif &ft =~ '^\%(conf\|ruby\)\=$' && expand("%:e") =~ '^\%(rjs\|rxml\|builder\|rake\|mab\)$'
- setlocal filetype=ruby
- elseif &ft =~ '^\%(conf\|ruby\)\=$' && expand("%:t") =~ '^\%(\%(Rake\|Gem\|Cap\)file\|Isolate\)$'
- setlocal filetype=ruby
- elseif &ft =~ '^\%(liquid\)\=$' && expand("%:e") == "liquid"
- setlocal filetype=liquid
- elseif &ft =~ '^\%(haml\|x\=html\)\=$' && expand("%:e") == "haml"
- setlocal filetype=haml
- elseif &ft =~ '^\%(sass\|conf\)\=$' && expand("%:e") == "sass"
- setlocal filetype=sass
- elseif &ft =~ '^\%(scss\|conf\)\=$' && expand("%:e") == "scss"
- setlocal filetype=scss
- elseif &ft =~ '^\%(lesscss\|conf\)\=$' && expand("%:e") == "less"
- setlocal filetype=lesscss
- elseif &ft =~ '^\%(dryml\)\=$' && expand("%:e") == "dryml"
- setlocal filetype=dryml
- elseif (&ft == "" || v:version < 701) && expand("%:e") =~ '^\%(rhtml\|erb\)$'
- setlocal filetype=eruby
- elseif (&ft == "" || v:version < 700) && expand("%:e") == 'yml'
- setlocal filetype=yaml
- elseif &ft =~ '^\%(conf\|yaml\)\=$' && expand("%:t") =~ '\.yml\.example$'
+ if expand('%:t') =~ '\.yml\.example$'
setlocal filetype=yaml
+ elseif expand('%:e') =~ '^\%(rjs\|rxml\|builder\)$'
+ setlocal filetype=ruby
elseif firsttime
" Activate custom syntax
let &syntax = &syntax
endif
- if firsttime
- call s:BufInitStatusline()
- endif
if expand('%:e') == 'log'
nnoremap <buffer> <silent> R :checktime<CR>
nnoremap <buffer> <silent> G :checktime<Bar>$<CR>
@@ -4618,7 +4447,7 @@
endif
if has("gui_win32") || has("gui_running")
let code = '*.rb;*.rake;Rakefile'
- let templates = '*.'.s:gsub(s:view_types,',',';*.')
+ let templates = '*.'.join(s:view_types,';*.')
let fixtures = '*.yml;*.csv'
let statics = '*.html;*.css;*.js;*.xml;*.xsd;*.sql;.htaccess;README;README_FOR_APP'
let b:browsefilter = ""
@@ -4630,9 +4459,9 @@
\."All Files (*.*)\t*.*\n"
endif
call self.setvar('&includeexpr','RailsIncludeexpr()')
- call self.setvar('&suffixesadd', ".rb,.".s:gsub(s:view_types,',',',.').",.css,.js,.yml,.csv,.rake,.sql,.html,.xml")
+ call self.setvar('&suffixesadd', ".rb,.".join(s:view_types,',.'))
let ft = self.getvar('&filetype')
- if ft =~ '^\%(e\=ruby\|[yh]aml\|javascript\|css\|s[ac]ss\|lesscss\)$'
+ if ft =~ '^\%(e\=ruby\|[yh]aml\|javascript\|coffee\|css\|s[ac]ss\|lesscss\)$'
call self.setvar('&shiftwidth',2)
call self.setvar('&softtabstop',2)
call self.setvar('&expandtab',1)
@@ -4641,7 +4470,6 @@
endif
endif
if ft == 'ruby'
- call self.setvar('&suffixesadd',".rb,.".s:gsub(s:view_types,',',',.').",.yml,.csv,.rake,s.rb")
call self.setvar('&define',self.define_pattern())
" This really belongs in after/ftplugin/ruby.vim but we'll be nice
if exists('g:loaded_surround') && self.getvar('surround_101') == ''
@@ -4651,9 +4479,7 @@
endif
elseif ft == 'yaml' || fnamemodify(self.name(),':e') == 'yml'
call self.setvar('&define',self.define_pattern())
- call self.setvar('&suffixesadd',".yml,.csv,.rb,.".s:gsub(s:view_types,',',',.').",.rake,s.rb")
- elseif ft == 'eruby'
- call self.setvar('&suffixesadd',".".s:gsub(s:view_types,',',',.').",.rb,.css,.js,.html,.yml,.csv")
+ elseif ft =~# '^eruby\>'
if exists("g:loaded_allml")
call self.setvar('allml_stylesheet_link_tag', "<%= stylesheet_link_tag '\r' %>")
call self.setvar('allml_javascript_include_tag', "<%= javascript_include_tag '\r' %>")
@@ -4676,7 +4502,7 @@
call self.setvar('ragtag_doctype_index', 10)
endif
endif
- if ft == 'eruby' || ft == 'yaml'
+ if ft =~# '^eruby\>' || ft ==# 'yaml'
" surround.vim
if exists("g:loaded_surround")
" The idea behind the || part here is that one can normally define the
@@ -4721,8 +4547,8 @@
autocmd BufWritePost */generators/** call rails#cache_clear("generators")
autocmd FileType * if exists("b:rails_root") | call s:BufSettings() | endif
autocmd Syntax ruby,eruby,yaml,haml,javascript,coffee,railslog if exists("b:rails_root") | call s:BufSyntax() | endif
- autocmd QuickFixCmdPre make* call s:push_chdir()
- autocmd QuickFixCmdPost make* call s:pop_command()
+ autocmd QuickFixCmdPre *make* call s:push_chdir()
+ autocmd QuickFixCmdPost *make* call s:pop_command()
augroup END
" }}}1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-rails-4.3/doc/rails.txt new/vimplugin-rails-4.4/doc/rails.txt
--- old/vimplugin-rails-4.3/doc/rails.txt 2010-09-10 20:24:24.000000000 +0200
+++ new/vimplugin-rails-4.4/doc/rails.txt 2011-09-01 19:20:00.000000000 +0200
@@ -1,11 +1,9 @@
*rails.txt* Plugin for working with Ruby on Rails applications
-Author: Tim Pope <vimNOSPAM(a)tpope.org> |rails-plugin-author|
+Author: Tim Pope <http://tpo.pe/>
+License: Same terms as Vim itself (see |license|)
|rails-introduction| Introduction and Feature Summary
-|rails-installation| Installation and Usage
-|rails-configure-vim| Configuring Vim
-|rails-install-plugin| Installing and Using the Plugin
|rails-commands| General Commands
|rails-navigation| Navigation
|rails-gf| File Under Cursor - gf
@@ -34,80 +32,6 @@
INTRODUCTION *rails-introduction* *rails*
-TextMate may be the latest craze for developing Ruby on Rails applications,
-but Vim is forever. This plugin offers the following features for Ruby on
-Rails application development.
-
-1. Automatically detects buffers containing files from Rails applications,
- and applies settings to those buffers (and only those buffers). You can
- use an autocommand to apply your own custom settings as well.
- |rails-configuration|
-
-2. Unintrusive. Only files in a Rails application should be affected; regular
- Ruby scripts are left untouched. Even when enabled, the plugin should keep
- out of your way if you're not using its features. (If you find a situation
- where this is not a case, contact the |rails-plugin-author|.)
-
-3. Easy navigation of the Rails directory structure. |gf| considers context
- and knows about partials, fixtures, and much more. There are two commands,
- :A (alternate) and :R (related) for easy jumping between files, including
- favorites like model to migration, template to helper, and controller to
- functional test. For more advanced usage, :Rmodel, :Rview, :Rcontroller,
- and several other commands are provided. |rails-navigation|
-
-4. Enhanced syntax highlighting. From has_and_belongs_to_many to
- distance_of_time_in_words, it's here. For easy completion of these long
- method names, 'completefunc' is set to enable syntax based completion on
- |i_CTRL-X_CTRL-U|. |rails-syntax|
-
-5. Interface to rake. Use :Rake to run the current test, spec, or feature.
- Use :.Rake to do a focused run of just the method, example, or scenario on
- the current line. :Rake can also run arbitrary migrations, load individual
- fixtures, and more. |rails-rake|
-
-6. Interface to script/*. Generally, use ":Rscript about" to call
- "script/about" or "script/rails about". Most commands have wrappers with
- additional features: ":Rgenerate controller Blog" generates a blog
- controller and edits app/controllers/blog_controller.rb. |rails-scripts|
-
-7. Partial extraction and migration inversion. |:Rextract| {file} replaces
- the desired range (ideally selected in visual line mode) with "render
- :partial => '{file}'", which is automatically created with your content.
- The @{file} instance variable is replaced with the {file} local variable.
- |:Rinvert| takes a self.up migration and writes a self.down.
- |rails-refactoring|
-
-8. Integration with other plugins. |:Rtree| spawns NERDTree.vim or creates a
- new project.vim project. If dbext.vim is installed, it will be
- transparently configured to reflect database.yml. Cream users get some
- additional mappings, and all GUI users get a menu. |rails-integration|
-
-INSTALLATION AND USAGE *rails-installation*
-
-If you are familiar Vim and have the latest version installed, you may skip
-directly to |rails-install-plugin| below.
-
-Configuring Vim ~
- *rails-configure-vim*
-If you are new to Vim, you need to create a vimrc. For Windows, this file
-goes in ~\_vimrc (try :e ~\_vimrc if you don't know where this is). On other
-platforms, use ~/.vimrc. A very minimal example file is shown below.
->
- set nocompatible
- syntax on
- filetype plugin indent on
->
-Installing and Using the Plugin ~
- *rails-install-plugin*
-If you have the zip file, extract it to vimfiles (Windows) or ~/.vim
-(everything else). You should have the following files: >
- autoload/rails.vim
- plugin/rails.vim
- doc/rails.txt
-See |add-local-help| for instructions on enabling the documentation. In a
-nutshell: >
- :helptags ~/.vim/doc
-
Whenever you edit a file in a Rails application, this plugin will be
automatically activated. This sets various options and defines a few
buffer-specific commands.
@@ -123,7 +47,7 @@
actually edit a file from a Rails application.
*rails-:Rails*
-:Rails {directory} The only global command. Creates a new Rails
+:Rails new {directory} The only global command. Creates a new Rails
application in {directory}, and loads the README.
:Rails! Show the version of rails.vim installed. If rails.vim
@@ -523,12 +447,13 @@
Rake integration happens through the :Rake command.
*rails-:Rake*
-:[range]Rake {targets} Calls |:make!| {targets} (with 'makeprg' being rake)
- and opens the quickfix window if there were any
- errors. An argument of "-" reruns the last task. If
- {targets} are omitted, :Rake defaults to something
- sensible as described below. Giving a line number
- argument may affect that default.
+:[range]Rake {targets} Calls |:make!| {targets} (with 'makeprg' being rake,
+ or `bundle exec rake` if bundler.vim is active) and
+ opens the quickfix window if there were any errors.
+ An argument of "-" reruns the last task. If {targets}
+ are omitted, :Rake defaults to something sensible as
+ described below. Giving a line number argument may
+ affect that default.
*rails-:Rake!*
:[range]Rake! {targets} Called with a bang, :Rake will forgo opening the
@@ -700,14 +625,9 @@
be found at http://www.vim.org/. Cream and GUI menus (for lack of a better
place) are also covered in this section.
- *rails-:Rtree* *rails-:Rproject*
+ *rails-:Rtree*
:Rtree [{arg}] If |NERDTree| is installed, open a tree for the
application root or the given subdirectory.
- Otherwise, if the |project| plugin is installed,
- invoke :Project (typically without an argument), and
- search for the root of the current Rails application.
- If it is not found, create a new project, with
- appropriate directories (app, etc., but not vendor).
*rails-:Rdbext* *rails-dbext*
:Rdbext [{environment}] This command is only provided when the |dbext| plugin
@@ -919,10 +839,6 @@
*rails-'includeexpr'* *rails-'inex'*
The 'includeexpr' option is set to enable the magic described in |rails-gf|.
- *rails-'statusline'* *rails-'stl'*
-Useful information is added to the 'statusline', when |g:rails_statusline| is
-enabled.
-
*rails-'filetype'* *rails-'ft'*
The 'filetype' is sometimes adjusted for Rails files. Most notably, *.rxml
and *.rjs are treated as Ruby files, and files that have been falsely
@@ -1076,14 +992,6 @@
Used for the |:Rpreview| command. Default is as shown above. Overridden by
b:rails_url.
- *g:rails_statusline* >
- let g:rails_statusline=1
-Give a clue in the statusline when this plugin is enabled. Enabled by
-default. This used to be a far more verbose indicator which included the
-type of Rails file. If you actually liked this, you can add either
-%{rails#statusline(1)} or %{rails#STATUSLINE(1)} to 'statusline' explicitly
-(and let the author know, because this fallback is likely getting the boot).
-
*g:rails_syntax* >
let g:rails_syntax=1
When enabled, this tweaks the syntax highlighting to be more Rails friendly.
@@ -1101,34 +1009,14 @@
ABOUT *rails-about* *rails-plugin-author*
-This plugin was written by Tim Pope. Email him at <vimNOSPAM(a)tpope.org>. He
-can also be found on Freenode's IRC network, hanging out in #rubyonrails and
-#vim as tpope.
+This plugin was written by Tim Pope. Email all comments, complaints, and compliments to him at vim at tpope. org.
-The official homepage is
- http://rails.vim.tpope.net
The latest stable version can be found at
http://www.vim.org/scripts/script.php?script_id=1567
-You can keep up to date with |GetLatestVimScripts|.
-The very latest development versions can be retrieved from Git:
- http://github.com/tpope/vim-rails
+Bugs can be reported and the very latest development version can be retrieved
+from GitHub:
+ https://github.com/tpope/vim-rails
git clone git://github.com/tpope/vim-rails.git
-The Github repository has Pledgie donations enabled. All donations made will
-proxied along to ICCF, which goes to help needy children in |Uganda|.
-Donations will be made in through the plugin author's vim.org account through
-http://www.vim.org/sponsor/ . The voting privileges associated with the
-donation will be used to vote for features that will enable better plugins in
-the future. If you would rather keep those voting privileges for yourself, or
-you want your donation to be tax deductible, donate directly through vim.org
-instead. Donations have historically been matched.
-
-Feedback is highly desired on this plugin. Please send all comments,
-complaints, and compliments to the author. No bug is too small to report.
-
- *rails-license*
-This plugin is distributable under the same terms as Vim itself. See
-|license|. No warranties, expressed or implied.
-
vim:tw=78:ts=8:ft=help:norl:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-rails-4.3/plugin/rails.vim new/vimplugin-rails-4.4/plugin/rails.vim
--- old/vimplugin-rails-4.3/plugin/rails.vim 2010-08-10 20:23:47.000000000 +0200
+++ new/vimplugin-rails-4.4/plugin/rails.vim 2011-09-01 19:20:00.000000000 +0200
@@ -1,7 +1,6 @@
" rails.vim - Detect a rails application
-" Author: Tim Pope <vimNOSPAM(a)tpope.org>
+" Author: Tim Pope <http://tpo.pe/>
" GetLatestVimScripts: 1567 1 :AutoInstall: rails.vim
-" URL: http://rails.vim.tpope.net/
" Install this file as plugin/rails.vim. See doc/rails.txt for details. (Grab
" it from the URL above if you don't have it.) To access it from Vim, see
++++++ vimplugin-tlib-0.36.tar.bz2 -> vimplugin-tlib-0.42.tar.bz2 ++++++
++++ 4861 lines of diff (skipped)
++++++ vimplugin-tselectbuffer-0.6.tar.bz2 -> vimplugin-tselectbuffer-0.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-tselectbuffer-0.6/autoload/tselectbuffer.vim new/vimplugin-tselectbuffer-0.7/autoload/tselectbuffer.vim
--- old/vimplugin-tselectbuffer-0.6/autoload/tselectbuffer.vim 1970-01-01 01:00:00.000000000 +0100
+++ new/vimplugin-tselectbuffer-0.7/autoload/tselectbuffer.vim 2012-06-27 14:26:55.000000000 +0200
@@ -0,0 +1,221 @@
+" tselectbuffer.vim
+" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
+" @Website: http://www.vim.org/account/profile.php?user_id=4037
+" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
+" @Created: 2010-01-03.
+" @Last Change: 2010-09-23.
+" @Revision: 0.0.21
+
+let s:save_cpo = &cpo
+set cpo&vim
+" call tlog#Log('Load: '. expand('<sfile>')) " vimtlib-sfile
+
+
+function! s:SNR()
+ return matchstr(expand('<sfile>'), '<SNR>\d\+_\zeSNR$')
+endf
+
+" For possible values please see the documentation of
+" |tlib#buffer#GetList()|'s order argument.
+TLet g:tselectbuffer#order = 'bufnr'
+
+" If non-null, automatically pick the last item in the list. I.e. if you
+" start typing a name and there is only one item left matching that name
+" it is automatically picked and you don't have to type <cr>.
+TLet g:tselectbuffer#autopick = 1
+
+if !exists('g:tselectbuffer#handlers')
+ let g:tselectbuffer#handlers = [
+ \ {'key': 4, 'agent': s:SNR().'AgentDeleteBuffer', 'key_name': '<c-d>', 'help': 'Delete buffer(s)'},
+ \ {'key': 21, 'agent': s:SNR().'AgentRenameBuffer', 'key_name': '<c-u>', 'help': 'Rename buffer(s)'},
+ \ {'key': 19, 'agent': s:SNR().'AgentSplitBuffer', 'key_name': '<c-s>', 'help': 'Show in split window'},
+ \ {'key': 20, 'agent': s:SNR().'AgentTabBuffer', 'key_name': '<c-t>', 'help': 'Show in tab'},
+ \ {'key': 22, 'agent': s:SNR().'AgentVSplitBuffer', 'key_name': '<c-v>', 'help': 'Show in vsplit window'},
+ \ {'key': 23, 'agent': s:SNR().'AgentOpenBuffer', 'key_name': '<c-w>', 'help': 'View in current window'},
+ \ {'key': 60, 'agent': s:SNR().'AgentJumpBuffer', 'key_name': '<', 'help': 'Jump to opened window/tab a la swb=opentab'},
+ \ {'return_agent': s:SNR() .'Callback'},
+ \ ]
+ if !g:tselectbuffer#autopick
+ call add(g:tselectbuffer#handlers, {'pick_last_item': 0})
+ endif
+endif
+
+function! s:PrepareSelectBuffer()
+ let [s:selectbuffer_nr, s:selectbuffer_list] = tlib#buffer#GetList(s:selectbuffer_hidden, 1, g:tselectbuffer#order)
+ let s:selectbuffer_alternate = ''
+ let s:selectbuffer_alternate_n = 0
+ for b in s:selectbuffer_list
+ let s:selectbuffer_alternate_n -= 1
+ if b =~ '^\s*\d\+\s\+#'
+ let s:selectbuffer_alternate = b
+ let s:selectbuffer_alternate_n = -s:selectbuffer_alternate_n
+ break
+ endif
+ endfor
+ if s:selectbuffer_alternate_n < 0
+ let s:selectbuffer_alternate_n = 0
+ endif
+ return s:selectbuffer_list
+endf
+
+function! s:GetBufNr(buffer)
+ " TLogVAR a:buffer
+ let bi = index(s:selectbuffer_list, a:buffer)
+ " TLogVAR bi
+ let bx = s:selectbuffer_nr[bi]
+ " TLogVAR bx
+ return 0 + bx
+endf
+
+function! s:RenameThisBuffer(buffer)
+ let bx = s:GetBufNr(a:buffer)
+ let on = bufname(bx)
+ let nn = input('Rename buffer: ', on)
+ if !empty(nn) && nn != on
+ exec 'buffer '. bx
+ if filereadable(on) && &buftype !~ '\<nofile\>'
+ " if filewritable(nn)
+ call rename(on, nn)
+ echom 'Rename file: '. on .' -> '. nn
+ " else
+ " echoerr 'File cannot be renamed: '. nn
+ " endif
+ endif
+ exec 'file! '. escape(nn, ' %#')
+ echom 'Rename buffer: '. on .' -> '. nn
+ return 1
+ endif
+ return 0
+endf
+
+function! s:AgentRenameBuffer(world, selected)
+ call a:world.CloseScratch()
+ for buffer in a:selected
+ call s:RenameThisBuffer(buffer)
+ endfor
+ let a:world.state = 'reset'
+ let a:world.base = s:PrepareSelectBuffer()
+ " let a:world.index_table = s:selectbuffer_nr
+ return a:world
+endf
+
+function! s:DeleteThisBuffer(buffer)
+ let bx = s:GetBufNr(a:buffer)
+ if s:delete_this_buffer_default =~# '^a'
+ let doit = 'y'
+ else
+ call inputsave()
+ let doit = input('Delete buffer "'. bufname(bx) .'"? (yes/Yes/no/None/all) ', s:delete_this_buffer_default)
+ call inputrestore()
+ endif
+ if doit =~? '^\(y\%[es]\|a\%[ll]\)$'
+ if doit =~# '^Y' || doit =~# '^a'
+ let s:delete_this_buffer_default = doit
+ endif
+ if bufloaded(bx)
+ exec 'bdelete '. bx
+ echom 'Delete buffer '. bx .': '. a:buffer
+ else
+ exec 'bwipeout '. bx
+ echom 'Wipe out buffer '. bx .': '. a:buffer
+ end
+ elseif doit =~# '^N\%[one]$'
+ return 0
+ endif
+ return 1
+endf
+
+function! s:AgentDeleteBuffer(world, selected)
+ call a:world.CloseScratch(0)
+ let s:delete_this_buffer_default = ''
+ for buffer in a:selected
+ " TLogVAR buffer
+ if !s:DeleteThisBuffer(buffer)
+ break
+ endif
+ endfor
+ let a:world.state = 'reset'
+ let a:world.base = s:PrepareSelectBuffer()
+ " let a:world.index_table = s:selectbuffer_nr
+ return a:world
+endf
+
+function! s:GetBufferNames(selected) "{{{3
+ return map(copy(a:selected), 'bufname(s:GetBufNr(v:val))')
+endf
+
+function! s:AgentSplitBuffer(world, selected)
+ return tlib#agent#EditFileInSplit(a:world, s:GetBufferNames(a:selected))
+endf
+
+function! s:AgentVSplitBuffer(world, selected)
+ return tlib#agent#EditFileInVSplit(a:world, s:GetBufferNames(a:selected))
+endf
+
+function! s:AgentOpenBuffer(world, selected)
+ return tlib#agent#ViewFile(a:world, s:GetBufferNames(a:selected))
+endf
+
+function! s:AgentTabBuffer(world, selected)
+ return tlib#agent#EditFileInTab(a:world, s:GetBufferNames(a:selected))
+endf
+
+function! s:AgentJumpBuffer(world, selected) "{{{3
+ let bn = s:GetBufNr(a:selected[0])
+ " TLogVAR bn
+ let tw = tlib#tab#TabWinNr(bn)
+ " TLogVAR tw
+ if !empty(tw)
+ call a:world.CloseScratch()
+ " let w = tlib#agent#Suspend(a:world, a:selected)
+ " if w.state =~ '\<suspend\>'
+ " call w.SwitchWindow('win')
+ let [tn, wn] = tw
+ call tlib#tab#Set(tn)
+ call tlib#win#Set(wn)
+ " return w
+ " endif
+ else
+ let a:world.status = 'redisplay'
+ endif
+ return a:world
+endf
+
+function! s:SwitchToBuffer(world, buffer, ...)
+ TVarArg ['cmd', 'buffer']
+ let bi = s:GetBufNr(a:buffer)
+ " TLogVAR a:buffer
+ " TLogVAR bi
+ if bi > 0
+ let back = a:world.SwitchWindow('win')
+ " TLogDBG cmd .' '. bi
+ exec cmd .' '. bi
+ " exec back
+ endif
+endf
+
+
+function! s:Callback(world, selected) "{{{3
+ let cmd = len(a:selected) > 1 ? 'sbuffer' : 'buffer'
+ for b in a:selected
+ " TLogVAR b
+ call s:SwitchToBuffer(a:world, b, cmd)
+ endfor
+endf
+
+
+function! tselectbuffer#Select(show_hidden)
+ let s:selectbuffer_hidden = a:show_hidden
+ let bs = s:PrepareSelectBuffer()
+ let bhs = copy(g:tselectbuffer#handlers)
+ " call add(bhs, {'index_table': s:selectbuffer_nr})
+ if !empty(s:selectbuffer_alternate_n)
+ call add(bhs, {'initial_index': s:selectbuffer_alternate_n})
+ endif
+ let msg = printf('Select buffer (%s)', g:tselectbuffer#order)
+ let b = tlib#input#List('m', msg, bs, bhs)
+endf
+
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-tselectbuffer-0.6/doc/tselectbuffer.txt new/vimplugin-tselectbuffer-0.7/doc/tselectbuffer.txt
--- old/vimplugin-tselectbuffer-0.6/doc/tselectbuffer.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/vimplugin-tselectbuffer-0.7/doc/tselectbuffer.txt 2012-06-27 14:26:55.000000000 +0200
@@ -0,0 +1,85 @@
+*tselectbuffer.txt* A simplicistic buffer selector/switcher
+ Author: Tom Link, micathom at gmail com
+
+This plugin provides a simple buffer selector. It doesn't have all the
+features other buffer selectors have but can be useful for quickly
+switching to a different buffer or for deleting buffers.
+
+The idea is to view the buffer list, to do something, and to close the
+buffer list. If you really want to permanently watch the buffer list to
+see whether it's changed, you might want to use a different plugin.
+
+Features:
+ - list buffers, dynamically filter buffers matching a pattern
+ - switch to a buffer
+ - rename a buffer (you may need to use :saveas! or :w! when writing
+ the renamed buffer to disk)
+ - delete one or more buffer(s)
+
+:[N]TSelectBuffer[!]
+ List buffers. With a count or a !, show also hidden buffers.
+ Keys:
+ <cr> ... Select (close the buffer list)
+ <c-s> ... Open in split window
+ <c-v> ... Open in vertically split window
+ <c-t> ... Open in new tab
+ <c-w> ... Show in original window (continue with the buffer list)
+ <c-d> ... Delete a buffer
+ <c-u> ... Rename a buffer
+ < ... Jump to opened buffer in window/tab
+
+Suggested keymaps (put something like this into ~/.vimrc):
+ noremap <m-b> :TSelectBuffer<cr>
+ inoremap <m-b> <c-o>:TSelectBuffer<cr>
+
+
+-----------------------------------------------------------------------
+Install~
+
+Edit the vba file and type: >
+
+ :so %
+
+See :help vimball for details. If you have difficulties or use vim 7.0,
+please make sure, you have the current version of vimball
+(vimscript #1502) installed or update your runtime.
+
+Also available via git: http://github.com/tomtom/vimtlib/
+
+
+========================================================================
+Contents~
+
+ :TSelectBuffer ............... |:TSelectBuffer|
+ g:tselectbuffer#order ........ |g:tselectbuffer#order|
+ g:tselectbuffer#autopick ..... |g:tselectbuffer#autopick|
+ tselectbuffer#Select ......... |tselectbuffer#Select()|
+
+
+========================================================================
+plugin/tselectbuffer.vim~
+
+ *:TSelectBuffer*
+:TSelectBuffer
+
+
+========================================================================
+autoload/tselectbuffer.vim~
+
+ *g:tselectbuffer#order*
+g:tselectbuffer#order (default: 'bufnr')
+ For possible values please see the documentation of
+ |tlib#buffer#GetList()|'s order argument.
+
+ *g:tselectbuffer#autopick*
+g:tselectbuffer#autopick (default: 1)
+ If non-null, automatically pick the last item in the list. I.e. if you
+ start typing a name and there is only one item left matching that name
+ it is automatically picked and you don't have to type <cr>.
+
+ *tselectbuffer#Select()*
+tselectbuffer#Select(show_hidden)
+
+
+
+vim:tw=78:fo=tcq2:isk=!-~,^*,^|,^":ts=8:ft=help:norl:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-tselectbuffer-0.6/plugin/tselectbuffer.vim new/vimplugin-tselectbuffer-0.7/plugin/tselectbuffer.vim
--- old/vimplugin-tselectbuffer-0.6/plugin/tselectbuffer.vim 2008-12-06 11:36:02.000000000 +0100
+++ new/vimplugin-tselectbuffer-0.7/plugin/tselectbuffer.vim 2012-06-27 14:26:55.000000000 +0200
@@ -1,255 +1,26 @@
" tselectbuffer.vim -- A simplicistic buffer selector/switcher
-" @Author: Thomas Link (micathom AT gmail com?subject=[vim])
+" @Author: Tom Link (micathom AT gmail com?subject=[vim])
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-04-15.
-" @Last Change: 2008-08-18.
-" @Revision: 314
+" @Last Change: 2010-10-02.
+" @Revision: 328
" GetLatestVimScripts: 1866 1 tselectbuffer.vim
if &cp || exists("loaded_tselectbuffer")
finish
endif
-if !exists('loaded_tlib') || loaded_tlib < 24
- echoerr 'tlib >= 0.24 is required'
+if !exists('loaded_tlib') || loaded_tlib < 40
+ echoerr 'tlib >= 0.40 is required'
finish
endif
-let loaded_tselectbuffer = 6
+let loaded_tselectbuffer = 7
-function! s:SNR()
- return matchstr(expand('<sfile>'), '<SNR>\d\+_\zeSNR$')
-endf
-
-" Possible values:
-" bufnr :: Default behaviour
-" mru :: Sort buffers according to most recent use
-"
-" NOTE: MRU order works on second invocation only. If you want to always
-" use MRU order, call tlib#buffer#EnableMRU() in your ~/.vimrc file.
-TLet g:tselectbuffer_order = 'bufnr'
-
-if !exists('g:tselectbuffer_autopick') | let g:tselectbuffer_autopick = 1 | endif
-if !exists('g:tselectbuffer_handlers')
- let g:tselectbuffer_handlers = [
- \ {'key': 4, 'agent': s:SNR().'AgentDeleteBuffer', 'key_name': '<c-d>', 'help': 'Delete buffer(s)'},
- \ {'key': 21, 'agent': s:SNR().'AgentRenameBuffer', 'key_name': '<c-u>', 'help': 'Rename buffer(s)'},
- \ {'key': 19, 'agent': s:SNR().'AgentSplitBuffer', 'key_name': '<c-s>', 'help': 'Show in split buffer'},
- \ {'key': 20, 'agent': s:SNR().'AgentTabBuffer', 'key_name': '<c-t>', 'help': 'Show in tab'},
- \ {'key': 22, 'agent': s:SNR().'AgentVSplitBuffer', 'key_name': '<c-v>', 'help': 'Show in vsplit buffer'},
- \ {'key': 23, 'agent': s:SNR().'AgentOpenBuffer', 'key_name': '<c-w>', 'help': 'View in window'},
- \ {'key': 60, 'agent': s:SNR().'AgentJumpBuffer', 'key_name': '<', 'help': 'Jump to opened window/tab � la swb=opentab'},
- \ {'return_agent': s:SNR() .'Callback'},
- \ ]
- if !g:tselectbuffer_autopick
- call add(g:tselectbuffer_handlers, {'pick_last_item': 0})
- endif
-endif
-function! s:PrepareSelectBuffer()
- let [s:selectbuffer_nr, s:selectbuffer_list] = tlib#buffer#GetList(s:selectbuffer_hidden, 1, g:tselectbuffer_order)
- let s:selectbuffer_alternate = ''
- let s:selectbuffer_alternate_n = 0
- for b in s:selectbuffer_list
- let s:selectbuffer_alternate_n -= 1
- if b =~ '^\s*\d\+\s\+#'
- let s:selectbuffer_alternate = b
- let s:selectbuffer_alternate_n = -s:selectbuffer_alternate_n
- break
- endif
- endfor
- if s:selectbuffer_alternate_n < 0
- let s:selectbuffer_alternate_n = 0
- endif
- return s:selectbuffer_list
-endf
-
-function! s:GetBufNr(buffer)
- " TLogVAR a:buffer
- let bi = index(s:selectbuffer_list, a:buffer)
- " TLogVAR bi
- let bx = s:selectbuffer_nr[bi]
- " TLogVAR bx
- return 0 + bx
-endf
-
-function! s:RenameThisBuffer(buffer)
- let bx = s:GetBufNr(a:buffer)
- let on = bufname(bx)
- let nn = input('Rename buffer: ', on)
- if !empty(nn) && nn != on
- exec 'buffer '. bx
- if filereadable(on) && &buftype !~ '\<nofile\>'
- " if filewritable(nn)
- call rename(on, nn)
- echom 'Rename file: '. on .' -> '. nn
- " else
- " echoerr 'File cannot be renamed: '. nn
- " endif
- endif
- exec 'file! '. escape(nn, ' %#')
- echom 'Rename buffer: '. on .' -> '. nn
- return 1
- endif
- return 0
-endf
-
-function! s:AgentRenameBuffer(world, selected)
- call a:world.CloseScratch()
- for buffer in a:selected
- call s:RenameThisBuffer(buffer)
- endfor
- let a:world.state = 'reset'
- let a:world.base = s:PrepareSelectBuffer()
- " let a:world.index_table = s:selectbuffer_nr
- return a:world
-endf
-
-function! s:DeleteThisBuffer(buffer)
- let bx = s:GetBufNr(a:buffer)
- let doit = input('Delete buffer "'. bufname(bx) .'"? (y/N) ', s:delete_this_buffer_default)
- echo
- if doit ==? 'y'
- if doit ==# 'Y'
- let s:delete_this_buffer_default = 'y'
- endif
- if bufloaded(bx)
- exec 'bdelete '. bx
- echom 'Delete buffer '. bx .': '. a:buffer
- else
- exec 'bwipeout '. bx
- echom 'Wipe out buffer '. bx .': '. a:buffer
- end
- return 1
- endif
- return 0
-endf
-
-function! s:AgentDeleteBuffer(world, selected)
- call a:world.CloseScratch(0)
- let s:delete_this_buffer_default = ''
- for buffer in a:selected
- " TLogVAR buffer
- call s:DeleteThisBuffer(buffer)
- endfor
- let a:world.state = 'reset'
- let a:world.base = s:PrepareSelectBuffer()
- " let a:world.index_table = s:selectbuffer_nr
- return a:world
-endf
-
-function! s:GetBufferNames(selected) "{{{3
- return map(copy(a:selected), 'bufname(s:GetBufNr(v:val))')
-endf
-
-function! s:AgentSplitBuffer(world, selected)
- return tlib#agent#EditFileInSplit(a:world, s:GetBufferNames(a:selected))
-endf
-
-function! s:AgentVSplitBuffer(world, selected)
- return tlib#agent#EditFileInVSplit(a:world, s:GetBufferNames(a:selected))
-endf
-
-function! s:AgentOpenBuffer(world, selected)
- return tlib#agent#ViewFile(a:world, s:GetBufferNames(a:selected))
-endf
-
-function! s:AgentTabBuffer(world, selected)
- return tlib#agent#EditFileInTab(a:world, s:GetBufferNames(a:selected))
-endf
-
-function! s:AgentJumpBuffer(world, selected) "{{{3
- let bn = s:GetBufNr(a:selected[0])
- " TLogVAR bn
- let tw = tlib#tab#TabWinNr(bn)
- " TLogVAR tw
- if !empty(tw)
- call a:world.CloseScratch()
- " let w = tlib#agent#Suspend(a:world, a:selected)
- " if w.state =~ '\<suspend\>'
- " call w.SwitchWindow('win')
- let [tn, wn] = tw
- call tlib#tab#Set(tn)
- call tlib#win#Set(wn)
- " return w
- " endif
- else
- let a:world.status = 'redisplay'
- endif
- return a:world
-endf
-
-function! s:SwitchToBuffer(world, buffer, ...)
- TVarArg ['cmd', 'buffer']
- let bi = s:GetBufNr(a:buffer)
- " TLogVAR a:buffer
- " TLogVAR bi
- if bi > 0
- let back = a:world.SwitchWindow('win')
- " TLogDBG cmd .' '. bi
- exec cmd .' '. bi
- " exec back
- endif
-endf
-
-
-function! s:Callback(world, selected) "{{{3
- let cmd = len(a:selected) > 1 ? 'sbuffer' : 'buffer'
- for b in a:selected
- " TLogVAR b
- call s:SwitchToBuffer(a:world, b, cmd)
- endfor
-endf
-
-
-function! TSelectBuffer(show_hidden)
- let s:selectbuffer_hidden = a:show_hidden
- let bs = s:PrepareSelectBuffer()
- let bhs = copy(g:tselectbuffer_handlers)
- " call add(bhs, {'index_table': s:selectbuffer_nr})
- if !empty(s:selectbuffer_alternate_n)
- call add(bhs, {'initial_index': s:selectbuffer_alternate_n})
- endif
- let msg = printf('Select buffer (%s)', g:tselectbuffer_order)
- let b = tlib#input#List('m', msg, bs, bhs)
-endf
-command! -count=0 -bang TSelectBuffer call TSelectBuffer(!empty("<bang>") || v:count)
+command! -count=0 -bang TSelectBuffer call tselectbuffer#Select(!empty("<bang>") || v:count)
finish
-
-This plugin provides a simple buffer selector. It doesn't have all the
-features other buffer selectors have but can be useful for quickly
-switching to a different buffer or for deleting buffers.
-
-The idea is to view the buffer list, to do something, and to close the
-buffer list. If you really want to permanently watch the buffer list to
-see whether it's changed, you might want to use a different plugin.
-
-Features:
- - list buffers, dynamically filter buffers matching a pattern
- - switch to a buffer
- - rename a buffer (you may need to use :saveas! or :w! when writing
- the renamed buffer to disk)
- - delete one or more buffer(s)
-
-:[N]TSelectBuffer[!]
- List buffers. With a count or a !, show also hidden buffers.
- Keys:
- <cr> ... Select (close the buffer list)
- <c-s> ... Open in split window
- <c-v> ... Open in vertically split window
- <c-t> ... Open in new tab
- <c-w> ... Show in original window (continue with the buffer list)
- <c-d> ... Delete a buffer
- <c-u> ... Rename a buffer
- < ... Jump to opened buffer in window/tab
-
-Suggested keymaps (put something like this into ~/.vimrc):
- noremap <m-b> :TSelectBuffer<cr>
- inoremap <m-b> <c-o>:TSelectBuffer<cr>
-
-
-CHANGES:
0.1
Initial release
@@ -279,3 +50,10 @@
0.6
- MRU order
+0.7
+- Moved the definition of some variables from plugin/tselectbuffer.vim
+to autoload/tselectbuffer.vim
+- Delete buffer: New options: None, all
+- Support for g:tselectbuffer#order = "basename"
+- Require tlib 0.40
+
++++++ vimplugin-zoomwin-23.tar.bz2 -> vimplugin-zoomwin-24.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-zoomwin-23/autoload/ZoomWin.vim new/vimplugin-zoomwin-24/autoload/ZoomWin.vim
--- old/vimplugin-zoomwin-23/autoload/ZoomWin.vim 2009-03-27 14:07:28.000000000 +0100
+++ new/vimplugin-zoomwin-24/autoload/ZoomWin.vim 2012-06-27 14:28:42.000000000 +0200
@@ -1,8 +1,8 @@
" ZoomWin: Brief-like ability to zoom into/out-of a window
" Author: Charles Campbell
" original version by Ron Aaron
-" Date: Jan 26, 2009
-" Version: 23
+" Date: Jun 18, 2012
+" Version: 24
" History: see :help zoomwin-history {{{1
" GetLatestVimScripts: 508 1 :AutoInstall: ZoomWin.vim
@@ -18,7 +18,8 @@
finish
endif
let s:keepcpo = &cpo
-let g:loaded_ZoomWin = "v23"
+let g:loaded_ZoomWin = "v24"
+let s:localoptlist = ["ai","ar","bh","bin","bl","bomb","bt","cfu","ci","cin","cink","cino","cinw","cms","com","cpt","efm","eol","ep","et","fenc","fex","ff","flp","fo","ft","gp","imi","ims","inde","inex","indk","inf","isk","key","kmp","lisp","mps","ml","ma","mod","nf","ofu","oft","pi","qe","ro","sw","sn","si","sts","spc","spf","spl","sua","swf","smc","syn","ts","tx","tw","udf","wm"]
set cpo&vim
"DechoTabOn
@@ -30,6 +31,8 @@
" The original version was by Ron Aaron.
fun! ZoomWin#ZoomWin()
" let g:decho_hide= 1 "Decho
+ let lzkeep = &lz
+ set lz
" call Dfunc("ZoomWin#ZoomWin() winbufnr(2)=".winbufnr(2))
" if the vim doesn't have +mksession, only a partial zoom is available {{{3
@@ -50,25 +53,14 @@
let s:winrestore = winrestcmd()
res
endif
-" call Dret("ZoomWin#ZoomWin : partialzoom=".s:partialzoom)
+ let &lz = lzkeep
+" call Dret("ZoomWin#ZoomWin : partialzoom=".s:partialzoom)
return
endif
- " Close certain windows {{{3
+ " Close certain windows and save user settings {{{3
call s:ZoomWinPreserve(0)
-
- " save options. Force window minimum height/width to be >= 1 {{{3
- let keep_hidden = &hidden
- let keep_write = &write
-
- if v:version < 603
- if &wmh == 0 || &wmw == 0
- let keep_wmh = &wmh
- let keep_wmw = &wmw
- silent! set wmh=1 wmw=1
- endif
- endif
- set hidden write
+ call s:SaveUserSettings()
if winbufnr(2) == -1
" there's only one window - restore to multiple-windows mode {{{3
@@ -76,17 +68,24 @@
if exists("s:sessionfile") && filereadable(s:sessionfile)
" save position in current one-window-only
-" call Decho("save position in current one-window-only in sponly")
+" call Decho("save position in current one-window-only in sponly (s:sessionfile<".s:sessionfile.">)")
let sponly = s:SavePosn(0)
let s:origline = line(".")
let s:origcol = virtcol(".")
+ let s:swv = deepcopy(getwinvar(winnr(),""),1)
+ sil! unlet key value
+ for [key,value] in items(s:swv)
+ exe "sil! unlet w:".key
+ sil! unlet key value
+ endfor
" source session file to restore window layout
- let ei_keep= &ei
- set ei=all
- exe 'silent! so '.fnameescape(s:sessionfile)
-" Decho("@@<".@@.">")
+ let ei_keep = &ei
+ set ei=all noswf
+ exe 'sil! so '.fnameescape(s:sessionfile)
let v:this_session= s:sesskeep
+ " restore any and all window variables
+ call s:RestoreWinVars()
if exists("s:savedposn1")
" restore windows' positioning and buffers
@@ -96,6 +95,14 @@
unlet s:winkeep
endif
+ if exists("s:swv")
+ " restore possibly modified while in one-window mode, window variables
+ for [key,value] in items(s:swv)
+ sil! call setwinvar(winnr(),key,value)
+ sil! unlet key value
+ endfor
+ endif
+
if line(".") != s:origline || virtcol(".") != s:origcol
" If the cursor hasn't moved from the original position,
" then let the position remain what it was in the original
@@ -108,9 +115,21 @@
" call Decho("delete session file")
call delete(s:sessionfile)
unlet s:sessionfile
- let &ei=ei_keep
+ let &ei = ei_keep
endif
+ " I don't know why -- but netrw-generated windows end up as [Scratch] even though the bufname is correct.
+ " Following code fixes this.
+ let curwin= winnr()
+ windo exe "sil! file ".fnameescape(bufname(winbufnr(winnr())))
+ exe curwin."wincmd w"
+
+ " Restore local window settings
+ call s:RestoreWinSettings()
+
+ " zoomwinstate used by g:ZoomWin_funcref()
+ let zoomwinstate= 0
+
else " there's more than one window - go to only-one-window mode {{{3
" call Decho("there's multiple windows - goto one-window-only")
@@ -120,16 +139,21 @@
" doesn't work with the command line window (normal mode q:)
if &bt == "nofile" && expand("%") == (v:version < 702 ? 'command-line' : '[Command Line]')
echoerr "***error*** ZoomWin#ZoomWin doesn't work with the ".expand("%")." window"
+ let &lz= lzkeep
" call Dret("ZoomWin#ZoomWin : ".expand('%')." window error")
return
endif
-" call Decho("1: @@<".@@.">")
" disable all events (autocmds)
" call Decho("disable events")
let ei_keep= &ei
set ei=all
-" call Decho("2: @@<".@@.">")
+
+ " Save local window settings
+ call s:SaveWinSettings()
+
+ " save all window variables
+ call s:SaveWinVars()
" save window positioning commands
" call Decho("save window positioning commands")
@@ -137,17 +161,13 @@
call s:GotoWinNum(s:winkeep)
" set up name of session file
-" call Decho("3: @@<".@@.">")
let s:sessionfile= tempname()
-" call Decho("4: @@<".@@.">")
" save session
" call Decho("save session")
let ssop_keep = &ssop
let &ssop = 'blank,help,winsize,folds,globals,localoptions,options'
-" call Decho("5: @@<".@@.">")
exe 'mksession! '.fnameescape(s:sessionfile)
-" call Decho("6: @@<".@@.">")
let keepyy= @@
let keepy0= @0
let keepy1= @1
@@ -165,12 +185,13 @@
exe "keepalt keepmarks new! ".fnameescape(s:sessionfile)
catch /^Vim\%((\a\+)\)\=:E/
echoerr "Too many windows"
- silent! call delete(s:sessionfile)
+ sil! call delete(s:sessionfile)
unlet s:sessionfile
+ let &lz= lzkeep
" call Dret("ZoomWin#ZoomWin : too many windows")
return
endtry
- silent! keepjumps keepmarks v/wincmd\|split\|resize/d
+ sil! keepjumps keepmarks v/wincmd\|split\|resize/d
keepalt w!
keepalt bw!
else
@@ -192,33 +213,41 @@
let @9= keepy9
call histdel('search', -1)
let @/ = histget('search', -1)
-" call Decho("7: @@<".@@.">")
" restore user's session options and restore event handling
" call Decho("restore user session options and event handling")
set nolz
let &ssop = ssop_keep
- silent! only!
-" call Decho("8: @@<".@@.">")
+ let curwin= winnr()
+ sil! only!
let &ei = ei_keep
echomsg expand("%")
-" call Decho("9: @@<".@@.">")
+ call s:RestoreOneWinSettings(curwin)
+
+ " zoomwinstate used by g:ZoomWin_funcref()
+ let zoomwinstate= 1
endif
" restore user option settings {{{3
-" call Decho("restore user option settings")
- let &hidden= keep_hidden
- let &write = keep_write
- if v:version < 603
- if exists("keep_wmw")
- let &wmh= keep_wmh
- let &wmw= keep_wmw
- endif
- endif
+ call s:RestoreUserSettings()
" Re-open certain windows {{{3
call s:ZoomWinPreserve(1)
+
+ " call user's optional funcref (callback) functions
+ if exists("g:ZoomWin_funcref")
+ if type(g:ZoomWin_funcref) == 2
+ call g:ZoomWin_funcref(zoomwinstate)
+ elseif type(g:ZoomWin_funcref) == 3
+ for Fncref in g:ZoomWin_funcref
+ if type(FncRef) == 2
+ call FncRef(zoomwinstate)
+ endif
+ endfor
+ endif
+ endif
+ let &lz= lzkeep
" call Dret("ZoomWin#ZoomWin")
endfun
@@ -228,26 +257,36 @@
" of the current window.
fun! s:SavePosn(savewinhoriz)
" call Dfunc("SavePosn(savewinhoriz=".a:savewinhoriz.") file<".expand("%").">")
- let swline = line(".")
+ let swline = line(".")
if swline == 1 && getline(1) == ""
" empty buffer
let savedposn= "silent b ".winbufnr(0)
" call Dret("SavePosn savedposn<".savedposn.">")
return savedposn
endif
- let swcol = col(".")
+ let swcol = col(".")
+ if swcol >= col("$")
+ let swcol= swcol + virtcol(".") - virtcol("$") " adjust for virtual edit (cursor past end-of-line)
+ endif
let swwline = winline()-1
let swwcol = virtcol(".") - wincol()
- let savedposn = "silent b ".winbufnr(0)."|".swline."|silent norm! z\<cr>"
+" call Decho("swline #".swline)
+" call Decho("swcol #".swcol)
+" call Decho("swwline#".swwline)
+" call Decho("swwcol #".swwcol)
+
+ let savedposn = "silent b ".winbufnr(0)
+ let savedposn = savedposn."|".swline
+ let savedposn = savedposn."|sil! norm! 0z\<cr>"
if swwline > 0
- let savedposn= savedposn.":silent norm! ".swwline."\<c-y>\<cr>:silent norm! zs\<cr>"
+ let savedposn= savedposn.":sil! norm! ".swwline."\<c-y>\<cr>"
endif
- let savedposn= savedposn.":silent call cursor(".swline.",".swcol.")\<cr>"
if a:savewinhoriz
if swwcol > 0
- let savedposn= savedposn.":silent norm! ".swwcol."zl\<cr>"
+ let savedposn= savedposn.":sil! norm! 0".swwcol."zl\<cr>"
endif
+ let savedposn= savedposn.":sil! call cursor(".swline.",".swcol.")\<cr>"
" handle certain special settings for the multi-window savedposn call
" bufhidden buftype buflisted
@@ -268,6 +307,8 @@
let savedposn= savedposn.":setlocal ".settings."\<cr>"
endif
+ else
+ let savedposn= savedposn.":sil! call cursor(".swline.",".swcol.")\<cr>"
endif
" call Dret("SavePosn savedposn<".savedposn.">")
return savedposn
@@ -276,7 +317,7 @@
" ---------------------------------------------------------------------
" s:RestorePosn: this function restores noname and scratch windows {{{2
fun! s:RestorePosn(savedposn)
-" call Dfunc("RestorePosn(savedposn<".a:savedposn.">) file<".expand("%").">")
+" call Dfunc("RestorePosn(savedposn<".a:savedposn.">)")
if &scb
setlocal noscb
exe a:savedposn
@@ -294,7 +335,7 @@
" call Dfunc("ZoomWin#CleanupSessionFile()")
if exists("s:sessionfile") && filereadable(s:sessionfile)
" call Decho("sessionfile exists and is readable; deleting it")
- silent! call delete(s:sessionfile)
+ sil! call delete(s:sessionfile)
unlet s:sessionfile
endif
" call Dret("ZoomWin#CleanupSessionFile")
@@ -335,7 +376,7 @@
let s:taglist_winnum = bufwinnr(g:TagList_title)
if s:taglist_winnum != -1
" Close the window
- exec "silent! Tlist"
+ exec "sil! Tlist"
endif
endif
@@ -354,7 +395,7 @@
if exists('g:zoomwin_preserve_taglist') && exists('g:loaded_taglist')
" If taglist window was open, open it again
if s:taglist_winnum != -1
- exec "silent! Tlist"
+ exec "sil! Tlist"
endif
endif
@@ -370,6 +411,111 @@
" call Dret("ZoomWinPreserve")
endfun
+" ---------------------------------------------------------------------
+" s:SaveWinVars: saves a copy of all window-variables into the script variable s:swv_#, {{{2
+" where # is the current window number, for all windows.
+fun! s:SaveWinVars()
+" call Dfunc("s:SaveWinVars()")
+ let eikeep= &ei
+ set ei=WinEnter,WinLeave
+ windo let s:swv_{winnr()} = deepcopy(getwinvar(winnr(),""),1)
+
+ let &ei= eikeep
+" call Dret("s:SaveWinVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreWinVars: restores window variables for all windows {{{2
+fun! s:RestoreWinVars()
+" call Dfunc("s:RestoreWinVars()")
+" windo call Decho(string(s:swv_{winnr()}))
+ let eikeep= &ei
+ set ei=WinEnter,WinLeave
+ windo if exists("s:swv_{winnr()}") |sil! unlet s:key s:value |for [s:key,s:value] in items(s:swv_{winnr()})|call setwinvar(winnr(),s:key,s:value)|exe "sil! unlet s:key s:value"|endfor|endif
+ windo if exists("s:swv_{winnr()}") |unlet s:swv_{winnr()} |endif
+ let &ei= eikeep
+" call Dret("s:RestoreWinVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SaveUserSettings: save user options, set to zoomwin-safe options. {{{2
+" Force window minimum height/width to be >= 1
+fun! s:SaveUserSettings()
+" call Dfunc("s:SaveUserSettings()")
+
+ let s:keep_wfh = &wfh
+ let s:keep_hidden = &hidden
+ let s:keep_write = &write
+ let s:keep_so = &so
+ let s:keep_siso = &siso
+ let s:keep_ss = &ss
+
+ if v:version < 603
+ if &wmh == 0 || &wmw == 0
+ let s:keep_wmh = &wmh
+ let s:keep_wmw = &wmw
+ sil! set wmh=1 wmw=1
+ endif
+ endif
+ set hidden write nowfh so=0 siso=0 ss=0
+" call Dret("s:SaveUserSettings")
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreUserSettings: restore user option settings {{{2
+fun! s:RestoreUserSettings()
+" call Dfunc("s:RestoreUserSettings()")
+" call Decho("restore user option settings")
+ let &hidden= s:keep_hidden
+ let &write = s:keep_write
+ let &wfh = s:keep_wfh
+ let &so = s:keep_so
+ let &siso = s:keep_siso
+ let &ss = s:keep_ss
+ if v:version < 603
+ if exists("s:keep_wmw")
+ let &wmh= s:keep_wmh
+ let &wmw= s:keep_wmw
+ endif
+ endif
+" call Dret("s:RestoreUserSettings")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SaveWinSettings: saves all windows' local settings {{{2
+fun! s:SaveWinSettings()
+" call Dfunc("s:SaveWinSettings() curwin#".winnr())
+ let curwin= winnr()
+ for localopt in s:localoptlist
+ windo exe "let s:swv_".localopt."_{winnr()}= &".localopt
+ endfor
+ exe curwin."wincmd w"
+" call Dret("s:SaveWinSettings : &bt=".&bt." s:swv_bt_".curwin."=".s:swv_bt_{curwin})
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreWinSettings: restores all windows' local settings {{{2
+fun! s:RestoreWinSettings()
+" call Dfunc("s:RestoreWinSettings()")
+ let curwin= winnr()
+ for localopt in s:localoptlist
+ exe 'windo if exists("s:swv_'.localopt.'_{winnr()}")|let &'.localopt.'= s:swv_'.localopt.'_{winnr()}|unlet s:swv_'.localopt.'_{winnr()}|endif'
+ endfor
+ exe curwin."wincmd w"
+" call Dret("s:RestoreWinSettings : &bt=".&bt)
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreOneWinSettings: assumes that s:SaveWinSettings() was called previously; this function restores the specified window's local settings {{{2
+fun! s:RestoreOneWinSettings(wnum)
+" call Dfunc("s:RestoreOneWinSettings(wnum=".a:wnum.") s:swv_bt_".a:wnum."=".s:swv_bt_{a:wnum})
+ for localopt in s:localoptlist
+" call Decho('windo if exists("s:swv_'.localopt.'_{a:wnum}")|let &'.localopt.'= s:swv_'.localopt.'_{a:wnum}|unlet s:swv_'.localopt.'_{a:wnum}|endif')
+ exe 'windo if exists("s:swv_'.localopt.'_{a:wnum}")|let &'.localopt.'= s:swv_'.localopt.'_{a:wnum}|unlet s:swv_'.localopt.'_{a:wnum}|endif'
+ endfor
+" call Dret("s:RestoreOneWinSettings : &bt=".&bt)
+endfun
+
" =====================================================================
" Restore: {{{1
let &cpo= s:keepcpo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-zoomwin-23/doc/ZoomWin.txt new/vimplugin-zoomwin-24/doc/ZoomWin.txt
--- old/vimplugin-zoomwin-23/doc/ZoomWin.txt 2009-03-27 14:07:28.000000000 +0100
+++ new/vimplugin-zoomwin-24/doc/ZoomWin.txt 2012-06-27 14:28:42.000000000 +0200
@@ -1,7 +1,7 @@
-*ZoomWin.txt* Zoom into/out-of a window Jan 26, 2009
+*ZoomWin.txt* Zoom into/out-of a window Jun 18, 2012
Authors: Charles E. Campbell, Jr. *zoomwin*
Ron Aaron
-Copyright: (c) 2004-2008 by Charles E. Campbell, Jr. *zoomwin-copyright*
+Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *zoomwin-copyright*
The VIM LICENSE applies to ZoomWin.vim and ZoomWin.txt
(see |copyright|) except use "ZoomWin" instead of "Vim"
No warranty, express or implied. Use At-Your-Own-Risk.
@@ -15,20 +15,70 @@
Either of the two commands or the normal mode <c-w>o will toggle between
* selecting the current window for display as the only window or
- * to restore the original multiple-window view.
+ * restoring the original multiple-window view.
+
==============================================================================
2. Setup *zoomwin-setup*
- Simply put ZoomWin.vim into your .vim/plugin directory (you may need to
- make such a directory first). Under Windows that should be
- vimfiles\plugin. ZoomWin now uses the HelpExtractor method to
- automatically extract help and to make it known to vim by running helptags
- on it.
+ ZoomWin comes as a vimball; to install it, simply >
+
+ vim ZoomWin.vba.gz
+ :so %
+ :q
+<
+ Your .vimrc needs to have, at least: >
+
+ set nocp
+ filetype plugin on
+<
+ (see |'nocp'|, |:filetype|, and |filetype-plugin-on| for an explanation of
+ these commands)
+
+==============================================================================
+3. Options *zoomwin-options*
+
+ *g:ZoomWin_funcref* : this variable is used as a function reference
+ (|Funcref|) or as a |List| of function references.
+ It is called with a single argument: >
+ 0 : multi-window display; not zoomed in
+ 1 : single-window display; zoomed in
+< What this does is permits ZoomWin users to have a
+ function called whenever ZoomWin changes state.
+ As an example, consider having the status line
+ indicate whether one is ZoomWin'd in or not: >
+ set stl=Normal
+ fun! ZWStatline(state)
+ if a:state
+ set stl=ZoomWin
+ else
+ set stl=Normal
+ endif
+ endfun
+ if !exists("g:ZoomWin_funcref")
+ let g:ZoomWin_funcref= function("ZWStatline")
+ endif
+< The function, ZWStatline(), is called by ZoomWin()
+ every time it changes state.
+
+ *g:zoomwin_preserve_taglist* open and close a taglist window on
+ zooms
+
+ *g:zoomwin_preserve_winmanager* open and close winmanager a window on
+ zooms
+
==============================================================================
-3. History *zoomwin-history*
+4. History *zoomwin-history*
+ v24 Jan 29, 2009 : * |g:ZoomWin_funcref| supported
+ May 22, 2009 * supports the saving and restoring of window
+ variables across zooms
+ Oct 11, 2009 * The state wasn't being passed along to
+ g:ZoomWin_funcref as intended. Fixed.
+ Jul 09, 2010 * Put an exists() test into s:RestoreWinVars()
+ Jan 18, 2011 * (reported by talek) bypass winfixheight option
+ Apr 06, 2011 * Saves and restores local options for every window
v23 Apr 24, 2008 : * when |'scrollbind'| was activated: when ZoomWin
attempted to restore multiple-windows, the cursor
position was incorrect. Fixed.
@@ -38,6 +88,8 @@
the search pattern before zooming
* (Ingo Karkat) contributed a patch to detect the
vim 7.2 name for the command line window
+ * too many files (more than the screen rows)
+ caused restoration problems.
v22 Apr 10, 2006 : * "only" was occasionally issuing an "Already one
window" message, which is now prevented
* SavePosn() issued error message when handling an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vimplugin-zoomwin-23/plugin/ZoomWinPlugin.vim new/vimplugin-zoomwin-24/plugin/ZoomWinPlugin.vim
--- old/vimplugin-zoomwin-23/plugin/ZoomWinPlugin.vim 2009-03-27 14:07:28.000000000 +0100
+++ new/vimplugin-zoomwin-24/plugin/ZoomWinPlugin.vim 2012-06-27 14:28:42.000000000 +0200
@@ -1,8 +1,8 @@
" ZoomWin: Brief-like ability to zoom into/out-of a window
" Author: Charles Campbell
" original version by Ron Aaron
-" Date: Jan 16, 2009
-" Version: 23e ASTRO-ONLY
+" Date: Apr 07, 2011
+" Version: 24iNR NOT RELEASED
" History: see :help zoomwin-history {{{1
" GetLatestVimScripts: 508 1 :AutoInstall: ZoomWin.vim
@@ -18,7 +18,7 @@
finish
endif
let s:keepcpo = &cpo
-let g:loaded_ZoomWinPlugin = "v23"
+let g:loaded_ZoomWinPlugin = "v24"
set cpo&vim
"DechoTabOn
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package tiff for openSUSE:Factory checked in at 2012-06-29 10:24:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tiff (Old)
and /work/SRC/openSUSE:Factory/.tiff.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tiff", Maintainer is "PGajdos(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/tiff/tiff.changes 2012-06-25 14:57:10.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.tiff.new/tiff.changes 2012-06-29 10:45:20.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Jun 28 10:16:29 UTC 2012 - meissner(a)suse.com
+
+- RGBA is packed in host order, use the right macros to unpack
+ and verify in raw_decode test.
+
+-------------------------------------------------------------------
New:
----
tiff-bigendian.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tiff.spec ++++++
--- /var/tmp/diff_new_pack.bQulqJ/_old 2012-06-29 10:45:25.000000000 +0200
+++ /var/tmp/diff_new_pack.bQulqJ/_new 2012-06-29 10:45:25.000000000 +0200
@@ -49,6 +49,7 @@
Patch2: tiff-%{version}-seek.patch
Patch3: tiff-%{version}-tiff2pdf-colors.patch
Patch9: tiff-%{version}-dont-fancy-upsampling.patch
+Patch10: tiff-bigendian.patch
# FYI: this issue is solved another way
# http://bugzilla.maptools.org/show_bug.cgi?id=1985#c1
# Patch9: tiff-%{version}-lzw-CVE-2009-2285.patch
@@ -95,6 +96,7 @@
%patch2 -p1
%patch3 -p1
%patch9 -p1
+%patch10 -p1
%build
%configure --disable-static --with-pic
++++++ tiff-bigendian.patch ++++++
--- tiff-4.0.2/test/raw_decode.c.xx 2012-06-28 11:48:43.000000000 +0200
+++ tiff-4.0.2/test/raw_decode.c 2012-06-28 12:15:46.000000000 +0200
@@ -85,9 +85,9 @@
static int check_rgba_pixel( int pixel, int red, int green, int blue, int alpha, unsigned char *buffer ) {
/* RGBA images are upside down - adjust for normal ordering */
int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128;
- unsigned char *rgba = buffer + 4 * adjusted_pixel;
-
- if( rgba[0] == red && rgba[1] == green && rgba[2] == blue && rgba[3] == alpha ) {
+ unsigned int *rgba = (unsigned int*)(buffer + 4 * adjusted_pixel);
+
+ if( TIFFGetR(*rgba) == red && TIFFGetG(*rgba) == green && TIFFGetB(*rgba) == blue && TIFFGetA(*rgba) == alpha ) {
return 0;
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package smb4k for openSUSE:Factory checked in at 2012-06-29 10:24:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/smb4k (Old)
and /work/SRC/openSUSE:Factory/.smb4k.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "smb4k", Maintainer is "kde-maintainers(a)suse.de"
Changes:
--------
--- /work/SRC/openSUSE:Factory/smb4k/smb4k.changes 2012-06-10 23:04:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.smb4k.new/smb4k.changes 2012-06-29 10:44:59.000000000 +0200
@@ -1,0 +2,9 @@
+Mon Jun 25 19:56:12 UTC 2012 - asterios.dramis(a)gmail.com
+
+- Update to version 1.0.3:
+ * Make sure that output from the mount and unmount process is trimmed, so
+ that there are no false error messages.
+ * Fixed error notifications being shown although mounting and unmounting
+ shares was successful.
+
+-------------------------------------------------------------------
Old:
----
smb4k-1.0.2.tar.bz2
New:
----
smb4k-1.0.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ smb4k.spec ++++++
--- /var/tmp/diff_new_pack.rArhQF/_old 2012-06-29 10:45:00.000000000 +0200
+++ /var/tmp/diff_new_pack.rArhQF/_new 2012-06-29 10:45:00.000000000 +0200
@@ -17,7 +17,7 @@
Name: smb4k
-Version: 1.0.2
+Version: 1.0.3
Release: 0
Summary: Advanced Network Neighborhood Browser for KDE
License: GPL-2.0+
++++++ smb4k-1.0.2.tar.bz2 -> smb4k-1.0.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smb4k-1.0.2/CMakeLists.txt new/smb4k-1.0.3/CMakeLists.txt
--- old/smb4k-1.0.2/CMakeLists.txt 2012-05-30 22:01:49.000000000 +0200
+++ new/smb4k-1.0.3/CMakeLists.txt 2012-06-23 15:59:52.000000000 +0200
@@ -1,9 +1,9 @@
project( smb4k )
-set( VERSION 1.0.2 )
+set( VERSION 1.0.3 )
set( VERSION_MAJOR 1 )
set( VERSION_MINOR 0 )
-set( VERSION_PATCH 2 )
+set( VERSION_PATCH 3 )
cmake_minimum_required( VERSION 2.6 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smb4k-1.0.2/ChangeLog new/smb4k-1.0.3/ChangeLog
--- old/smb4k-1.0.2/ChangeLog 2012-05-30 22:01:49.000000000 +0200
+++ new/smb4k-1.0.3/ChangeLog 2012-06-23 15:59:52.000000000 +0200
@@ -1,3 +1,9 @@
+Smb4K 1.0.3 (2012-06-23):
+- Make sure that output from the mount and unmount process is trimmed, so
+ that there are no false error messages.
+- Fixed error notifications being shown although mounting and unmounting
+ shares was successful.
+
Smb4K 1.0.2 (2012-05-30):
- Fixed two potential crashes in class Smb4KHomesSharesHandler.
- Fixed a wrong comparision between QString and QByteArray in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smb4k-1.0.2/core/smb4kmounter_p.cpp new/smb4k-1.0.3/core/smb4kmounter_p.cpp
--- old/smb4k-1.0.2/core/smb4kmounter_p.cpp 2012-05-30 22:01:50.000000000 +0200
+++ new/smb4k-1.0.3/core/smb4kmounter_p.cpp 2012-06-23 15:59:52.000000000 +0200
@@ -729,7 +729,7 @@
// Check if the mount process reported an error
QString stderr( reply.data()["stderr"].toString() );
- if ( QString::compare( share->canonicalPath(), reply.data()["share_mountpoint"].toString() ) == 0 && stderr.isEmpty() )
+ if ( QString::compare( share->canonicalPath(), reply.data()["share_mountpoint"].toString() ) == 0 && !stderr.isEmpty() )
{
#ifndef Q_OS_FREEBSD
if ( stderr.contains( "mount error 13", Qt::CaseSensitive ) || stderr.contains( "mount error(13)" )
@@ -1020,7 +1020,7 @@
// Check if the unmount process reported an error
QString stderr( reply.data()["stderr"].toString() );
- if ( QString::compare( share->canonicalPath(), reply.data()["share_mountpoint"].toString() ) == 0 && stderr.isEmpty() )
+ if ( QString::compare( share->canonicalPath(), reply.data()["share_mountpoint"].toString() ) == 0 && !stderr.isEmpty() )
{
Smb4KNotification *notification = new Smb4KNotification();
notification->unmountingFailed( share, stderr );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smb4k-1.0.2/helpers/smb4kmounthelper.cpp new/smb4k-1.0.3/helpers/smb4kmounthelper.cpp
--- old/smb4k-1.0.2/helpers/smb4kmounthelper.cpp 2012-05-30 22:01:50.000000000 +0200
+++ new/smb4k-1.0.3/helpers/smb4kmounthelper.cpp 2012-06-23 15:59:52.000000000 +0200
@@ -102,11 +102,11 @@
{
// Check if there is output on stderr.
QString stderr = QString::fromUtf8( proc.readAllStandardError() );
- reply.addData( "stderr", stderr );
+ reply.addData( "stderr", stderr.trimmed() );
// Check if there is output on stdout.
QString stdout = QString::fromUtf8( proc.readAllStandardOutput() );
- reply.addData( "stdout", stdout );
+ reply.addData( "stdout", stdout.trimmed() );
}
}
else
@@ -211,11 +211,11 @@
{
// Check if there is output on stderr.
QString stderr = QString::fromUtf8( proc.readAllStandardError() );
- reply.addData( "stderr", stderr );
+ reply.addData( "stderr", stderr.trimmed() );
// Check if there is output on stdout.
QString stdout = QString::fromUtf8( proc.readAllStandardOutput() );
- reply.addData( "stdout", stdout );
+ reply.addData( "stdout", stdout.trimmed() );
}
}
else
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-cryptopp for openSUSE:Factory checked in at 2012-06-29 10:22:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cryptopp (Old)
and /work/SRC/openSUSE:Factory/.python-cryptopp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cryptopp", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cryptopp/python-cryptopp.changes 2011-09-23 12:42:32.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-cryptopp.new/python-cryptopp.changes 2012-06-29 10:44:04.000000000 +0200
@@ -1,0 +2,12 @@
+Fri Dec 9 12:05:58 UTC 2011 - cfarrell(a)suse.com
+
+- license update: GPL-2.0+ or SUSE-TGPPL-1.0+
+ Package has a dual license. Use SPDX format (the SUSE prefix indicates
+ that the license is not yet upstreamed)
+
+-------------------------------------------------------------------
+Thu Dec 8 13:07:23 UTC 2011 - coolo(a)suse.com
+
+- COPYING.GPL says it's GPL-2.0+
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cryptopp.spec ++++++
--- /var/tmp/diff_new_pack.Jg58nk/_old 2012-06-29 10:44:05.000000000 +0200
+++ /var/tmp/diff_new_pack.Jg58nk/_new 2012-06-29 10:44:05.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-cryptopp
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,15 +20,19 @@
Name: python-cryptopp
Version: 0.5.29
-Release: 1
+Release: 0
Summary: Python Wrappers for the Crypto++ Library
-Url: http://allmydata.org/trac/pycryptopp
-License: GPL
+License: GPL-2.0+ or SUSE-TGPPL-1.0+
Group: Development/Libraries/Python
+Url: http://allmydata.org/trac/pycryptopp
Source: %{modname}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{py_requires}
-BuildRequires: gcc-c++ libcryptopp-devel python-devel python-setuptools python-xml
+BuildRequires: gcc-c++
+BuildRequires: libcryptopp-devel
+BuildRequires: python-devel
+BuildRequires: python-setuptools
+BuildRequires: python-xml
Patch0: pycryptopp-0.5.29-disable-w-flag.patch
%description
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package openjpeg for openSUSE:Factory checked in at 2012-06-29 10:21:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openjpeg (Old)
and /work/SRC/openSUSE:Factory/.openjpeg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openjpeg", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/openjpeg/openjpeg.changes 2012-02-29 14:09:26.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.openjpeg.new/openjpeg.changes 2012-06-29 10:42:34.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Jun 28 18:42:41 UTC 2012 - asterios.dramis(a)gmail.com
+
+- Added a patch (heap_corruption_fix.patch) to fix heap corruption when
+ processing certain Gray16 TIFF images - (CVE-2009-5030), (bnc#757260).
+
+-------------------------------------------------------------------
New:
----
heap_corruption_fix.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openjpeg.spec ++++++
--- /var/tmp/diff_new_pack.WMYn4C/_old 2012-06-29 10:42:36.000000000 +0200
+++ /var/tmp/diff_new_pack.WMYn4C/_new 2012-06-29 10:42:36.000000000 +0200
@@ -32,6 +32,8 @@
Patch2: openjpeg-1.5.0-cmake_libdir.patch
# PATCH-FIX-UPSTREAM openjpeg-1.5.0-pkgconfig_includedir.patch asterios.dramis(a)gmail.com -- Fix includedir in pkgconfig file (taken from Fedora)
Patch3: openjpeg-1.5.0-pkgconfig_includedir.patch
+# PATCH-FIX-UPSTREAM heap_corruption_fix.patch CVE-2009-5030 bnc#757260 asterios.dramis(a)gmail.com -- Fix heap corruption when processing certain Gray16 TIFF images (http://code.google.com/p/openjpeg/source/detail?r=1703)
+Patch4: heap_corruption_fix.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: liblcms2-devel
@@ -69,6 +71,7 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
# Remove build time references so build-compare can do its work
sed -i "s/HTML_TIMESTAMP = YES/HTML_TIMESTAMP = NO/g" doc/Doxyfile.dox.cmake.in
++++++ heap_corruption_fix.patch ++++++
--- openjpeg-1.5.0/libopenjpeg/tcd.c 2012-02-07 12:49:55.000000000 +0200
+++ openjpeg-1.5.0/libopenjpeg/tcd.c.r1703 2012-06-28 20:34:17.633818590 +0300
@@ -333,7 +333,7 @@
cblk->y0 = int_max(cblkystart, prc->y0);
cblk->x1 = int_min(cblkxend, prc->x1);
cblk->y1 = int_min(cblkyend, prc->y1);
- cblk->data = (unsigned char*) opj_calloc(8192+2, sizeof(unsigned char));
+ cblk->data = (unsigned char*) opj_calloc(9728+2, sizeof(unsigned char));
/* FIXME: mqc_init_enc and mqc_byteout underrun the buffer if we don't do this. Why? */
cblk->data += 2;
cblk->layers = (opj_tcd_layer_t*) opj_calloc(100, sizeof(opj_tcd_layer_t));
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ocaml for openSUSE:Factory checked in at 2012-06-29 10:21:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml (Old)
and /work/SRC/openSUSE:Factory/.ocaml.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml", Maintainer is "DLovasko(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml/ocaml.changes 2012-05-14 16:17:03.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml.new/ocaml.changes 2012-06-29 10:42:30.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jun 27 10:51:13 UTC 2012 - dvaleev(a)suse.com
+
+- refresh ppc64 patch
+- Link dllthreads.so with -lpthread so that pthread_atfork
+ is included statically.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ocaml.spec ++++++
--- /var/tmp/diff_new_pack.gVAZge/_old 2012-06-29 10:42:31.000000000 +0200
+++ /var/tmp/diff_new_pack.gVAZge/_new 2012-06-29 10:42:31.000000000 +0200
@@ -271,7 +271,7 @@
%patch6
%patch7
%patch8
-%patch9
+%patch9 -p1
%patch10 -p1
find -name ".cvsignore" | xargs -r rm -f
++++++ ocaml-3.09-rpmoptflags.patch ++++++
--- /var/tmp/diff_new_pack.gVAZge/_old 2012-06-29 10:42:31.000000000 +0200
+++ /var/tmp/diff_new_pack.gVAZge/_new 2012-06-29 10:42:31.000000000 +0200
@@ -57,8 +57,12 @@
===================================================================
--- otherlibs/systhreads/Makefile.orig
+++ otherlibs/systhreads/Makefile
-@@ -33,7 +33,7 @@ libthreads.a: $(BYTECODE_C_OBJS)
- $(MKLIB) -o threads $(BYTECODE_C_OBJS)
+@@ -30,10 +30,10 @@
+ allopt: libthreadsnat.a threads.cmxa
+
+ libthreads.a: $(BYTECODE_C_OBJS)
+- $(MKLIB) -o threads $(BYTECODE_C_OBJS)
++ $(MKLIB) -o threads $(BYTECODE_C_OBJS) -lpthread
st_stubs_b.o: st_stubs.c st_posix.h
- $(BYTECC) -O -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \
@@ -66,7 +70,7 @@
-c st_stubs.c
mv st_stubs.o st_stubs_b.o
-@@ -43,7 +43,7 @@ libthreadsnat.a: $(NATIVECODE_C_OBJS)
+@@ -43,7 +43,7 @@
$(AR) rc libthreadsnat.a $(NATIVECODE_C_OBJS)
st_stubs_n.o: st_stubs.c st_posix.h
++++++ ocaml-ppc64.patch ++++++
--- /var/tmp/diff_new_pack.gVAZge/_old 2012-06-29 10:42:31.000000000 +0200
+++ /var/tmp/diff_new_pack.gVAZge/_new 2012-06-29 10:42:31.000000000 +0200
@@ -1,7 +1,48 @@
-diff -uNr asmcomp.orig/power64/arch.ml asmcomp/power64/arch.ml
---- asmcomp.orig/power64/arch.ml 1969-12-31 19:00:00.000000000 -0500
-+++ asmcomp/power64/arch.ml 2008-02-29 08:37:45.000000000 -0500
-@@ -0,0 +1,84 @@
+From b25707437651811a22acaab5a9461eb4ab742f6e Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones(a)redhat.com>
+Date: Tue, 29 May 2012 20:47:07 +0100
+Subject: [PATCH 6/8] Add support for ppc64.
+
+Note (1): This patch was rejected upstream because they don't have
+appropriate hardware for testing.
+
+Note (2): Upstream powerpc directory has some support for ppc64, but
+only for Macs, and I couldn't get it to work at all with IBM hardware.
+
+This patch was collaborated on by several people, most notably
+David Woodhouse.
+
+Includes fix for position of stack arguments to external C functions
+when there are more than 8 parameters (RHBZ#829187).
+
+Includes fix for minor heap corruption because of unaligned minor heap
+register (RHBZ#826649).
+---
+ asmcomp/power64/arch.ml | 83 ++++
+ asmcomp/power64/emit.mlp | 989 +++++++++++++++++++++++++++++++++++++++++
+ asmcomp/power64/proc.ml | 241 ++++++++++
+ asmcomp/power64/reload.ml | 18 +
+ asmcomp/power64/scheduling.ml | 65 +++
+ asmcomp/power64/selection.ml | 103 +++++
+ asmrun/Makefile | 6 +
+ asmrun/power64-elf.S | 486 ++++++++++++++++++++
+ asmrun/stack.h | 9 +
+ configure | 5 +-
+ 10 files changed, 2004 insertions(+), 1 deletion(-)
+ create mode 100644 asmcomp/power64/arch.ml
+ create mode 100644 asmcomp/power64/emit.mlp
+ create mode 100644 asmcomp/power64/proc.ml
+ create mode 100644 asmcomp/power64/reload.ml
+ create mode 100644 asmcomp/power64/scheduling.ml
+ create mode 100644 asmcomp/power64/selection.ml
+ create mode 100644 asmrun/power64-elf.S
+
+diff --git a/asmcomp/power64/arch.ml b/asmcomp/power64/arch.ml
+new file mode 100644
+index 0000000..55dd593
+--- /dev/null
++++ b/asmcomp/power64/arch.ml
+@@ -0,0 +1,83 @@
+(***********************************************************************)
+(* *)
+(* Objective Caml *)
@@ -14,7 +55,7 @@
+(* *)
+(***********************************************************************)
+
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: arch.ml 9547 2010-01-22 12:48:24Z doligez $ *)
+
+(* Specific operations for the PowerPC processor *)
+
@@ -44,7 +85,7 @@
+let big_endian = true
+
+let size_addr = 8
-+let size_int = 8
++let size_int = size_addr
+let size_float = 8
+
+(* Operations on addressing modes *)
@@ -85,10 +126,11 @@
+ printreg arg.(0) printreg arg.(1) printreg arg.(2)
+ | Ialloc_far n ->
+ fprintf ppf "alloc_far %d" n
-+
-diff -uNr asmcomp.orig/power64/emit.mlp asmcomp/power64/emit.mlp
---- asmcomp.orig/power64/emit.mlp 1969-12-31 19:00:00.000000000 -0500
-+++ asmcomp/power64/emit.mlp 2008-02-29 08:37:45.000000000 -0500
+diff --git a/asmcomp/power64/emit.mlp b/asmcomp/power64/emit.mlp
+new file mode 100644
+index 0000000..42f585d
+--- /dev/null
++++ b/asmcomp/power64/emit.mlp
@@ -0,0 +1,989 @@
+(***********************************************************************)
+(* *)
@@ -102,7 +144,7 @@
+(* *)
+(***********************************************************************)
+
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: emit.mlp 9547 2010-01-22 12:48:24Z doligez $ *)
+
+(* Emission of PowerPC assembly code *)
+
@@ -699,7 +741,7 @@
+ ` bge {emit_label lbl}\n`;
+ record_frame i.live;
+ ` bl {emit_label !call_gc_label}\n`; (* Must be 4 insns to restart *)
-+ `{emit_label lbl}: addi {emit_reg i.res.(0)}, {emit_gpr 31}, 4\n`
++ `{emit_label lbl}: addi {emit_reg i.res.(0)}, {emit_gpr 31}, {emit_int size_addr}\n`
+ | Lop(Iintop Isub) -> (* subfc has swapped arguments *)
+ ` subfc {emit_reg i.res.(0)}, {emit_reg i.arg.(1)}, {emit_reg i.arg.(0)}\n`
+ | Lop(Iintop Imod) ->
@@ -1079,10 +1121,12 @@
+ ` .quad {emit_int (List.length !frame_descriptors)}\n`;
+ List.iter emit_frame !frame_descriptors;
+ frame_descriptors := []
-diff -uNr asmcomp.orig/power64/proc.ml asmcomp/power64/proc.ml
---- asmcomp.orig/power64/proc.ml 1969-12-31 19:00:00.000000000 -0500
-+++ asmcomp/power64/proc.ml 2008-02-29 08:37:45.000000000 -0500
-@@ -0,0 +1,245 @@
+diff --git a/asmcomp/power64/proc.ml b/asmcomp/power64/proc.ml
+new file mode 100644
+index 0000000..119ad93
+--- /dev/null
++++ b/asmcomp/power64/proc.ml
+@@ -0,0 +1,241 @@
+(***********************************************************************)
+(* *)
+(* Objective Caml *)
@@ -1095,7 +1139,7 @@
+(* *)
+(***********************************************************************)
+
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: proc.ml 9547 2010-01-22 12:48:24Z doligez $ *)
+
+(* Description of the Power PC *)
+
@@ -1203,7 +1247,7 @@
+ end else begin
+ loc.(i) <- stack_slot (make_stack !ofs) ty;
+ end;
-+ ofs := !ofs + 8
++ ofs := !ofs + size_int
+ | Float ->
+ if !float <= last_float then begin
+ loc.(i) <- phys_reg !float;
@@ -1211,7 +1255,7 @@
+ end else begin
+ loc.(i) <- stack_slot (make_stack !ofs) Float;
+ end;
-+ ofs := !ofs + 8
++ ofs := !ofs + size_float
+ done;
+ (loc, Misc.align !ofs 16)
+ (* Keep stack 16-aligned. *)
@@ -1247,7 +1291,7 @@
+ let loc = Array.create (Array.length arg) Reg.dummy in
+ let int = ref first_int in
+ let float = ref first_float in
-+ let ofs = ref 112 in
++ let ofs = ref (14 * size_addr) in
+ for i = 0 to Array.length arg - 1 do
+ match arg.(i).typ with
+ Int | Addr as ty ->
@@ -1273,7 +1317,7 @@
+let loc_external_arguments =
+ match Config.system with
+ | "rhapsody" -> poweropen_external_conventions 0 7 100 112
-+ | "elf" | "bsd" -> calling_conventions 0 7 100 107 outgoing 8
++ | "elf" | "bsd" -> calling_conventions 0 7 100 107 outgoing 48
+ | _ -> assert false
+
+let extcall_use_push = false
@@ -1319,18 +1363,16 @@
+(* Calling the assembler *)
+
+let assemble_file infile outfile =
-+ let infile = Filename.quote infile
-+ and outfile = Filename.quote outfile in
-+ match Config.system with
-+ | "elf" ->
-+ Ccomp.command ("as -u -m ppc64 -o " ^ outfile ^ " " ^ infile)
-+ | _ -> assert false
++ Ccomp.command (Config.asm ^ " -o " ^
++ Filename.quote outfile ^ " " ^ Filename.quote infile)
+
+open Clflags;;
+open Config;;
-diff -uNr asmcomp.orig/power64/reload.ml asmcomp/power64/reload.ml
---- asmcomp.orig/power64/reload.ml 1969-12-31 19:00:00.000000000 -0500
-+++ asmcomp/power64/reload.ml 2008-02-29 08:37:45.000000000 -0500
+diff --git a/asmcomp/power64/reload.ml b/asmcomp/power64/reload.ml
+new file mode 100644
+index 0000000..abcac6c
+--- /dev/null
++++ b/asmcomp/power64/reload.ml
@@ -0,0 +1,18 @@
+(***********************************************************************)
+(* *)
@@ -1344,16 +1386,18 @@
+(* *)
+(***********************************************************************)
+
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: reload.ml 2553 1999-11-17 18:59:06Z xleroy $ *)
+
+(* Reloading for the PowerPC *)
+
+let fundecl f =
+ (new Reloadgen.reload_generic)#fundecl f
-diff -uNr asmcomp.orig/power64/scheduling.ml asmcomp/power64/scheduling.ml
---- asmcomp.orig/power64/scheduling.ml 1969-12-31 19:00:00.000000000 -0500
-+++ asmcomp/power64/scheduling.ml 2008-02-29 08:37:45.000000000 -0500
-@@ -0,0 +1,66 @@
+diff --git a/asmcomp/power64/scheduling.ml b/asmcomp/power64/scheduling.ml
+new file mode 100644
+index 0000000..b7bba9b
+--- /dev/null
++++ b/asmcomp/power64/scheduling.ml
+@@ -0,0 +1,65 @@
+(***********************************************************************)
+(* *)
+(* Objective Caml *)
@@ -1366,7 +1410,7 @@
+(* *)
+(***********************************************************************)
+
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: scheduling.ml 9547 2010-01-22 12:48:24Z doligez $ *)
+
+(* Instruction scheduling for the Power PC *)
+
@@ -1419,10 +1463,11 @@
+end
+
+let fundecl f = (new scheduler)#schedule_fundecl f
-+
-diff -uNr asmcomp.orig/power64/selection.ml asmcomp/power64/selection.ml
---- asmcomp.orig/power64/selection.ml 1969-12-31 19:00:00.000000000 -0500
-+++ asmcomp/power64/selection.ml 2008-02-29 08:37:45.000000000 -0500
+diff --git a/asmcomp/power64/selection.ml b/asmcomp/power64/selection.ml
+new file mode 100644
+index 0000000..7b8e2a4
+--- /dev/null
++++ b/asmcomp/power64/selection.ml
@@ -0,0 +1,103 @@
+(***********************************************************************)
+(* *)
@@ -1436,7 +1481,7 @@
+(* *)
+(***********************************************************************)
+
-+(* $Id: ocaml-3.11.0-ppc64.patch,v 1.1 2008/11/20 15:30:55 rjones Exp $ *)
++(* $Id: selection.ml 10296 2010-04-22 12:51:06Z xleroy $ *)
+
+(* Instruction selection for the Power PC processor *)
+
@@ -1489,7 +1534,7 @@
+ then (Iindexed2, Ctuple[e1; e2])
+ else (Iindexed d, Cop(Cadda, [e1; e2]))
+
-+method select_operation op args =
++method! select_operation op args =
+ match (op, args) with
+ (* Prevent the recognition of (x / cst) and (x % cst) when cst is not
+ a power of 2, which do not correspond to an instruction. *)
@@ -1527,9 +1572,28 @@
+end
+
+let fundecl f = (new selector)#emit_fundecl f
-diff -uNr asmrun.orig/power64-elf.S asmrun/power64-elf.S
---- asmrun.orig/power64-elf.S 1969-12-31 19:00:00.000000000 -0500
-+++ asmrun/power64-elf.S 2008-02-29 08:37:45.000000000 -0500
+diff --git a/asmrun/Makefile b/asmrun/Makefile
+index efffa33..3525b82 100644
+--- a/asmrun/Makefile
++++ b/asmrun/Makefile
+@@ -74,6 +74,12 @@ power.o: power-$(SYSTEM).o
+ power.p.o: power-$(SYSTEM).o
+ cp power-$(SYSTEM).o power.p.o
+
++power64.o: power64-$(SYSTEM).o
++ cp power64-$(SYSTEM).o power64.o
++
++power64.p.o: power64-$(SYSTEM).o
++ cp power64-$(SYSTEM).o power64.p.o
++
+ main.c: ../byterun/main.c
+ ln -s ../byterun/main.c main.c
+ misc.c: ../byterun/misc.c
+diff --git a/asmrun/power64-elf.S b/asmrun/power64-elf.S
+new file mode 100644
+index 0000000..b2c24d6
+--- /dev/null
++++ b/asmrun/power64-elf.S
@@ -0,0 +1,486 @@
+/*********************************************************************/
+/* */
@@ -2017,8 +2081,10 @@
+ .short 0 /* no roots here */
+ .align 3
+
---- asmrun/stack.h.orig 2011-11-08 12:13:47.000000000 +0100
-+++ asmrun/stack.h 2011-11-08 12:14:32.000000000 +0100
+diff --git a/asmrun/stack.h b/asmrun/stack.h
+index c778873..f1d2e6a 100644
+--- a/asmrun/stack.h
++++ b/asmrun/stack.h
@@ -65,6 +65,15 @@
#define Callback_link(sp) ((struct caml_context *)((sp) + Trap_frame_size))
#endif
@@ -2035,9 +2101,11 @@
#ifdef TARGET_m68k
#define Saved_return_address(sp) *((intnat *)((sp) - 4))
#define Callback_link(sp) ((struct caml_context *)((sp) + 8))
---- configure.orig 2011-11-08 12:15:11.000000000 +0100
-+++ configure 2011-11-08 12:16:17.000000000 +0100
-@@ -685,6 +685,7 @@
+diff --git a/configure b/configure
+index d0a6b0f..6ed0a9c 100755
+--- a/configure
++++ b/configure
+@@ -685,6 +685,7 @@ case "$host" in
hppa2.0*-*-hpux*) arch=hppa; system=hpux;;
hppa*-*-linux*) arch=hppa; system=linux;;
hppa*-*-gnu*) arch=hppa; system=gnu;;
@@ -2045,7 +2113,7 @@
powerpc*-*-linux*) arch=power; model=ppc; system=elf;;
powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
-@@ -709,7 +710,7 @@
+@@ -709,7 +710,7 @@ esac
if $arch64; then
case "$arch,$model" in
@@ -2054,7 +2122,7 @@
arch=none; model=default; system=unknown;;
esac
fi
-@@ -772,6 +773,8 @@
+@@ -772,6 +773,8 @@ case "$arch,$model,$system" in
aspp='as -n32 -O2';;
power,*,elf) as='as -u -m ppc'
aspp='gcc -c';;
@@ -2063,18 +2131,5 @@
power,*,bsd) as='as'
aspp='gcc -c';;
power,*,rhapsody) as="as -arch $model"
---- asmrun/Makefile.orig 2011-11-08 12:12:19.000000000 +0100
-+++ asmrun/Makefile 2011-11-08 12:23:45.000000000 +0100
-@@ -74,6 +74,12 @@
- power.p.o: power-$(SYSTEM).o
- cp power-$(SYSTEM).o power.p.o
-
-+power64.o: power64-$(SYSTEM).o
-+ cp power64-$(SYSTEM).o power64.o
-+
-+power64.p.o: power64-$(SYSTEM).o
-+ cp power64-$(SYSTEM).o power64.p.o
-+
- main.c: ../byterun/main.c
- ln -s ../byterun/main.c main.c
- misc.c: ../byterun/misc.c
+--
+1.7.10.1
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package js for openSUSE:Factory checked in at 2012-06-29 10:20:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/js (Old)
and /work/SRC/openSUSE:Factory/.js.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "js", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/js/js.changes 2011-11-14 11:54:59.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.js.new/js.changes 2012-06-29 10:40:46.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Jun 28 06:52:40 UTC 2012 - adrian(a)suse.de
+
+- do not enforce wrong build flags on arm (fixes build)
+
+-------------------------------------------------------------------
New:
----
do-not-enforce-wrong-arm-flags.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ js.spec ++++++
--- /var/tmp/diff_new_pack.tOpPYB/_old 2012-06-29 10:40:47.000000000 +0200
+++ /var/tmp/diff_new_pack.tOpPYB/_new 2012-06-29 10:40:47.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package js
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,19 +16,24 @@
#
-
Name: js
Summary: JavaScript interpreter
-Version: 1.8.5
-Release: 3
License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
Group: Development/Languages/Other
+Version: 1.8.5
+Release: 0
Url: http://www.mozilla.org/js/
Source0: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.bz2
Patch0: js-64bitbigendian.patch
Patch1: js-filter.patch
+Patch2: do-not-enforce-wrong-arm-flags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: autoconf213 gcc-c++ mozilla-nspr-devel pkg-config python zip
+BuildRequires: autoconf213
+BuildRequires: gcc-c++
+BuildRequires: mozilla-nspr-devel
+BuildRequires: pkg-config
+BuildRequires: python
+BuildRequires: zip
%description
JavaScript is the Netscape-developed object scripting language used in millions
@@ -38,7 +43,6 @@
%package -n libmozjs185-1_0
Summary: JavaScript library
-License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
Group: System/Libraries
%description -n libmozjs185-1_0
@@ -50,7 +54,6 @@
%package devel
Summary: Header files, libraries and development documentation for %{name}
-License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
Group: Development/Libraries/Other
Requires: libmozjs185-1_0 = %{version}-%{release}
Requires: pkg-config
@@ -65,6 +68,7 @@
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1
+%patch2
%build
# no need to add build time to binaries
++++++ do-not-enforce-wrong-arm-flags.patch ++++++
--- js/src/configure.in.orig 2012-06-28 08:47:35.002113771 +0200
+++ js/src/configure.in 2012-06-28 08:49:33.384116471 +0200
@@ -3546,23 +3546,6 @@
fi
AC_SUBST(HAVE_ARM_SIMD)
-AC_MSG_CHECKING(for ARM NEON support in compiler)
-_SAVE_CFLAGS="$CFLAGS"
-if test "$GNU_CC"; then
- # gcc needs -mfpu=neon to recognize NEON instructions
- CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
-fi
-AC_TRY_COMPILE([],
- [asm("vadd.i8 d0, d0, d0");],
- result="yes", result="no")
-AC_MSG_RESULT("$result")
-if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_NEON)
- HAVE_ARM_NEON=1
-fi
-CFLAGS="$_SAVE_CFLAGS"
-AC_SUBST(HAVE_ARM_NEON)
-
dnl ========================================================
dnl = pthread support
dnl = Start by checking whether the system support pthreads
@@ -4660,74 +4643,6 @@
MOZ_ARM_ARCH=armv7
;;
esac
-dnl ========================================================
-dnl = Enable building the Thumb2 instruction set
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(thumb2,
- [ --enable-thumb2 Enable Thumb2 instruction set (implies ARMv7)],
- MOZ_THUMB2=1,
- MOZ_THUMB2=)
-if test -n "$MOZ_THUMB2"; then
- MOZ_ARM_ARCH=armv7
-fi
-
-dnl ========================================================
-dnl = Enable building for ARM specific CPU features
-dnl ========================================================
-MOZ_ARG_WITH_STRING(cpu-arch,
-[ --with-cpu-arch=arch Use specific arm architecture CPU features, default armv7],
- MOZ_ARM_ARCH=$withval)
-
-if test -n "$MOZ_THUMB2"; then
- case "$target_cpu" in
- arm*)
- if test "$MOZ_ARM_ARCH" != "armv7"; then
- AC_MSG_ERROR([--enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH])
- fi
- if test "$GNU_CC"; then
- AC_DEFINE(MOZ_THUMB2)
- AC_DEFINE(MOZ_ARM_ARCH)
- CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- else
- AC_MSG_ERROR([--enable-thumb2 is not supported for non-GNU toolchains])
- fi
- ;;
- *)
- AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
- ;;
- esac
-elif test "$MOZ_ARM_ARCH" = "armv7"; then
- case "$target_cpu" in
- arm*)
- if test "$GNU_CC"; then
- AC_DEFINE(MOZ_ARM_ARCH)
- CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- else
- AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-GNU toolchains])
- fi
- ;;
- *)
- AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-ARM CPU architectures])
- ;;
- esac
-else
- case "$target_cpu" in
- arm*)
- if test "$GNU_CC"; then
- CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
- CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
- ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
- fi
- ;;
- esac
-fi
-
-AC_SUBST(MOZ_THUMB2)
-AC_SUBST(MOZ_ARM_ARCH)
dnl ========================================================
dnl =
--- js/src/configure.orig 2012-06-28 08:47:28.419113621 +0200
+++ js/src/configure 2012-06-28 08:48:53.490115563 +0200
@@ -10633,42 +10633,6 @@
fi
-echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6
-echo "configure:10638: checking for ARM NEON support in compiler" >&5
-_SAVE_CFLAGS="$CFLAGS"
-if test "$GNU_CC"; then
- # gcc needs -mfpu=neon to recognize NEON instructions
- CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
-fi
-cat > conftest.$ac_ext <<EOF
-#line 10645 "configure"
-#include "confdefs.h"
-
-int main() {
-asm("vadd.i8 d0, d0, d0");
-; return 0; }
-EOF
-if { (eval echo configure:10652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- result="yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- result="no"
-fi
-rm -f conftest*
-echo "$ac_t"""$result"" 1>&6
-if test "$result" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ARM_NEON 1
-EOF
-
- HAVE_ARM_NEON=1
-fi
-CFLAGS="$_SAVE_CFLAGS"
-
-
case "$target_os" in
darwin*)
USE_PTHREADS=1
@@ -13292,66 +13256,6 @@
fi
-if test -n "$MOZ_THUMB2"; then
- case "$target_cpu" in
- arm*)
- if test "$MOZ_ARM_ARCH" != "armv7"; then
- { echo "configure: error: --enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH" 1>&2; exit 1; }
- fi
- if test "$GNU_CC"; then
- cat >> confdefs.h <<\EOF
-#define MOZ_THUMB2 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define MOZ_ARM_ARCH 1
-EOF
-
- CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- else
- { echo "configure: error: --enable-thumb2 is not supported for non-GNU toolchains" 1>&2; exit 1; }
- fi
- ;;
- *)
- { echo "configure: error: --enable-thumb2 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
- ;;
- esac
-elif test "$MOZ_ARM_ARCH" = "armv7"; then
- case "$target_cpu" in
- arm*)
- if test "$GNU_CC"; then
- cat >> confdefs.h <<\EOF
-#define MOZ_ARM_ARCH 1
-EOF
-
- CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
- else
- { echo "configure: error: --with-cpu-arch=armv7 is not supported for non-GNU toolchains" 1>&2; exit 1; }
- fi
- ;;
- *)
- { echo "configure: error: --with-cpu-arch=armv7 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
- ;;
- esac
-else
- case "$target_cpu" in
- arm*)
- if test "$GNU_CC"; then
- CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
- CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
- ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
- fi
- ;;
- esac
-fi
-
-
-
-
# Debugging and Optimizations
if test -z "$MOZ_DEBUG_FLAGS"; then
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package gsl for openSUSE:Factory checked in at 2012-06-29 10:20:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gsl (Old)
and /work/SRC/openSUSE:Factory/.gsl.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gsl", Maintainer is "pth(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gsl/gsl.changes 2012-03-29 11:40:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gsl.new/gsl.changes 2012-06-29 10:40:03.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Jun 29 07:10:33 UTC 2012 - coolo(a)suse.com
+
+- the buildrequire for specific gcc libraries seems unneeded (and broke)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gsl.spec ++++++
--- /var/tmp/diff_new_pack.pGrlZZ/_old 2012-06-29 10:40:06.000000000 +0200
+++ /var/tmp/diff_new_pack.pGrlZZ/_new 2012-06-29 10:40:06.000000000 +0200
@@ -22,7 +22,6 @@
%if 0%{?suse_version}
BuildRequires: libtool
%endif
-BuildRequires: libquadmath46
BuildRequires: pkgconfig
%if 0%{?fedora_version}
Requires: info
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package glibc for openSUSE:Factory checked in at 2012-06-29 10:19:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/glibc (Old)
and /work/SRC/openSUSE:Factory/.glibc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "glibc", Maintainer is "matz(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/glibc/glibc.changes 2012-06-28 17:24:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.glibc.new/glibc.changes 2012-06-29 10:39:42.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Jun 28 18:46:30 UTC 2012 - aj(a)suse.de
+
+- Remove not anymore existing nscd.socket.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ glibc.spec ++++++
--- /var/tmp/diff_new_pack.NXOmAp/_old 2012-06-29 10:39:46.000000000 +0200
+++ /var/tmp/diff_new_pack.NXOmAp/_new 2012-06-29 10:39:46.000000000 +0200
@@ -1079,11 +1079,18 @@
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
%preun -n nscd
+
%stop_on_removal nscd
%post -n nscd
%{insserv_force_if_yast nscd}
mkdir -p /var/run/nscd
+# Previously we had nscd.socket, remove it
+test -x /usr/bin/systemctl && /usr/bin/systemctl stop nscd.socket || :
+test -x /usr/bin/systemctl && /usr/bin/systemctl disable nscd.socket || :
+# Hard removal in case the above did not work
+rm -f /etc/systemd/system/sockets.target.wants/nscd.socket
+exit 0
%postun -n nscd
%restart_on_update nscd
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package chromium for openSUSE:Factory checked in at 2012-06-29 10:32:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/chromium (Old)
and /work/SRC/openSUSE:Factory/.chromium.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromium", Maintainer is "PRusnak(a)suse.com"
Changes:
--------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ chromium.spec ++++++
--- /var/tmp/diff_new_pack.RBf5FP/_old 2012-06-29 10:38:53.000000000 +0200
+++ /var/tmp/diff_new_pack.RBf5FP/_new 2012-06-29 10:38:53.000000000 +0200
@@ -188,7 +188,7 @@
Supplements: packageand(chromium:kdebase4-session)
Conflicts: chromium-desktop-gnome
Provides: Chromium-password = %{version}
-Requires: chromium = %{version}
+Requires(post): chromium = %{version}
%description desktop-kde
By using the openSUSE update-alternatives the password store for Chromium is changed to utilize
@@ -203,7 +203,7 @@
Supplements: packageand(chromium:gnome-session)
Conflicts: chromium-desktop-kde
Provides: Chromium-password = %{version}
-Requires: chromium = %{version}
+Requires(post): chromium = %{version}
Requires: libgnome
%description desktop-gnome
@@ -429,23 +429,33 @@
%postun
%icon_theme_cache_postun
%desktop_database_postun
+if [ $1 -eq 0 ]; then
update-alternatives --remove-all chromium
+fi
%post desktop-kde
+if [ ! -e /.buildenv ]; then
update-alternatives --install %{_bindir}/chromium chromium %{_libdir}/chromium/chromium-kde 15
update-alternatives --auto chromium
+fi
%postun desktop-kde
-update-alternatives --remove %{_bindir}/chromium %{_libdir}/chromium/chromium-kde
+if [ $1 -eq 0 -a ! -e /.buildenv ]; then
+update-alternatives --remove chromium %{_libdir}/chromium/chromium-kde
update-alternatives --auto chromium
+fi
%post desktop-gnome
+if [ ! -e /.buildenv ]; then
update-alternatives --install %{_bindir}/chromium chromium %{_libdir}/chromium/chromium-gnome 15
update-alternatives --auto chromium
+fi
%postun desktop-gnome
-update-alternatives --remove %{_bindir}/chromium %{_libdir}/chromium/chromium-gnome
+if [ $1 -eq 0 -a ! -e /.buildenv ]; then
+update-alternatives --remove chromium %{_libdir}/chromium/chromium-gnome
update-alternatives --auto chromium
+fi
# Files!
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0