import vim-8.2.2637-5.el9

This commit is contained in:
CentOS Sources 2021-11-03 20:01:35 -04:00 committed by Stepan Oksanichenko
commit c3b1bf775f
31 changed files with 4245 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
SOURCES/gvim64.png
SOURCES/vim-8.2-2637.tar.bz2

2
.vim.metadata Normal file
View File

@ -0,0 +1,2 @@
c32bd520a1498b71ee9bbcddc7ad05df1565d085 SOURCES/gvim64.png
8405efdee1d83465651f90edc1173ff69f390aea SOURCES/vim-8.2-2637.tar.bz2

View File

@ -0,0 +1,30 @@
From b5098060f4acae4dac3203130278c948d670a3d5 Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Wed, 7 Jul 2021 19:26:19 +0200
Subject: [PATCH] patch 8.2.3115: Coverity complains about free_wininfo() use
Problem: Coverity complains about free_wininfo() use.
Solution: Add a condition that "wip2" is not equal to "wip". (Neovim #14996)
---
src/version.c | 2 ++
src/window.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/window.c b/src/window.c
index 09067b081..cc9c217b4 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5057,8 +5057,9 @@ win_free(
// If there already is an entry with "wi_win" set to NULL it
// must be removed, it would never be used.
+ // Skip "wip" itself, otherwise Coverity complains.
for (wip2 = buf->b_wininfo; wip2 != NULL; wip2 = wip2->wi_next)
- if (wip2->wi_win == NULL)
+ if (wip2 != wip && wip2->wi_win == NULL)
{
if (wip2->wi_next != NULL)
wip2->wi_next->wi_prev = wip2->wi_prev;
--
2.31.1

View File

@ -0,0 +1,102 @@
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 535de05..ae7b253 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1073,21 +1073,26 @@ generate_PUSHF(cctx_T *cctx, float_T fnumber)
/*
* Generate an ISN_PUSHS instruction.
- * Consumes "str".
+ * Consumes "*str". When freed *str is set to NULL, unless "str" is NULL.
*/
static int
-generate_PUSHS(cctx_T *cctx, char_u *str)
+generate_PUSHS(cctx_T *cctx, char_u **str)
{
isn_T *isn;
if (cctx->ctx_skip == SKIP_YES)
{
- vim_free(str);
+ if (str != NULL)
+ VIM_CLEAR(*str);
return OK;
}
if ((isn = generate_instr_type(cctx, ISN_PUSHS, &t_string)) == NULL)
+ {
+ if (str != NULL)
+ VIM_CLEAR(*str);
return FAIL;
- isn->isn_arg.string = str;
+ }
+ isn->isn_arg.string = str == NULL ? NULL : *str;
return OK;
}
@@ -2547,7 +2552,7 @@ generate_tv_PUSH(cctx_T *cctx, typval_T *tv)
tv->vval.v_blob = NULL;
break;
case VAR_STRING:
- generate_PUSHS(cctx, tv->vval.v_string);
+ generate_PUSHS(cctx, &tv->vval.v_string);
tv->vval.v_string = NULL;
break;
default:
@@ -3301,7 +3306,7 @@ compile_dict(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
key = get_literal_key(arg);
if (key == NULL)
return FAIL;
- if (generate_PUSHS(cctx, key) == FAIL)
+ if (generate_PUSHS(cctx, &key) == FAIL)
return FAIL;
}
@@ -5978,7 +5983,7 @@ compile_assign_unlet(
char_u *key_end = to_name_end(p + 1, TRUE);
char_u *key = vim_strnsave(p + 1, key_end - p - 1);
- r = generate_PUSHS(cctx, key);
+ r = generate_PUSHS(cctx, &key);
}
if (r == FAIL)
return FAIL;
@@ -6149,7 +6154,7 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
// Push each line and the create the list.
FOR_ALL_LIST_ITEMS(l, li)
{
- generate_PUSHS(cctx, li->li_tv.vval.v_string);
+ generate_PUSHS(cctx, &li->li_tv.vval.v_string);
li->li_tv.vval.v_string = NULL;
}
generate_NEWLIST(cctx, l->lv_len);
@@ -7709,7 +7714,7 @@ compile_catch(char_u *arg, cctx_T *cctx UNUSED)
p += len + 2 + dropped;
if (pat == NULL)
return FAIL;
- if (generate_PUSHS(cctx, pat) == FAIL)
+ if (generate_PUSHS(cctx, &pat) == FAIL)
return FAIL;
if (generate_COMPARE(cctx, EXPR_MATCH, FALSE) == FAIL)
@@ -8080,7 +8085,9 @@ compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx)
{
if (p > start)
{
- generate_PUSHS(cctx, vim_strnsave(start, p - start));
+ char_u *val = vim_strnsave(start, p - start);
+
+ generate_PUSHS(cctx, &val);
++count;
}
p += 2;
@@ -8101,7 +8108,9 @@ compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx)
{
if (*skipwhite(start) != NUL)
{
- generate_PUSHS(cctx, vim_strsave(start));
+ char_u *val = vim_strsave(start);
+
+ generate_PUSHS(cctx, &val);
++count;
}
break;

BIN
SOURCES/gvim16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

BIN
SOURCES/gvim32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

BIN
SOURCES/gvim48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

1
SOURCES/macros.vim Normal file
View File

@ -0,0 +1 @@
%vimfiles_root %{_datadir}/vim/vimfiles

41
SOURCES/spec-template.new Normal file
View File

@ -0,0 +1,41 @@
# SPEC file overview:
# https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/#con_rpm-spec-file-overview
# Fedora packaging guidelines:
# https://docs.fedoraproject.org/en-US/packaging-guidelines/
Name:
Version:
Release: 0%{?dist}
Summary:
License:
URL:
Source0:
BuildRequires:
Requires:
%description
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
%make_install
%files
%doc
%license
%changelog

23
SOURCES/vi_wrapper Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/sh
# run vim if:
# - 'vi' command is used and 'vim' binary is available
# - 'vim' command is used
# NOTE: Set up a local alias if you want vim -> vi functionality. We will not
# do it globally, because it messes up with available startup options (see
# ':help starting', 'vi' is not capable of '-d'). The introducing an environment
# variable, which an user must set to get the feature, will do the same trick
# as setting an alias (needs user input, does not work with sudo), so it is left
# on user whether he decides to use an alias:
#
# alias vim=vi
#
# in bashrc file.
if test -f /usr/bin/vim
then
exec /usr/bin/vim "$@"
fi
# run vi otherwise
exec /usr/libexec/vi "$@"

10
SOURCES/view_wrapper Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/sh
# run vim -R if available
if test -f /usr/bin/vim
then
exec /usr/bin/vim -R "$@"
fi
# run vi otherwise
exec /usr/libexec/vi -R "$@"

View File

@ -0,0 +1,26 @@
diff -up vim82/src/term.c.fixkeys vim82/src/term.c
--- vim82/src/term.c.fixkeys 2021-01-08 10:12:59.191309539 +0100
+++ vim82/src/term.c 2021-01-08 10:18:05.410470981 +0100
@@ -919,14 +919,14 @@ static struct builtin_term builtin_termc
{K_XRIGHT, IF_EB("\033[@;*C", ESC_STR "[@;*C")},
{K_XLEFT, IF_EB("\033[@;*D", ESC_STR "[@;*D")},
// An extra set of function keys for vt100 mode
- {K_XF1, IF_EB("\033O*P", ESC_STR "O*P")},
- {K_XF2, IF_EB("\033O*Q", ESC_STR "O*Q")},
- {K_XF3, IF_EB("\033O*R", ESC_STR "O*R")},
- {K_XF4, IF_EB("\033O*S", ESC_STR "O*S")},
- {K_F1, IF_EB("\033[11;*~", ESC_STR "[11;*~")},
- {K_F2, IF_EB("\033[12;*~", ESC_STR "[12;*~")},
- {K_F3, IF_EB("\033[13;*~", ESC_STR "[13;*~")},
- {K_F4, IF_EB("\033[14;*~", ESC_STR "[14;*~")},
+ {K_XF1, IF_EB("\033[11~", ESC_STR "[11~")},
+ {K_XF2, IF_EB("\033[12~", ESC_STR "[12~")},
+ {K_XF3, IF_EB("\033[13~", ESC_STR "[13~")},
+ {K_XF4, IF_EB("\033[14~", ESC_STR "[14~")},
+ {K_F1, IF_EB("\033OP", ESC_STR "OP")},
+ {K_F2, IF_EB("\033OQ", ESC_STR "OQ")},
+ {K_F3, IF_EB("\033OR", ESC_STR "OR")},
+ {K_F4, IF_EB("\033OS", ESC_STR "OS")},
{K_F5, IF_EB("\033[15;*~", ESC_STR "[15;*~")},
{K_F6, IF_EB("\033[17;*~", ESC_STR "[17;*~")},
{K_F7, IF_EB("\033[18;*~", ESC_STR "[18;*~")},

View File

@ -0,0 +1,15 @@
--- vim62/src/os_unix.h.rcloc 2003-08-04 15:38:05.000000000 +0200
+++ vim62/src/os_unix.h 2003-08-04 15:39:25.000000000 +0200
@@ -230,10 +230,10 @@
* Unix system-dependent file names
*/
#ifndef SYS_VIMRC_FILE
-# define SYS_VIMRC_FILE "$VIM/vimrc"
+# define SYS_VIMRC_FILE "/etc/vimrc"
#endif
#ifndef SYS_GVIMRC_FILE
-# define SYS_GVIMRC_FILE "$VIM/gvimrc"
+# define SYS_GVIMRC_FILE "/etc/gvimrc"
#endif
#ifndef DFLT_HELPFILE
# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"

View File

@ -0,0 +1,12 @@
diff -up vim73/runtime/doc/vim.1.668894 vim73/runtime/doc/vim.1
--- vim73/runtime/doc/vim.1.668894 2010-05-15 13:04:00.000000000 +0200
+++ vim73/runtime/doc/vim.1 2012-08-28 12:41:36.000000000 +0200
@@ -73,7 +73,7 @@ To edit a file that starts with a dash,
.TP
\-
The file to edit is read from stdin. Commands are read from stderr, which
-should be a tty.
+should be a TTY.
.TP
\-t {tag}
The file to edit and the initial cursor position depends on a "tag", a sort

View File

@ -0,0 +1,21 @@
diff -up vim82/runtime/syntax/fstab.vim.fstabsyntax vim82/runtime/syntax/fstab.vim
--- vim82/runtime/syntax/fstab.vim.fstabsyntax 2020-08-10 12:08:01.000000000 +0200
+++ vim82/runtime/syntax/fstab.vim 2020-08-10 12:17:22.540855735 +0200
@@ -56,7 +56,7 @@ syn keyword fsMountPointKeyword containe
" Type
syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
syn match fsTypeUnknown /\s\+\zs\w\+/ contained
-syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs
+syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs
" Options
" -------
@@ -68,7 +68,7 @@ syn match fsOptionsString /[a-zA-Z0-9_-]
syn keyword fsOptionsYesNo yes no
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
syn keyword fsOptionsSize 512 1024 2048
-syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok
+syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail
syn match fsOptionsGeneral /_netdev/
" Options: adfs

View File

@ -0,0 +1,13 @@
diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim
index 1a5a108..b709d20 100644
--- a/runtime/syntax/spec.vim
+++ b/runtime/syntax/spec.vim
@@ -111,7 +111,7 @@ syn region specDescriptionArea matchgroup=specSection start='^%description' end=
syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment
"%% Scripts Section %%
-syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
+syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|global\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
"%% Changelog Section %%
syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense

View File

@ -0,0 +1,11 @@
diff -up vim82/src/ex_docmd.c.nowarnings vim82/src/ex_docmd.c
--- vim82/src/ex_docmd.c.nowarnings 2020-07-28 11:42:07.437603829 +0200
+++ vim82/src/ex_docmd.c 2020-07-28 11:44:25.432201129 +0200
@@ -4020,6 +4020,7 @@ get_flags(exarg_T *eap)
void
ex_ni(exarg_T *eap)
{
+ return;
if (!eap->skip)
eap->errmsg =
_("E319: Sorry, the command is not available in this version");

View File

@ -0,0 +1,14 @@
diff -up vim74/runtime/ftplugin/spec.vim.1318991 vim74/runtime/ftplugin/spec.vim
--- vim74/runtime/ftplugin/spec.vim.1318991 2016-08-04 15:29:42.423862424 +0200
+++ vim74/runtime/ftplugin/spec.vim 2016-08-04 15:31:08.797299188 +0200
@@ -41,8 +41,8 @@ else:
headers = spec.sourceHeader
version = headers["Version"]
release = headers["Release"]
- vim.command("let ver = " + version)
- vim.command("let rel = " + release)
+ vim.command("let ver = '" + version + "'")
+ vim.command("let rel = '" + release + "'")
PYEND
endif
endfunction

View File

@ -0,0 +1,33 @@
diff -up vim74/runtime/syntax/spec.vim.highlite vim74/runtime/syntax/spec.vim
--- vim74/runtime/syntax/spec.vim.highlite 2016-07-04 10:17:45.000000000 +0200
+++ vim74/runtime/syntax/spec.vim 2016-08-04 15:20:26.116049343 +0200
@@ -38,7 +38,7 @@ syn match specNoNumberHilite 'X11\|X11R6
syn match specManpageFile '[a-zA-Z]\.1'
"Day, Month and most used license acronyms
-syn keyword specLicense contained GPL LGPL BSD MIT GNU
+syn keyword specLicense contained GPL LGPL BSD MIT GNU distributable
syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun
syn keyword specMonth contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec
syn keyword specMonth contained January February March April May June July August September October November December
@@ -61,9 +61,9 @@ syn cluster specListedFiles contains=spe
"specComands
syn match specConfigure contained '\./configure'
-syn match specTarCommand contained '\<tar\s\+[cxvpzIf]\{,5}\s*'
+syn match specTarCommand contained '\<tar\s\+[cxvpzIjf]\{,5}\s*'
syn keyword specCommandSpecial contained root
-syn keyword specCommand contained make xmkmf mkdir chmod ln find sed rm strip moc echo grep ls rm mv mkdir install cp pwd cat tail then else elif cd gzip rmdir ln eval export touch
+syn keyword specCommand contained make xmkmf mkdir chmod ln find sed rm strip moc echo grep ls rm mv mkdir install cp pwd cat tail then else elif cd gzip rmdir ln eval export touch bzip2 bunzip2 gunzip
syn cluster specCommands contains=specCommand,specTarCommand,specConfigure,specCommandSpecial
"frequently used rpm env vars
@@ -105,7 +105,7 @@ syn case ignore
"%% PreAmble Section %%
"Copyright and Serial were deprecated by License and Epoch
syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
-syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
+syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExcludeOS\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
"%% Description Section %%
syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment

View File

@ -0,0 +1,26 @@
diff --git a/src/highlight.c b/src/highlight.c
index 9322f96..f7147a0 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -211,8 +211,8 @@ static char *(highlight_init_light[]) = {
CENT("Visual term=reverse",
"Visual term=reverse guibg=LightGrey"),
#ifdef FEAT_DIFF
- CENT("DiffAdd term=bold ctermbg=LightBlue",
- "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"),
+ CENT("DiffAdd term=bold ctermbg=LightRed",
+ "DiffAdd term=bold ctermbg=LightRed guibg=LightBlue"),
CENT("DiffChange term=bold ctermbg=LightMagenta",
"DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta"),
CENT("DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan",
@@ -304,8 +304,8 @@ static char *(highlight_init_dark[]) = {
CENT("Visual term=reverse",
"Visual term=reverse guibg=DarkGrey"),
#ifdef FEAT_DIFF
- CENT("DiffAdd term=bold ctermbg=DarkBlue",
- "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"),
+ CENT("DiffAdd term=bold ctermbg=DarkRed",
+ "DiffAdd term=bold ctermbg=DarkRed guibg=DarkBlue"),
CENT("DiffChange term=bold ctermbg=DarkMagenta",
"DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta"),
CENT("DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan",

View File

@ -0,0 +1,11 @@
--- vim74/runtime/filetype.vim.orig 2013-08-12 14:51:58.669350813 +0200
+++ vim74/runtime/filetype.vim 2013-08-12 14:56:12.432540523 +0200
@@ -2475,7 +2475,7 @@
" More Apache config files
au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache')
-au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
+au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/httpd/conf.*/*,*/etc/httpd/mods-*/*,*/etc/httpd/sites-*/*,*/etc/httpd/conf.d/*.conf*,auth_mysql.conf*,auth_pgsql.conf*,ssl.conf*,perl.conf*,php.conf*,python.conf*,squirrelmail.conf* call s:StarSetf('apache')
" Asterisk config file
au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk')

View File

@ -0,0 +1,22 @@
diff -up vim82/runtime/defaults.vim.copypaste vim82/runtime/defaults.vim
--- vim82/runtime/defaults.vim.copypaste 2020-10-06 17:03:19.276066889 +0200
+++ vim82/runtime/defaults.vim 2020-10-06 17:04:30.437448603 +0200
@@ -73,18 +73,6 @@ map Q gq
" Revert with ":iunmap <C-U>".
inoremap <C-U> <C-G>u<C-U>
-" In many terminal emulators the mouse works just fine. By enabling it you
-" can position the cursor, Visually select and scroll with the mouse.
-" Only xterm can grab the mouse events when using the shift key, for other
-" terminals use ":", select text and press Esc.
-if has('mouse')
- if &term =~ 'xterm'
- set mouse=a
- else
- set mouse=nvi
- endif
-endif
-
" Only do this part when Vim was compiled with the +eval feature.
if 1

View File

@ -0,0 +1,83 @@
diff -up vim82/src/config.h.in.fips-warning vim82/src/config.h.in
--- vim82/src/config.h.in.fips-warning 2021-03-01 12:20:20.887162181 +0100
+++ vim82/src/config.h.in 2021-03-01 12:20:42.520977438 +0100
@@ -499,3 +499,12 @@
/* Define if _SC_SIGSTKSZ is available via sysconf() */
#undef HAVE_SYSCONF_SIGSTKSZ
+
+/* Do we need FIPS warning? */
+#undef HAVE_FIPS_WARNING
+
+/* Link to system-fips file */
+#undef SYSTEM_FIPS_FILE_LINK
+
+/* Link to fips_enabled file */
+#undef FIPS_ENABLED_FILE_LINK
diff -up vim82/src/configure.ac.fips-warning vim82/src/configure.ac
--- vim82/src/configure.ac.fips-warning 2021-03-01 12:20:20.885162198 +0100
+++ vim82/src/configure.ac 2021-03-01 12:20:20.888162173 +0100
@@ -541,6 +541,38 @@ else
AC_MSG_RESULT(yes)
fi
+dnl Checking if we want FIPS warning
+
+AC_MSG_CHECKING(--enable-fips-warning)
+AC_ARG_ENABLE([fips-warning],
+ AS_HELP_STRING([--enable-fips-warning], [Enable FIPS warning]),
+ ,[enable_fips_warning="no"])
+
+if test "$enable_fips_warning" = "yes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_FIPS_WARNING])
+
+ dnl Setting path for system-fips file
+
+ AC_MSG_CHECKING(--with-system-fips-file argument)
+ AC_ARG_WITH([system-fips-file], [ --with-system-fips-file=PATH Link to system-fips file (default: /etc/system-fips)],
+ with_system_fips_file=$withval,
+ with_system_fips_file="/etc/system-fips")
+ AC_MSG_RESULT([$with_system_fips_file])
+ AC_DEFINE_UNQUOTED([SYSTEM_FIPS_FILE_LINK], ["$with_system_fips_file"])
+
+ dnl Setting link to fips_enabled file
+
+ AC_MSG_CHECKING(--with-fips-enabled-file argument)
+ AC_ARG_WITH([fips-enabled-file], [ --with-fips-enabled-file=PATH Link to fibs_enabled file (default: /proc/sys/crypto/fips_enabled)],
+ with_fips_enabled_file=$withval,
+ with_fips_enabled_file="/proc/sys/crypto/fips_enabled")
+ AC_MSG_RESULT([$with_fips_enabled_file])
+ AC_DEFINE_UNQUOTED([FIPS_ENABLED_FILE_LINK], ["$with_fips_enabled_file"])
+else
+ AC_MSG_RESULT(no)
+fi
+
dnl Check for Lua feature.
AC_MSG_CHECKING(--enable-luainterp argument)
AC_ARG_ENABLE(luainterp,
diff -up vim82/src/crypt.c.fips-warning vim82/src/crypt.c
--- vim82/src/crypt.c.fips-warning 2021-03-01 12:13:11.000000000 +0100
+++ vim82/src/crypt.c 2021-03-01 12:20:20.888162173 +0100
@@ -523,6 +523,21 @@ crypt_check_method(int method)
msg_scroll = TRUE;
msg(_("Warning: Using a weak encryption method; see :help 'cm'"));
}
+#ifdef HAVE_FIPS_WARNING
+ FILE *fips_enable_fd = fopen(FIPS_ENABLED_FILE_LINK, "r");
+ if (fips_enable_fd == NULL)
+ return;
+
+ int enabled = fgetc(fips_enable_fd);
+
+ if ( access(SYSTEM_FIPS_FILE_LINK, F_OK) != -1 && enabled == '1')
+ {
+ msg_scroll = TRUE;
+ msg(_("Warning: This cryptography is not FIPS 140-2 compliant."));
+ }
+
+ fclose(fips_enable_fd);
+#endif
}
void

View File

@ -0,0 +1,5 @@
# Ensure vim is set as EDITOR if it isn't already set
if ( ! ($?EDITOR) ) then
setenv EDITOR "/usr/bin/vim"
endif

View File

@ -0,0 +1,8 @@
# Ensure vim is set as EDITOR if it isn't already set
# This is set as a universal variable so that any other definition
# by the user would win
# Cf. https://fishshell.com/docs/current/index.html#variables-scope
if ! set -q EDITOR;
set -x EDITOR /usr/bin/vim
end

View File

@ -0,0 +1,5 @@
# Ensure vim is set as EDITOR if it isn't already set
if [ -z "$EDITOR" ]; then
export EDITOR="/usr/bin/vim"
fi

View File

@ -0,0 +1,326 @@
diff -up vim73/runtime/doc/vim.man.rh1 vim73/runtime/doc/vim.man
--- vim73/runtime/doc/vim.man.rh1 2013-07-26 11:26:20.566576864 +0200
+++ vim73/runtime/doc/vim.man 2013-07-26 11:47:42.061351469 +0200
@@ -11,9 +11,9 @@ SYNOPSIS
vim [options] -t tag
vim [options] -q [errorfile]
- ex
+ ex gex
view
- gvim gview evim eview
+ gvim gview vimx evim eview
rvim rview rgvim rgview
DESCRIPTION
@@ -79,8 +79,13 @@ DESCRIPTION
the files. Can also be done with the "-R" argument.
gvim gview
- The GUI version. Starts a new window. Can also be done with
- the "-g" argument.
+ The GUI version. Starts a new window.
+
+ gex Starts a new gvim window in Ex mode. Can also be done with
+ the "-e" argument to gvim.
+
+ vimx Starts gvim in "Vi" mode similar to "vim", but with
+ additional features like xterm clipboard support.
evim eview
The GUI version in easy mode. Starts a new window. Can also
diff -urN vim73/runtime/doc/vim.1 vim73_new/runtime/doc/vim.1
--- vim73/runtime/doc/vim.1 2013-07-31 14:13:01.039765800 +0200
+++ vim73_new/runtime/doc/vim.1 2013-07-31 13:57:59.861912768 +0200
@@ -17,11 +17,13 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
.B evim
.B eview
.br
@@ -114,7 +116,12 @@
gvim gview
The GUI version.
Starts a new window.
-Can also be done with the "\-g" argument.
+.TP
+gex
+Starts a new gvim window in Ex mode. Can also be done with the "-e" argument to gvim
+.TP
+vimx
+Starts gvim in "Vi" mode similar to "vim", but with additional features like xterm clipboard support
.TP
evim eview
The GUI version in easy mode.
@@ -458,6 +458,12 @@
\-\-remote\-wait\-silent
As \-\-remote\-wait, but without the warning when no server is found.
.TP
+\-\-remote\-tab[\-wait][\-silent]
+As \-\-remote but use tab page per file
+.TP
+\-\-role
+Set a unique role to identify the main window
+.TP
\-\-serverlist
List the names of all Vim servers that can be found.
.TP
diff -urN vim73/runtime/doc/vim-fr.1 vim73_new/runtime/doc/vim-fr.1
--- vim73/runtime/doc/vim-fr.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vim-fr.1 2013-07-31 13:59:10.587467916 +0200
@@ -24,11 +24,13 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
.B evim
.B eview
.br
diff -urN vim73/runtime/doc/vim-fr.UTF-8.1 vim73_new/runtime/doc/vim-fr.UTF-8.1
--- vim73/runtime/doc/vim-fr.UTF-8.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vim-fr.UTF-8.1 2013-07-31 13:59:28.394852347 +0200
@@ -24,11 +24,13 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
.B evim
.B eview
.br
diff -urN vim73/runtime/doc/vim-it.1 vim73_new/runtime/doc/vim-it.1
--- vim73/runtime/doc/vim-it.1 2010-07-27 22:22:52.000000000 +0200
+++ vim73_new/runtime/doc/vim-it.1 2013-07-31 13:59:43.474331077 +0200
@@ -17,11 +17,13 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
.B evim
.B eview
.br
diff -urN vim73/runtime/doc/vim-it.UTF-8.1 vim73_new/runtime/doc/vim-it.UTF-8.1
--- vim73/runtime/doc/vim-it.UTF-8.1 2010-07-30 20:53:57.000000000 +0200
+++ vim73_new/runtime/doc/vim-it.UTF-8.1 2013-07-31 13:59:55.985898573 +0200
@@ -17,11 +17,13 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
.B evim
.B eview
.br
diff -urN vim73/runtime/doc/vim.man vim73_new/runtime/doc/vim.man
--- vim73/runtime/doc/vim.man 2013-07-31 14:13:01.044765627 +0200
+++ vim73_new/runtime/doc/vim.man 2013-07-31 13:53:35.107064804 +0200
@@ -82,10 +82,10 @@
The GUI version. Starts a new window.
gex Starts a new gvim window in Ex mode. Can also be done with
- the "-e" argument to gvim.
+ the "-e" argument to gvim
vimx Starts gvim in "Vi" mode similar to "vim", but with
- additional features like xterm clipboard support.
+ additional features like xterm clipboard support
evim eview
The GUI version in easy mode. Starts a new window. Can also
diff -urN vim73/runtime/doc/vim-pl.1 vim73_new/runtime/doc/vim-pl.1
--- vim73/runtime/doc/vim-pl.1 2010-05-15 13:04:01.000000000 +0200
+++ vim73_new/runtime/doc/vim-pl.1 2013-07-31 14:00:21.282024131 +0200
@@ -17,11 +17,13 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
.B evim
.B eview
.br
diff -urN vim73/runtime/doc/vim-pl.UTF-8.1 vim73_new/runtime/doc/vim-pl.UTF-8.1
--- vim73/runtime/doc/vim-pl.UTF-8.1 2010-05-15 13:37:38.000000000 +0200
+++ vim73_new/runtime/doc/vim-pl.UTF-8.1 2013-07-31 14:00:36.056513402 +0200
@@ -17,11 +17,13 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
.B evim
.B eview
.br
diff -urN vim73/runtime/doc/vim-ru.1 vim73_new/runtime/doc/vim-ru.1
--- vim73/runtime/doc/vim-ru.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vim-ru.1 2013-07-31 14:01:10.071337568 +0200
@@ -17,11 +17,15 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
+.B evim
+.B eview
.br
.B rvim
.B rview
diff -urN vim73/runtime/doc/vim-ru.UTF-8.1 vim73_new/runtime/doc/vim-ru.UTF-8.1
--- vim73/runtime/doc/vim-ru.UTF-8.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vim-ru.UTF-8.1 2013-07-31 14:01:34.494493301 +0200
@@ -17,11 +17,15 @@
.PP
.br
.B ex
+.B gex
.br
.B view
.br
.B gvim
.B gview
+.B vimx
+.B evim
+.B eview
.br
.B rvim
.B rview
diff -urN vim73/runtime/doc/vimtutor.1 vim73_new/runtime/doc/vimtutor.1
--- vim73/runtime/doc/vimtutor.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor.1 2013-07-31 14:10:10.093671964 +0200
@@ -4,6 +4,8 @@
.SH SYNOPSIS
.br
.B vimtutor [\-g] [language]
+.br
+.B gvimtutor
.SH DESCRIPTION
.B Vimtutor
starts the
diff -urN vim73/runtime/doc/vimtutor-it.1 vim73_new/runtime/doc/vimtutor-it.1
--- vim73/runtime/doc/vimtutor-it.1 2010-07-27 22:35:32.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor-it.1 2013-07-31 14:10:33.564861055 +0200
@@ -4,6 +4,8 @@
.SH SINTASSI
.br
.B vimtutor [\-g] [lingua]
+.br
+.B gvimtutor
.SH DESCRIZIONE
.B Vimtutor
inizia il
diff -urN vim73/runtime/doc/vimtutor-it.UTF-8.1 vim73_new/runtime/doc/vimtutor-it.UTF-8.1
--- vim73/runtime/doc/vimtutor-it.UTF-8.1 2010-07-30 20:53:57.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor-it.UTF-8.1 2013-07-31 14:10:40.483622016 +0200
@@ -4,6 +4,8 @@
.SH SINTASSI
.br
.B vimtutor [\-g] [lingua]
+.br
+.B gvimtutor
.SH DESCRIZIONE
.B Vimtutor
inizia il
diff -urN vim73/runtime/doc/vimtutor.man vim73_new/runtime/doc/vimtutor.man
--- vim73/runtime/doc/vimtutor.man 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor.man 2013-07-31 14:11:04.786782356 +0200
@@ -7,6 +7,7 @@
SYNOPSIS
vimtutor [-g] [language]
+ gvimtutor
DESCRIPTION
Vimtutor starts the Vim tutor. It copies the tutor file first, so that
diff -urN vim73/runtime/doc/vimtutor-pl.1 vim73_new/runtime/doc/vimtutor-pl.1
--- vim73/runtime/doc/vimtutor-pl.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor-pl.1 2013-07-31 14:11:13.602477777 +0200
@@ -4,6 +4,8 @@
.SH SYNOPSIS
.br
.B vimtutor -g [j陑yk]
+.br
+.B gvimtutor
.SH OPIS
.B Vimtutor
uruchamia nauczyciela
diff -urN vim73/runtime/doc/vimtutor-pl.UTF-8.1 vim73_new/runtime/doc/vimtutor-pl.UTF-8.1
--- vim73/runtime/doc/vimtutor-pl.UTF-8.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor-pl.UTF-8.1 2013-07-31 14:11:20.571237009 +0200
@@ -4,6 +4,8 @@
.SH SYNOPSIS
.br
.B vimtutor -g [j臋zyk]
+.br
+.B gvimtutor
.SH OPIS
.B Vimtutor
uruchamia nauczyciela
diff -urN vim73/runtime/doc/vimtutor-ru.1 vim73_new/runtime/doc/vimtutor-ru.1
--- vim73/runtime/doc/vimtutor-ru.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor-ru.1 2013-07-31 14:11:35.673715221 +0200
@@ -4,6 +4,8 @@
.SH 腼磲钿钺<E992BF> 篝蝻脶
.br
.B vimtutor [掩偎]
+.br
+.B gvimtutor
.SH 镳轶犷殄
胂土文<E59C9F>
.B vimtutor
diff -urN vim73/runtime/doc/vimtutor-ru.UTF-8.1 vim73_new/runtime/doc/vimtutor-ru.UTF-8.1
--- vim73/runtime/doc/vimtutor-ru.UTF-8.1 2010-05-15 13:04:00.000000000 +0200
+++ vim73_new/runtime/doc/vimtutor-ru.UTF-8.1 2013-07-31 14:11:46.649335999 +0200
@@ -7,6 +7,8 @@
.SH 袨袩袠小袗袧袠袝
袣芯屑邪薪写邪
.B vimtutor
+.br
+.B gvimtutor
蟹邪锌褍褋泻邪械褌 褍褔械斜薪懈泻 锌芯
.B Vim.
袩褉懈 褝褌芯屑 褋薪邪褔邪谢邪 锌褉芯懈褋褏芯写懈褌 褋芯蟹写邪薪懈械 泻芯锌懈懈 褎邪泄谢邪 褍褔械斜薪懈泻邪,

View File

@ -0,0 +1,87 @@
diff -up vim82/runtime/tools/demoserver.py.python-tests vim82/runtime/tools/demoserver.py
--- vim82/runtime/tools/demoserver.py.python-tests 2019-07-26 07:58:50.000000000 +0200
+++ vim82/runtime/tools/demoserver.py 2020-04-17 06:18:06.748977527 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# Server that will accept connections from a Vim channel.
# Run this server and then in Vim you can open the channel:
diff -up vim82/src/auto/configure.python-tests vim82/src/auto/configure
--- vim82/src/auto/configure.python-tests 2020-04-17 06:07:48.000000000 +0200
+++ vim82/src/auto/configure 2020-04-17 06:18:06.750977509 +0200
@@ -6418,7 +6418,7 @@ eof
if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
vi_cv_path_python_plibs="-framework Python"
- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
+ if test "x${vi_cv_path_python}" != "x/usr/bin/python2" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
fi
else
diff -up vim82/src/configure.ac.python-tests vim82/src/configure.ac
--- vim82/src/configure.ac.python-tests 2020-04-17 06:07:48.000000000 +0200
+++ vim82/src/configure.ac 2020-04-17 06:18:06.750977509 +0200
@@ -1263,7 +1263,7 @@ eof
if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
vi_cv_path_python_plibs="-framework Python"
- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
+ if test "x${vi_cv_path_python}" != "x/usr/bin/python2" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
fi
else
diff -up vim82/src/testdir/test_channel_pipe.py.python-tests vim82/src/testdir/test_channel_pipe.py
--- vim82/src/testdir/test_channel_pipe.py.python-tests 2019-07-26 07:58:53.000000000 +0200
+++ vim82/src/testdir/test_channel_pipe.py 2020-04-17 06:18:06.751977500 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# Server that will communicate over stdin/stderr
#
diff -up vim82/src/testdir/test_channel.py.python-tests vim82/src/testdir/test_channel.py
--- vim82/src/testdir/test_channel.py.python-tests 2020-04-17 06:18:06.751977500 +0200
+++ vim82/src/testdir/test_channel.py 2020-04-17 06:18:24.517813082 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
#
# Server that will accept connections from a Vim channel.
# Used by test_channel.vim.
diff -up vim82/src/testdir/test_channel_write.py.python-tests vim82/src/testdir/test_channel_write.py
--- vim82/src/testdir/test_channel_write.py.python-tests 2019-07-26 07:58:53.000000000 +0200
+++ vim82/src/testdir/test_channel_write.py 2020-04-17 06:18:06.751977500 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# Program that writes a number to stdout repeatedly
#
diff -up vim82/src/testdir/test_makeencoding.py.python-tests vim82/src/testdir/test_makeencoding.py
--- vim82/src/testdir/test_makeencoding.py.python-tests 2019-07-26 07:58:53.000000000 +0200
+++ vim82/src/testdir/test_makeencoding.py 2020-04-17 06:18:06.751977500 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Test program for :make, :grep and :cgetfile.
diff -up vim82/src/testdir/test_netbeans.py.python-tests vim82/src/testdir/test_netbeans.py
--- vim82/src/testdir/test_netbeans.py.python-tests 2019-07-26 07:58:53.000000000 +0200
+++ vim82/src/testdir/test_netbeans.py 2020-04-17 06:18:06.751977500 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# Server that will communicate with Vim through the netbeans interface.
# Used by test_netbeans.vim.
diff -up vim82/src/testdir/test_short_sleep.py.python-tests vim82/src/testdir/test_short_sleep.py
--- vim82/src/testdir/test_short_sleep.py.python-tests 2019-07-26 07:58:53.000000000 +0200
+++ vim82/src/testdir/test_short_sleep.py 2020-04-17 06:18:06.751977500 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# Program that sleeps for 100 msec
#

128
SOURCES/vimrc Normal file
View File

@ -0,0 +1,128 @@
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
" Avoid side effects when it was already reset.
if &compatible
set nocompatible
endif
" When the +eval feature is missing, the set command above will be skipped.
" Use a trick to reset compatible only when the +eval feature is missing.
silent! while 0
set nocompatible
silent! endwhile
" Allow backspacing over everything in insert mode.
set backspace=indent,eol,start
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set wildmenu " display completion matches in a status line
set ttimeout " time out for key codes
set ttimeoutlen=100 " wait up to 100ms after Esc for special key
" Show @@@ in the last line if it is truncated.
set display=truncate
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching when it's possible to timeout.
if has('reltime')
set incsearch
endif
" Do not recognize octal numbers for Ctrl-A and Ctrl-X, most users find it
" confusing.
set nrformats-=octal
" Only do this part when compiled with support for autocommands
if has("autocmd")
augroup fedora
autocmd!
" In text files, always limit the width of text to 78 characters
" autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
" start with spec file template
" 1724126 - do not open new file with .spec suffix with spec file template
" apparently there are other file types with .spec suffix, so disable the
" template
" autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
augroup END
endif
if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add $PWD/cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
" Revert with ":syntax off".
syntax on
" I like highlighting strings inside C comments.
" Revert with ":unlet c_comment_strings".
let c_comment_strings=1
set hlsearch
endif
filetype plugin on
if &term=="xterm"
set t_Co=8
set t_Sb=[4%dm
set t_Sf=[3%dm
endif
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.
" Revert with: ":delcommand DiffOrig".
if !exists(":DiffOrig")
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
endif
if has('langmap') && exists('+langremap')
" Prevent that the langmap option applies to characters that result from a
" mapping. If set (default), this may break plugins (but it's backward
" compatible).
set nolangremap
endif
" Don't wake up system with blinking cursor:
let &guicursor = &guicursor . ",a:blinkon0"
" Source a global configuration file if available
if filereadable("/etc/vimrc.local")
source /etc/vimrc.local
endif

37
SOURCES/virc Normal file
View File

@ -0,0 +1,37 @@
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,latin1
endif
set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
" Only do this part when compiled with support for autocommands
if has("autocmd")
augroup fedora
autocmd!
" In text files, always limit the width of text to 78 characters
" autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
" start with spec file template
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
augroup END
endif
filetype plugin on
if &term=="xterm"
set t_Co=8
set t_Sb=[4%dm
set t_Sf=[3%dm
endif

3151
SPECS/vim.spec Normal file

File diff suppressed because it is too large Load Diff