From 008069969bc86a42c726affa027e58f2283fbb89 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Sep 09 2004 13:57:32 +0000 Subject: auto-import vim-5.7-8tc1 from vim-5.7-8tc1.src.rpm --- diff --git a/vim.spec b/vim.spec index d964485..2b36fa8 100644 --- a/vim.spec +++ b/vim.spec @@ -2,12 +2,17 @@ Summary: The VIM editor. Name: vim Version: 5.7 %define vimversion vim57 -Release: 8 -Copyright: freeware +Release: 8tc1 +Packager: Red Hat, Inc. +Vendor: Red Hat, Inc. +Copyright: Charityware Group: Applications/Editors Source0: ftp://ftp.home.vim.org/pub/vim/unix/vim-%{version}-src.tar.gz Source1: ftp://ftp.home.vim.org/pub/vim/unix/vim-%{version}-rt.tar.gz +# By CLE { Source3: vimrc +Source4: gvimrc +# } Patch0: vim-4.2-speed_t.patch Patch1: vim-5.1-vimnotvi.patch Patch2: vim-5.6a-paths.patch @@ -17,7 +22,6 @@ Patch5: vim-5.6-destdir.patch Patch6: vim-5.7-redhat.patch Patch7: vim-5.7-docpath.patch Patch8: vim-5.7-crv.patch -Patch9: vim-5.7-security.patch Patch101: 5.7.001 Patch102: 5.7.002 Patch103: 5.7.003 @@ -26,19 +30,6 @@ Patch105: 5.7.005 Patch106: 5.7.006 Patch107: 5.7.007 Patch108: 5.7.008 -Patch112: 5.7.012 -Patch113: 5.7.013 -Patch114: 5.7.014 -Patch115: 5.7.015 -Patch116: 5.7.016 -Patch117: 5.7.017 -Patch118: 5.7.018 -Patch119: 5.7.019 -Patch120: 5.7.020 -Patch121: 5.7.021 -Patch122: 5.7.022 -Patch123: 5.7.023 -Patch124: 5.7.024 Buildroot: /var/tmp/vim-root Buildrequires: python-devel perl gtk+-devel @@ -129,7 +120,6 @@ find . -name \*.paths | xargs rm -f %patch6 -p1 -b .redhat %patch7 -p1 -b .docs %patch8 -p1 -b .crv -%patch9 -p1 -b .security %patch101 -p0 -b .p1 %patch102 -p0 -b .p2 @@ -139,19 +129,6 @@ find . -name \*.paths | xargs rm -f %patch106 -p0 -b .p6 %patch107 -p0 -b .p7 %patch108 -p0 -b .p8 -%patch112 -p0 -b .p12 -%patch113 -p0 -b .p13 -%patch114 -p0 -b .p14 -%patch115 -p0 -b .p15 -%patch116 -p0 -b .p16 -%patch117 -p0 -b .p17 -%patch118 -p0 -b .p18 -%patch119 -p0 -b .p19 -%patch120 -p0 -b .p20 -%patch121 -p0 -b .p21 -%patch122 -p0 -b .p22 -%patch123 -p0 -b .p23 -%patch124 -p0 -b .p24 perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk @@ -160,7 +137,7 @@ cd src perl -pi -e "s,\\\$VIMRUNTIME,/usr/share/vim/%{vimversion},g" os_unix.h perl -pi -e "s,\\\$VIM,/usr/share/vim/%{vimversion}/macros,g" os_unix.h -%configure --enable-max-features=yes --enable-pythoninterp --enable-perlinterp --disable-tclinterp --with-x=yes --enable-gui=gtk --exec-prefix=/usr/X11R6 +%configure --enable-max-features=yes --enable-pythoninterp --enable-perlinterp --disable-tclinterp --with-x=yes --enable-gui=gtk --exec-prefix=/usr/X11R6 --enable-xim --enable-multibyte --enable-fontset make if_perl.c perl -pi -e "s,#define.*PL_na.*,,g" if_perl.c perl -pi -e "s,#define.*PL_defgv.*,,g" if_perl.c @@ -225,8 +202,12 @@ Type=Application Comment=VI editor for X Windows Exec=gvim EOF +# By CLE { install -s -m644 %{SOURCE3} ./usr/share/vim/%{vimversion}/macros/ - ln -s vimrc ./usr/share/vim/%{vimversion}/macros/gvimrc + install -s -m644 %{SOURCE4} ./usr/share/vim/%{vimversion}/macros/ +# install -s -m644 %{SOURCE3} ./usr/share/vim/%{vimversion}/macros/ +# ln -s vimrc ./usr/share/vim/%{vimversion}/macros/gvimrc +# } ) # Dependency cleanups @@ -253,6 +234,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vi.* %{_mandir}/man1/view.* %{_mandir}/man1/rvi.* +%{_mandir}/man1/gvim.* %{_mandir}/man1/rview.* %{_mandir}/man1/xxd.* @@ -277,12 +259,14 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/gvim.* %changelog -* Mon Jan 29 2001 Bernhard Rosenkraenzer -- Apply bugfix patch #24, fixes security bug #25194 +* Tue Dec 5 2000 Andrew Lee +- Candyz alreay patch this on CLE 0.9p1 +- rebuild on RH7 + +* Wed Oct 11 2000 Chung-Yen Chang +- configure with --enable-xim --enable-multibyte --enable-fontset +- add default vimrc and gvimrc for Chinese -* Wed Dec 20 2000 Bernhard Rosenkraenzer -- Fix mktemp() potential DoS (#22594, #22595) -- Apply bugfix patches #9 to #19 * Sun Aug 6 2000 Tim Waugh - xterm doesn't have request version string (#14570) diff --git a/vimrc b/vimrc index d06ded3..f06ab8e 100644 --- a/vimrc +++ b/vimrc @@ -1,87 +1,37 @@ -set nocompatible " Use Vim defaults (much better!) -set bs=2 " allow backspacing over everything in insert mode -"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 - -" Only do this part when compiled with support for autocommands -if has("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("'\"") | exe "'\"" | endif +"" (for Chinese) +"" Set file encoding format as 'taiwan' for Chinese +"" Only fe is only set when in rxvt which defines COLORTERM +"" environment variable +if exists("$COLORTERM") + set fe=taiwan endif -" Don't use Ex mode, use Q for formatting -map Q gq - -" 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") - syntax on - set hlsearch -endif +"" (for Chinese) +"" Set ruler on, you must set this to ensure +"" the Chinese functionality of gvim +set ru -if has("autocmd") - augroup cprog - " Remove all cprog autocommands - au! +"" Set visual bell and disable screen flash +:set vb t_vb= - " When starting to edit a file: - " For C and C++ files set formatting of comments and set C-indenting on. - " For other files switch it off. - " Don't change the order, it's important that the line with * comes first. - autocmd FileType * set formatoptions=tcql nocindent comments& - autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,:// - augroup END +"" Toggle on/off highlightsearch +map :set hls!set hls? - augroup gzip - " Remove all gzip autocommands - au! +"" Toggle on/off paste mode +map :set paste!set paste? - " Enable editing of gzipped files - " read: set binary mode before reading the file - " uncompress text in buffer after reading - " write: compress file after writing - " append: uncompress file, append, compress file - autocmd BufReadPre,FileReadPre *.gz set bin - autocmd BufReadPost,FileReadPost *.gz let ch_save = &ch|set ch=2 - autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip - autocmd BufReadPost,FileReadPost *.gz set nobin - autocmd BufReadPost,FileReadPost *.gz let &ch = ch_save|unlet ch_save - autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r") +"" You can toggle the syntax on/off with this command +if has("syntax_items") | syntax off | else | syntax on | endif +map :if has("syntax_items") syntax off else syntax on endif - autocmd BufWritePost,FileWritePost *.gz !mv :r - autocmd BufWritePost,FileWritePost *.gz !gzip :r +syntax on - autocmd FileAppendPre *.gz !gunzip - autocmd FileAppendPre *.gz !mv :r - autocmd FileAppendPost *.gz !mv :r - autocmd FileAppendPost *.gz !gzip :r - augroup END -endif -if &term=="xterm" - set t_Co=8 - set t_Sb=^[4%dm - set t_Sf=^[3%dm -endif +"" Set non-compatible with vi +set nocompatible -" some extra commands for HTML editing -nmap ,mh wbgueyei<ea>pa>bba -nmap ,h1 _i

A

-nmap ,h2 _i

A

-nmap ,h3 _i

A

-nmap ,h4 _i

A

-nmap ,h5 _i
A
-nmap ,h6 _i
A
-nmap ,hb wbieabb -nmap ,he wbieabb -nmap ,hi wbieabb -nmap ,hu wbieabb -nmap ,hs wbieabb -nmap ,ht wbieabb -nmap ,hx wbFf +"" Set backup extension +set backup +set backupext=.bak +"" Map for parenthesis matching +map \ %