"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Download: http://napali.ch/stotz/config/vim.tgz " File: $HOME/.vimrc " Version: 1.0.4 " Date: 2004-07-11 " Author: Urs Stotz " Comment: Please send me suggestion for improvement " Tested on: Debian and Sun Solaris. " For vim and gvim you will need only .vimrc """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Changelog " 1.0.4 tests templates for perl and perlmodules " 1.0.3 new perl dictionary " 1.0.2 smale changes " 1.0.1 fix ttyscroll it was slowly " 1.0.0 Init Version """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " vim settings " """""""""""""""" version 6.0 " set autoindent " the same as |:set backspace=indent,eol,start| set backspace=2 " keyword completion with dictionary the command is: |i_CTRL-X_CTRL-K| set dict=~/.vim/dict/perl,~/.vim/dict/programming,~/.vim/dict/american set formatoptions=tcqr " by a compressed helpfile " set helpfile=$VIMRUNTIME/doc/help.txt.gz set incsearch " always show status line set laststatus=2 " use extended regular expressions set magic set nobackup " use Vim features set nocompatible " quiet and peaceful (your colleges thanks you) set noerrorbells " exrc is a potential security leak set noexrc " I don't like hlsearch set nohlsearch set nonumber set wrap " show the cursor position all the time set ruler " Show (partial) command in status line. set showcmd set showmode set smartindent " create new window below current one set splitbelow set suffixes=.bak,~,.swp,.o,.info,.aux,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc " Don't wrap words by default set textwidth=0 " For terminals where scrolling is very slow and redrawing is not slow. " set ttyscroll=3 set viminfo=\"200,%,'200,/100,:100,@100,f1,h,n~/.vim/viminfo " wildmenu : command-line completion operates in an enhanced mode set wildmenu """"""""""" " tabstop " """"""""""" " see :help 'tabstop' set shiftwidth=4 set tabstop=4 set smarttab set expandtab """""""""""""" " c settings " """""""""""""" set cindent set cinoptions=:0,p0,t0 set cinwords=if,else,while,do,for,switch,case """""""""""""""""" " color settings " """""""""""""""""" if !has ("gui_running") " if vim in a terminal """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " set the colors for vim on "xterm" - not necessary on all systems " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" || &term =~ "xterm" set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif " http://www-2.cs.cmu.edu/~maverick/VimColorSchemeTest/index-perl.html colorscheme default set background=dark " hi Normal ctermfg=white ctermbg=black " hi PreProc ctermfg=gray ctermbg=black else "set guifont=fixed "set guifont=Monospace\ 10 " http://www-2.cs.cmu.edu/~maverick/VimColorSchemeTest/index-perl.html colorscheme blackbeauty set background=dark " colorscheme default " set background=light " hi PreProc guifg=#c0c0c0 guibg=#000040 " hi Normal guifg=black guibg=white endif if has("syntax") && &t_Co > 2 syntax on endif """""""""" " maping " """""""""" " useful for changelog the Dateformat is in ISO8601 " map #log mq:r!date +"\%Y-\%m-\%d \%H:\%M:\%S ${USER} <${USER}@${HOSTNAME}>"`qJ map #log mq:r!date +"\%Y\%m\%dT\%k\%M\%S Urs Stotz "`qJ " map CTRL-] to \\ (useful by german keyboards) map \\ iab _PERL #!/usr/bin/perl -wuse strict; " I forget always the last digest iab _NPI 3.1415926535897932384626433832795028841972 iab _NEULER 2.7182818284590452353602874713526624977573 " Make p in Visual mode replace the selected text with the "" register. vnoremap p :let current_reg = @"gvdi=current_reg """""""""""""""""""""""""""""""""""""" " Additional settings and parameters " """""""""""""""""""""""""""""""""""""" filetype plugin on filetype indent on """""""""""" " Plugins: " """""""""""" " set ctags for the plugin taglist command is |:Tlist| see |:help taglist| let Tlist_Ctags_Cmd = '/usr/bin/ctags' " open the tags file map [I:let nr = input("Which one: ")exe "normal " . nr ."[\t" noremap :cal VimCommanderToggle() " http://www.vim.org/scripts/script.php?script_id=65 " au BufEnter * execute ":lcd " . expand("%:p:h") """""""""""""" " Templates: " """""""""""""" ":set verbose=9 " :command! -nargs=1 Templ :set ft=| :0r! ~/.vim/templates/perl % """""""""""""""""""""""""""" " Plugins in ~/.vim/plugin " """""""""""""""""""""""""""" " ~/.vim/plugin/DirDiff.vim " :DirDiff dir1 dir2 " vim ~/.vim/plugin/DirDiff.vim " " ~/.vim/plugin/MakeDoxygenComment.vim " :Dox " vim ~/.vim/plugin/MakeDoxygenComment.vim " " ~/.vim/plugin/bufexplorer.vim " \be - To start exploring in the current window " \bs - To start exploring in a newly split window " \bv - To start exploring in a newly split window " :he bufexplorer " " ~/.vim/plugin/grep.vim " :Grep - Grep for the specified pattern in the specified files " :Rgrep - Run recursive grep " :GrepBuffer - Grep for a pattern on all open buffers " :GrepArgs - Grep for a pattern on all the Vim argument filenames " :Fgrep - Run fgrep " :Rfgrep - Run recursive fgrep " :Egrep - Run egrep " :Regrep - Run recursive egrep " :Agrep - Run agrep " :Ragrep - Run recursive agrep " vim ~/.vim/plugin/grep.vim " " ~/.vim/plugin/info.vim " :Info info " vim ~/.vim/plugin/info.vim " " ~/.vim/plugin/manpageview.vim " :Man man " :he manpageview " " ~/.vim/plugin/matchit.vim " % - Cycle forward through matching groups " g% - Cycle backwards through matching groups " :he matchit " " ~/.vim/plugin/taglist.vim " :Tlist " :he taglist " " ~/.vim/plugin/tar.vim " :e foobar.tgz " vim ~/.vim/plugin/tar.vim