diff options
author | Achim Gottinger <achim@gentoo.org> | 2001-05-13 11:31:48 +0000 |
---|---|---|
committer | Achim Gottinger <achim@gentoo.org> | 2001-05-13 11:31:48 +0000 |
commit | a8a5473cb29c44cccc5a07001e0f724a269b9fab (patch) | |
tree | 3f831621ade64bb9f0066cec092b2c8236180c27 /sys-apps | |
parent | Fixes (diff) | |
download | gentoo-2-a8a5473cb29c44cccc5a07001e0f724a269b9fab.tar.gz gentoo-2-a8a5473cb29c44cccc5a07001e0f724a269b9fab.tar.bz2 gentoo-2-a8a5473cb29c44cccc5a07001e0f724a269b9fab.zip |
Added vimrc
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/vim-nogui/files/vimrc | 122 | ||||
-rw-r--r-- | sys-apps/vim-nogui/vim-nogui-5.7-r4.ebuild | 12 |
2 files changed, 130 insertions, 4 deletions
diff --git a/sys-apps/vim-nogui/files/vimrc b/sys-apps/vim-nogui/files/vimrc new file mode 100644 index 000000000000..d7eb52433582 --- /dev/null +++ b/sys-apps/vim-nogui/files/vimrc @@ -0,0 +1,122 @@ +" Configuration file for gvim +" Written for Debian GNU/Linux by W.Akkerman <wakkerma@debian.org> +" Some modifications by J.H.M. Dassen <jdassen@wi.LeidenUniv.nl> + + +" Normally we use vim-extensions. If you want true vi-compatibility +" remove change the following statements +set nocompatible " Use Vim defaults (much better!) +set backspace=2 " allow backspacing over everything in insert mode +" Now we set some defaults for the editor +set autoindent " always set autoindenting on +set textwidth=0 " Don't wrap words by default +set nobackup " Don't 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 + +" Suffixes that get lower priority when doing tab completion for filenames. +" These are files we are not likely to want to edit or read. +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc + +" We know xterm-debian is a color terminal +if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" + set t_Co=16 + set t_Sf=[3%dm + set t_Sb=[4%dm +endif + +" Vim5 comes with syntaxhighlighting. If you want to enable syntaxhightlighting +" by default uncomment the next three lines. +"if has("syntax") +" syntax on " Default to no syntax highlightning +"endif + +" Debian uses compressed helpfiles. We must inform vim that the main +" helpfiles is compressed. Other helpfiles are stated in the tags-file. +set helpfile=$VIMRUNTIME/doc/help.txt.gz + +if has("autocmd") + +" Set some sensible defaults for editing C-files +augroup cprog + " Remove all cprog autocommands + au! + + " When starting to edit a file: + " For *.c and *.h 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 BufRead * set formatoptions=tcql nocindent comments& + autocmd BufRead *.c,*.h set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,:// +augroup END + +" Also, support editing of gzip-compressed files. DO NOT REMOVE THIS! +" This is also used when loading the compressed helpfiles. +augroup gzip + " Remove all gzip autocommands + au! + + " 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 BufReadPre,FileReadPre *.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") + + autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r + autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r + + autocmd FileAppendPre *.gz !gunzip <afile> + autocmd FileAppendPre *.gz !mv <afile>:r <afile> + autocmd FileAppendPost *.gz !mv <afile> <afile>:r + autocmd FileAppendPost *.gz !gzip <afile>:r +augroup END + +augroup bzip2 + " Remove all bzip2 autocommands + au! + + " Enable editing of bzipped 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 *.bz2 set bin + autocmd BufReadPre,FileReadPre *.bz2 let ch_save = &ch|set ch=2 + autocmd BufReadPost,FileReadPost *.bz2 |'[,']!bunzip2 + autocmd BufReadPost,FileReadPost *.bz2 let &ch = ch_save|unlet ch_save + autocmd BufReadPost,FileReadPost *.bz2 execute ":doautocmd BufReadPost " . expand("%:r") + + autocmd BufWritePost,FileWritePost *.bz2 !mv <afile> <afile>:r + autocmd BufWritePost,FileWritePost *.bz2 !bzip2 <afile>:r + + autocmd FileAppendPre *.bz2 !bunzip2 <afile> + autocmd FileAppendPre *.bz2 !mv <afile>:r <afile> + autocmd FileAppendPost *.bz2 !mv <afile> <afile>:r + autocmd FileAppendPost *.bz2 !bzip2 -9 --repetitive-best <afile>:r +augroup END + +endif " has ("autocmd") + +" Some Debian-specific things +augroup filetype + au BufRead reportbug.* set ft=mail +augroup END + +" The following are commented out as they cause vim to behave a lot +" different from regular vi. They are highly recommended though. +"set showcmd " Show (partial) command in status line. +"set showmatch " Show matching brackets. +"set ignorecase " Do case insensitive matching +"set incsearch " Incremental search +"set autowrite " Automatically save before commands like :next and :make + + + diff --git a/sys-apps/vim-nogui/vim-nogui-5.7-r4.ebuild b/sys-apps/vim-nogui/vim-nogui-5.7-r4.ebuild index a76274c2b7fe..bc17fcfb7717 100644 --- a/sys-apps/vim-nogui/vim-nogui-5.7-r4.ebuild +++ b/sys-apps/vim-nogui/vim-nogui-5.7-r4.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Daniel Robbins <drobbins@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/sys-apps/vim-nogui/vim-nogui-5.7-r4.ebuild,v 1.2 2001/05/13 11:18:01 achim Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/vim-nogui/vim-nogui-5.7-r4.ebuild,v 1.3 2001/05/13 11:31:48 achim Exp $ A="vim-5.7-src.tar.gz vim-5.7-rt.tar.gz" S=${WORKDIR}/vim-5.7 @@ -37,14 +37,18 @@ src_install() { try make prefix=${D}/usr MANDIR=${D}/usr/share/man STRIP=echo install dodoc README* - + insinto /root + newins ${FILESDIR}/vimrc .vimrc if [ "`use build`" ] ; then - rm -r ${D}/usr/share/{man,vim,doc} + rm -r ${D}/usr/share/{man,doc} + rm -r ${D}/usr/share/vim/vim57/{tutor,doc} else cd ${D}/usr/share/doc/${PF} ln -s ../../vim/vim57/doc ${P} + insinto /etc/skel + newins ${FILESDIR}/vimrc .vimrc fi - + cd ${D}/usr/bin ln -s vim vi dosed "s:/usr/bin/nawk:/usr/bin/awk:" /usr/share/vim/vim57/tools/mve.awk |