From e6ef350dfb68968b31f10a1d97f01566f3794ca21bf139eb832eccb124ebf6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 2 Mar 2021 19:20:36 +0000 Subject: [PATCH] Accepting request 876221 from home:lnussel:branches:editors - install suse vimrc in /usr (boo#1182324, vim-8.0.1568-globalvimrc.patch). Add back some settings from defaults.vim that were in suse.vimrc before - prevent double loading of spec.vim OBS-URL: https://build.opensuse.org/request/show/876221 OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=652 --- spec.vim | 5 +++++ suse.vimrc | 33 +++++++++++++++++++++++++++++++-- vim-8.0.1568-defaults.patch | 7 ------- vim-8.2.2411-globalvimrc.patch | 16 ++++++++++++++++ vim.changes | 7 +++++++ vim.spec | 2 ++ 6 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 vim-8.2.2411-globalvimrc.patch diff --git a/spec.vim b/spec.vim index abb1e82..eff5b04 100644 --- a/spec.vim +++ b/spec.vim @@ -1,3 +1,8 @@ +if exists("loaded_spec") || &cp + finish +endif +let loaded_spec = 1 + function! SKEL_spec() 0r /usr/share/vim/current/skeletons/skeleton.spec language time en_US diff --git a/suse.vimrc b/suse.vimrc index 274b1e0..e37a22a 100644 --- a/suse.vimrc +++ b/suse.vimrc @@ -1,19 +1,48 @@ -" /etc/vimrc (configuration file for vim only) +" /usr/etc/vimrc (configuration file for vim only) " author: Klaus Franken " author: Werner Fink " author: Florian La Roche -" version: 2017/04/28 +" version: 2021/02/22 " commented lines start with `"' +" enable syntax highlighting +if &t_Co > 2 || has("gui_running") + syntax on +endif + +" automatically indent lines (default) +" set noautoindent + +" select case-insenitiv search (not default) +" set ignorecase + +" show cursor line and column in the status line +set ruler + " show matching brackets set showmatch " display mode INSERT/REPLACE/... set showmode +" changes special characters in search patterns (default) +" set magic + " Required to be able to use keypad keys and map missed escape sequences set esckeys +" get easier to use and more user friendly vim defaults +" CAUTION: This option breaks some vi compatibility. +" Switch it off if you prefer real vi compatibility +set nocompatible + +" allow backspacing over everything in insert mode +set backspace=indent,eol,start + +" Complete longest common string, then each full match +" enable this for bash compatible behaviour +" set wildmode=longest,full + " Try to get the correct main terminal type if &term =~ "xterm" let myterm = "xterm" diff --git a/vim-8.0.1568-defaults.patch b/vim-8.0.1568-defaults.patch index c9e2118..bf2f8ec 100644 --- a/vim-8.0.1568-defaults.patch +++ b/vim-8.0.1568-defaults.patch @@ -25,10 +25,3 @@ Index: vim-8.2.2411/runtime/defaults.vim " Only do this part when Vim was compiled with the +eval feature. if 1 -@@ -139,3 +141,6 @@ if has('langmap') && exists('+langremap' - " compatible). - set nolangremap - endif -+ -+" include SUSE tweaks -+ru suse.vimrc diff --git a/vim-8.2.2411-globalvimrc.patch b/vim-8.2.2411-globalvimrc.patch new file mode 100644 index 0000000..7e08ad4 --- /dev/null +++ b/vim-8.2.2411-globalvimrc.patch @@ -0,0 +1,16 @@ +Index: vim-8.2.2411/src/main.c +=================================================================== +--- vim-8.2.2411.orig/src/main.c ++++ vim-8.2.2411/src/main.c +@@ -3130,7 +3130,10 @@ source_startup_scripts(mparm_T *parmp) + * Get system wide defaults, if the file name is defined. + */ + #ifdef SYS_VIMRC_FILE +- (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE, NULL); ++ if (do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE, NULL) == FAIL) ++ { ++ (void)do_source((char_u *)"$VIMRUNTIME/suse.vimrc", FALSE, DOSO_NONE, NULL); ++ } + #endif + #ifdef MACOS_X + (void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, diff --git a/vim.changes b/vim.changes index b39d971..de5bf2a 100644 --- a/vim.changes +++ b/vim.changes @@ -9,6 +9,13 @@ Mon Mar 1 13:45:17 UTC 2021 - Matthias Gerstner * Maintain leading zeroes in version arguments, otherwise things like `vim-changelog.sh 0007 0010` fail to work. +------------------------------------------------------------------- +Fri Feb 19 11:03:00 UTC 2021 - Ludwig Nussel + +- install suse vimrc in /usr (boo#1182324, vim-8.0.1568-globalvimrc.patch). + Add back some settings from defaults.vim that were in suse.vimrc before +- prevent double loading of spec.vim + ------------------------------------------------------------------- Thu Feb 18 16:44:25 UTC 2021 - Ludwig Nussel diff --git a/vim.spec b/vim.spec index 4e8fdce..a11fbb5 100644 --- a/vim.spec +++ b/vim.spec @@ -71,6 +71,7 @@ Patch101: vim-8.0.1568-defaults.patch # https://github.com/vim/vim/issues/3348 - problem more probadly in buildenv than in test Patch102: vim-8.1.0297-dump3.patch Patch103: no-common.patch +Patch104: vim-8.2.2411-globalvimrc.patch BuildRequires: autoconf BuildRequires: db-devel BuildRequires: fdupes @@ -191,6 +192,7 @@ cp %{SOURCE23} runtime/syntax/apparmor.vim %patch101 -p1 %patch102 -p1 %patch103 -p1 +%patch104 -p1 cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE8} %{SOURCE10} . # Unreliable tests