use reduced virc
This commit is contained in:
parent
f61b0f98b6
commit
71a377e811
13
vim.spec
13
vim.spec
@ -25,7 +25,8 @@ Release: 2%{?dist}
|
|||||||
License: Vim
|
License: Vim
|
||||||
Group: Applications/Editors
|
Group: Applications/Editors
|
||||||
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
|
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
|
||||||
Source3: gvim.desktop
|
Source2: gvim.desktop
|
||||||
|
Source3: vimrc
|
||||||
Source4: vimrc
|
Source4: vimrc
|
||||||
Source5: ftp://ftp.vim.org/pub/vim/patches/README.patches
|
Source5: ftp://ftp.vim.org/pub/vim/patches/README.patches
|
||||||
Source7: gvim16.png
|
Source7: gvim16.png
|
||||||
@ -212,7 +213,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
|
|||||||
%patch3011 -p1
|
%patch3011 -p1
|
||||||
%patch3012 -p1
|
%patch3012 -p1
|
||||||
%patch3013 -p1
|
%patch3013 -p1
|
||||||
%patch3014 -p1
|
#patch3014 -p1
|
||||||
%patch3015 -p1
|
%patch3015 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -230,7 +231,7 @@ cp -f os_unix.h os_unix.h.save
|
|||||||
cp -f ex_cmds.c ex_cmds.c.save
|
cp -f ex_cmds.c ex_cmds.c.save
|
||||||
|
|
||||||
perl -pi -e "s/help.txt/vi_help.txt/" os_unix.h ex_cmds.c
|
perl -pi -e "s/help.txt/vi_help.txt/" os_unix.h ex_cmds.c
|
||||||
perl -pi -e "s/\/etc\/vimrc/\/etc\/virc/" os_unix.h
|
perl -pi -e "s/vimrc/virc/" os_unix.h
|
||||||
%configure --prefix=%{_prefix} --with-features=small --with-x=no \
|
%configure --prefix=%{_prefix} --with-features=small --with-x=no \
|
||||||
--enable-multibyte \
|
--enable-multibyte \
|
||||||
--disable-netbeans \
|
--disable-netbeans \
|
||||||
@ -414,11 +415,11 @@ EOF
|
|||||||
--vendor fedora \
|
--vendor fedora \
|
||||||
%endif
|
%endif
|
||||||
--dir %{buildroot}/%{_datadir}/applications \
|
--dir %{buildroot}/%{_datadir}/applications \
|
||||||
%{SOURCE3}
|
%{SOURCE2}
|
||||||
# --add-category "Development;TextEditor;X-Red-Hat-Base" D\
|
# --add-category "Development;TextEditor;X-Red-Hat-Base" D\
|
||||||
%else
|
%else
|
||||||
mkdir -p ./%{_sysconfdir}/X11/applnk/Applications
|
mkdir -p ./%{_sysconfdir}/X11/applnk/Applications
|
||||||
cp %{SOURCE3} ./%{_sysconfdir}/X11/applnk/Applications/gvim.desktop
|
cp %{SOURCE2} ./%{_sysconfdir}/X11/applnk/Applications/gvim.desktop
|
||||||
%endif
|
%endif
|
||||||
# ja_JP.ujis is obsolete, ja_JP.eucJP is recommended.
|
# ja_JP.ujis is obsolete, ja_JP.eucJP is recommended.
|
||||||
( cd ./%{_datadir}/%{name}/%{vimdir}/lang; \
|
( cd ./%{_datadir}/%{name}/%{vimdir}/lang; \
|
||||||
@ -473,8 +474,8 @@ if ( -x /usr/bin/id ) then
|
|||||||
endif
|
endif
|
||||||
EOF
|
EOF
|
||||||
chmod 0644 %{buildroot}/%{_sysconfdir}/profile.d/*
|
chmod 0644 %{buildroot}/%{_sysconfdir}/profile.d/*
|
||||||
|
install -p -m644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/virc
|
||||||
install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/vimrc
|
install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/vimrc
|
||||||
install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/virc
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_libdir}/%{name}
|
mkdir -p %{buildroot}%{_libdir}/%{name}
|
||||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||||
|
37
virc
Normal file
37
virc
Normal 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
|
Loading…
Reference in New Issue
Block a user