Created
September 16, 2010 21:39
-
-
Save gbelote/583222 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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> | |
"more mods by jasonkb | |
" 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=60 " keep 50 lines of command line history | |
set ruler " show the cursor position all the time | |
set hlsearch | |
" 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,.class | |
if has("autocmd") | |
" Also, support editing of gzip-compressed files. DO NOT REMOVE THIS! | |
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 | |
" scheme | |
augroup scheme | |
" Remove all gzip autocommands | |
au! | |
autocmd BufReadPre *.scm :set lisp | |
augroup END | |
endif " has ("autocmd") | |
" 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 | |
"highlight normal guifg=white guibg=black | |
set ts=5 noet | |
set whichwrap=<,>,[,] | |
"uncomment for dark bg | |
set background=dark | |
syntax on | |
set showmode | |
set title | |
" LaTeX configuration is in ~/vim/vim.latex | |
"autocmd BufNewFile *.tex source ~/vim/vimrc.latex | |
"autocmd BufRead *.tex source ~/vim/vimrc.latex | |
" source /sources/kdesdk/scripts/kde-devel-vim.vim | |
set wildmenu | |
let php_minlines = 5000 | |
set nocindent | |
set si | |
set ts=4 | |
set sw=4 | |
set noet | |
set expandtab | |
":colorscheme eveninG | |
set gfn="-misc-fixed-medium-*-*-*-12-*-*-*-*-*-*-*" | |
if has("gui_kde") | |
set guifont=Fixed\ [Jis]/10/-1/5/50/0/0/0/1/0 | |
endif | |
command! Q quit | |
command! W write | |
command! Wq wq | |
command! Wa wa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment