From 152de4f41c6a5d5b9f1a2f2055cc7ff44ef4607662bc4043ba1b53a22e9badea Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 23 Apr 2021 08:12:06 +0000 Subject: [PATCH] Accepting request 887965 from home:jirislaby:branches:editors - Update several plugins * bufexplorer to 7.4.21 * calendar to 2.5 - add file-line-Fix-other-plugins-loading.patch OBS-URL: https://build.opensuse.org/request/show/887965 OBS-URL: https://build.opensuse.org/package/show/editors/vim-plugins?expand=0&rev=60 --- bufexplorer-7.4.21.tar.gz | 3 + calendar.vim--Matsumoto-2.5.tar.gz | 3 + file-line-Fix-other-plugins-loading.patch | 86 +++++++++++++++++++++++ vim-plugins.changes | 8 +++ vim-plugins.spec | 37 ++++++---- vimplugin-bufexplorer-7.2.8.tar.bz2 | 3 - vimplugin-calendar-2.4.tar.bz2 | 3 - 7 files changed, 125 insertions(+), 18 deletions(-) create mode 100644 bufexplorer-7.4.21.tar.gz create mode 100644 calendar.vim--Matsumoto-2.5.tar.gz create mode 100644 file-line-Fix-other-plugins-loading.patch delete mode 100644 vimplugin-bufexplorer-7.2.8.tar.bz2 delete mode 100644 vimplugin-calendar-2.4.tar.bz2 diff --git a/bufexplorer-7.4.21.tar.gz b/bufexplorer-7.4.21.tar.gz new file mode 100644 index 0000000..1aa9563 --- /dev/null +++ b/bufexplorer-7.4.21.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58cb89e9ac8c3a65e7ef01782b99ea15ef63171d40977645a3970c230b183678 +size 26135 diff --git a/calendar.vim--Matsumoto-2.5.tar.gz b/calendar.vim--Matsumoto-2.5.tar.gz new file mode 100644 index 0000000..b940ddb --- /dev/null +++ b/calendar.vim--Matsumoto-2.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e41447efc3493161a34488bcb273f7cb1576b95be27d2453bc765e11ceac6e3 +size 10423 diff --git a/file-line-Fix-other-plugins-loading.patch b/file-line-Fix-other-plugins-loading.patch new file mode 100644 index 0000000..15d8333 --- /dev/null +++ b/file-line-Fix-other-plugins-loading.patch @@ -0,0 +1,86 @@ +From: Sam Protsenko +Date: Wed, 12 Jun 2019 17:12:56 +0300 +Subject: Fix other plugins loading +Git-repo: https://github.com/joe-skb7/file-line +Git-commit: f1bf6c52f1948ebe639af9189ac240854cb84076 +Patch-mainline: https://github.com/bogado/file-line/pull/77 pending +References: https://github.com/bogado/file-line/issues/62 + +It was noticed that file_line plugin breaks the loading of +other plugins. For example, when having next line in ~/.vimrc: + + au BufNewFile main.c silent! 0r ~/.vim/skeleton/template.c + +this line loads the content from template file when I'm creating new +main.c file. But when file-line plugin is installed this functionality +doesn't work (newly created main.c is blank). This patch fixes that. + +Also, it was reported that file_line breaks vim-go plugin. I haven't +check if this patch fixes it though. + +Fixes: #62 + +Signed-off-by: Sam Protsenko +Signed-off-by: Jiri Slaby +--- + plugin/file_line.vim | 25 +++++++++++++++++++++---- + 1 file changed, 21 insertions(+), 4 deletions(-) + +diff --git a/plugin/file_line.vim b/plugin/file_line.vim +index 7244014c47e4..afa8012ece40 100644 +--- a/plugin/file_line.vim ++++ b/plugin/file_line.vim +@@ -35,7 +35,10 @@ function! s:reopenAndGotoLine(file_name, line_num, col_num) + exec "filetype detect" + endfunction + +-function! s:gotoline() ++" Returns actual file name (without :* part) ++" If is_goto parameter is 1, then file will be re-opened at the line parsed from ++" :* part ++function! s:get_file_name_and_goto(is_goto) + let file = bufname("%") + + " :e command calls BufRead even though the file is a new one. +@@ -53,14 +56,27 @@ function! s:gotoline() + if ! empty(l:names) + let file_name = l:names[1] + let line_num = l:names[2] == ''? '0' : l:names[2] +- let col_num = l:names[3] == ''? '0' : l:names[3] +- call s:reopenAndGotoLine(file_name, line_num, col_num) ++ let col_num = l:names[3] == ''? '0' : l:names[3] ++ if (a:is_goto == 1) ++ call s:reopenAndGotoLine(file_name, line_num, ++ \ col_num) ++ endif + return file_name + endif + endfor + return file + endfunction + ++" Get the actual file name ++function! s:file_name() ++ return s:get_file_name_and_goto(0) ++endfunction ++ ++" Open file at the line after :* part ++function! s:gotoline() ++ return s:get_file_name_and_goto(1) ++endfunction ++ + " Handle entry in the argument list. + " This is called via `:argdo` when entering Vim. + function! s:handle_arg() +@@ -87,6 +103,7 @@ function! s:startup() + endif + endfunction + +-if !isdirectory(expand("%:p")) ++" Only use file_line upon files (not directory), and only if file already exists ++if (!isdirectory(expand("%:p")) && filereadable(expand(s:file_name()))) + autocmd VimEnter * call s:startup() + endif +-- +2.31.1 + diff --git a/vim-plugins.changes b/vim-plugins.changes index 8da5185..adfbc8a 100644 --- a/vim-plugins.changes +++ b/vim-plugins.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Apr 23 06:56:31 UTC 2021 - Jiri Slaby + +- Update several plugins + * bufexplorer to 7.4.21 + * calendar to 2.5 +- add file-line-Fix-other-plugins-loading.patch + ------------------------------------------------------------------- Tue Apr 13 05:40:02 UTC 2021 - Jiri Slaby diff --git a/vim-plugins.spec b/vim-plugins.spec index c964284..05df3c8 100644 --- a/vim-plugins.spec +++ b/vim-plugins.spec @@ -19,8 +19,8 @@ %define ack_version 1.0.9 %define align_version 36.42 %define a_version 2.18 -%define bufexplorer_version 7.2.8 -%define calendar_version 2.4 +%define bufexplorer_version 7.4.21 +%define calendar_version 2.5 %define colorsel_version 20110107 %define colorschemes_version 1.0 %define diffchanges_version 0.6.346dae2 @@ -63,8 +63,8 @@ Group: Productivity/Text/Editors URL: http://www.vim.org/ Source0: vimplugin-align-%{align_version}.tar.bz2 Source1: vimplugin-a-%{a_version}.tar.bz2 -Source2: vimplugin-bufexplorer-%{bufexplorer_version}.tar.bz2 -Source3: vimplugin-calendar-%{calendar_version}.tar.bz2 +Source2: https://github.com/jlanzarotta/bufexplorer/releases/download/v%{bufexplorer_version}.tar.gz#/bufexplorer-%{bufexplorer_version}.tar.gz +Source3: https://github.com/vim-scripts/calendar.vim--Matsumoto/archive/refs/tags/%{calendar_version}.tar.gz#/calendar.vim--Matsumoto-%{calendar_version}.tar.gz Source4: vimplugin-colorsel-%{colorsel_version}.tar.bz2 Source5: vimplugin-colorschemes-%{colorschemes_version}.tar.bz2 Source6: vimplugin-diffchanges-%{diffchanges_version}.tar.bz2 @@ -103,6 +103,7 @@ Source101: vim-latex-%{latex_version}.tar.xz Source1000: https://raw.githubusercontent.com/openSUSE/pack-tools/master/contrib/vim/spec.snippets Patch1: locateopen-1.3-locate-support.patch Patch2: showmarks-signs.patch +Patch3: file-line-Fix-other-plugins-loading.patch BuildRequires: vim BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -157,17 +158,24 @@ different. Version: %bufexplorer_version Release: 0 Summary: Buffer Explorer / Browser -License: ISC +License: BSD-3-Clause Group: Productivity/Text/Editors Requires: vim %description -n vim-plugin-bufexplorer -With bufexplorer, you can quickly switch between buffers by using '\be' to open -the explorer.vim. Then by using the normal movement keys or mouse to select the -needed buffer and then finally pressing or to open -the buffer in the current window or or 't' to open that buffer in -a new tab. If the buffer is in another tab already, bufexplorer can switch to -that tab if you would like. +With bufexplorer, you can quickly and easily switch between buffers by using +the one of the default public interfaces: +\be normal open +\bt toggle open / close +\bs force horizontal split open +\bv force vertical split open + +Once the bufexplorer window is open you can use the normal movement keys (hjkl) +to move around and then use or to select the buffer you would like to open. If +you would like to have the selected buffer opened in a new tab, simply press +either or 't'. Please note that when opening a buffer in a tab, that if the +buffer is already in another tab, bufexplorer can switch to that tab +automatically for you if you would like. %package -n vim-plugin-calendar Version: %calendar_version @@ -630,12 +638,15 @@ popd pushd vimplugin-showmarks-%showmarks_version %patch2 -p1 popd +pushd file-line-%file_line_version +%patch3 -p1 +popd %build %install mkdir -p %buildroot/%vimplugin_dir -for i in vimplugin-* file-line-*; do +for i in vimplugin-* calendar.vim--Matsumoto-* bufexplorer-* file-line-*; do pushd $i cp -av * %buildroot/%vimplugin_dir/ popd @@ -677,6 +688,7 @@ popd cp %{SOURCE1000} %{buildroot}/%vimplugin_dir/snippets/ # delete unneeded files +rm -rf %{buildroot}/%vimplugin_dir/LICENSE rm -rf %{buildroot}/%vimplugin_dir/README* rm -rf %{buildroot}/%vimplugin_dir/doc/Makefile* rm -rf %{buildroot}/%vimplugin_dir/doc/README* @@ -973,6 +985,7 @@ fi %files -n vim-plugin-bufexplorer %defattr(-,root,root,0755) +%license bufexplorer-%{bufexplorer_version}/LICENSE %vimplugin_dir/doc/bufexplorer.txt %vimplugin_dir/plugin/bufexplorer.vim diff --git a/vimplugin-bufexplorer-7.2.8.tar.bz2 b/vimplugin-bufexplorer-7.2.8.tar.bz2 deleted file mode 100644 index e1d781e..0000000 --- a/vimplugin-bufexplorer-7.2.8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3faf0d9215da31c59b0259c942238b7ee1bdcb6383255a0c6ce3ba4d9eb3081 -size 16861 diff --git a/vimplugin-calendar-2.4.tar.bz2 b/vimplugin-calendar-2.4.tar.bz2 deleted file mode 100644 index 9b9f590..0000000 --- a/vimplugin-calendar-2.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28b349dfc27303132fab141023d11fb6e130227fd9ba927e688ed573d7fdebc7 -size 9805