files | main | my work environment | vi or emacs? | photos | oesi sites | good sites | fighting e-patents | signatures | last words | research | about
I used emacs for years but in 1998 I switched to vi (vim).
Here my .emacs file:
;;$Id: .emacs.in,v 1.2 1998/11/23 01:33:41 stefan Exp $
;;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;@@@@@@@@@ Stefan's Settings @@@@@@@@@@@@@@@@@@@@@
;;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;;
(custom-set-variables
'(paren-mode (quote paren) nil (paren))
'(user-mail-address "stefan@sime.com" t)
'(query-user-mail-address nil)
'(font-lock-mode t nil (font-lock)))
(custom-set-faces
'(default ((t (:size "12pt" :family "Clean"))) t)
'(font-lock-comment-face ((((class color) (background dark)) (:foreground "gray80"))))
'(holiday-face ((((class color)) (:background "BlanchedAlmond"))) t)
'(modeline ((t (:bold nil :inverse-video t :foreground "DarkRed" :background "White"))) t))
(setq calendar-week-start-day 1)
(setq cal-tex-holidays t)
(setq european-calendat-style 't)
(set-input-mode (car (current-input-mode))
(nth 1 (current-input-mode))
0)
(display-time)
(add-hook 'diary-hook 'appt-make-list)
(diary 0)
(setq ange-ftp-generate-anonymous-password "stefan@sime.com")
(setq line-number-mode t)
(setq column-number-mode t)
(setq auto-compression-mode t)
(display-time)
And here my .vimrc file:
set noeol
set hidden
set cindent
set cinkeys={,},:,0#,!^F,o,O,e
set cinoptions={.5s,}0,g0,^-2
set sw=4
set noexpandtab
set timeoutlen=100
set formatoptions=tcq2
set formatprg=par
set errorformat=%f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\ \ from\ %f:%l%m
"set directory=/var/spool/preserve
set so=5
set path=.,/usr/include,,/usr/X11/include,/usr/local/include,/opt/include
set shm=aoI
let c_minlines = 800
if v:version >= 600
set fileencodings=utf-8,latin1
set termencoding=utf-8
set encoding=utf-8
set foldmethod=syntax
endif
"let papp_include_html = 1
let perl_include_pod = 1
let perl_extended_vars = 1
let perl_sync_dist = 800
let filetype_rtn="m"
set is ru ai wa bk aw
set sws=fsync
"set bdir=/tmp/
set wh=10
set bs=2 " allow backspacing over everything in insert mode
set ai " always set autoindenting on
set tw=78 " always limit the width of text to 78
set backup " keep a backup file
set nowrap
set textwidth=999
set terse
set expandtab
"set viminfo='50,\"80 " read/write a .viminfo file, don't store more
" " than 50 lines of registers
" 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 modifiable
autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip
autocmd BufReadPost,FileReadPost *.gz set nobin
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
autocmd BufAdd * nested ball
" some more personal macros
map Q gqap
map! <illegal character 0x1b>[1~ <Home>
map <illegal character 0x1b>[1~ <Home>
map! <illegal character 0x1b>[4~ <End>
map <illegal character 0x1b>[4~ <End>
" Insert mode: Typing an opening curly bracket will insert a pair of
" curly brackets and move the cursor before the closing curly bracket:
":inoremap { {}<ESC>i
" Insert mode: Typing a closing curly bracket will jump after the next closing
" curly bracket (this assumes that curly brackets are always inserted as a pair.)
":inoremap } <ESC>/}/e+1<C-M>i
" don't unindent '#'
inoremap # X<illegal character 0x08>#
" handy for german keyboards
map ö :
map ä :up<illegal character 0x0d>
map ü za
" there is a tab at the end of the next line(!)
imap <tab> <illegal character 0x16><illegal character 0x16><illegal character 0x16>
map <illegal character 0x19> dd
map <illegal character 0x1b>^ :bn
"map . "
if 0
map <F12> :if exists("syntax_on") <Bar>
\ syntax off <Bar>
\ else <Bar>
\ syntax on <Bar>
\ set syntax=mumps <Bar>
\ endif <CR>
map <F11> :set syntax=mumps <CR>
else
" specific to the GT.M Perl project
function Codegen()
let d = getcwd()
if match(d, "/gtm_perl/")
setlocal tags=/dev/shm/work/gtm_perl/tags
setlocal makeprg=/dev/shm/work/gtm_perl/sr_perl/scripts/build\-dbg\-perl
endif
make
endfunction
map <F9> :copen <CR>
map <F10> :call Codegen() <CR>
map <F11> :cprevious <CR>
map <F12> :cnext <CR>
imap <F9> <Esc>:copen <CR>
imap <F10> <Esc>:call Codegen() <CR>
imap <F11> <Esc>:cprevious <CR>
imap <F12> <Esc>:cnext <CR>
endif
set background=dark
" 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 sequence, it's important that the line with * comes first.
autocmd BufRead * set cindent cinkeys={,},:,!^F,o,O,e cinoptions={.5s,}0,g0,^-2 sw=3 foldlevel=99
autocmd BufRead *.c,*.h,*.xs set formatoptions=croql cindent cinkeys={,},:,0#,!^F,o,O,e cinoptions={.5s,}0,g0,^-2 sw=2 comments=sr:/*,mb:*,el:*/,://
" :set cinoptions={0.5s,^-2,e-2,n-2,p2s,(0 # GNU style?
if &t_Co > 1
syntax on
endif
" @@@ ugly hack
au BufNewFile,BufRead ptest.c set makeprg=make\ -f\ ptest.mk
au BufNewFile,BufRead *.m set syn=mumps
au BufNewFile,BufRead *.xs set syn=c
au BufNewFile,BufRead *.fc set syn=c
au BufNewFile,BufRead mutt*,*.txt set tw=77 ai nocindent
au BufNewFile,BufRead mutt*,*.txt set fileencodings=utf-8
au BufNewFile,BufRead *.m set fileencodings=CSISO21GERMAN
au BufNewFile,BufRead mutt* set syn=mail
au BufReadPost,FileReadPost *.pd set syn=perl ai
set exrc
iab cdata> <![CDATA[<illegal character 0x0d>]]><illegal character 0x1b>O
iab phtml> <phtml><![CDATA[<illegal character 0x0d>]]></phtml><illegal character 0x1b>O
iab macro> <macro name=""><phtml><![CDATA[<illegal character 0x0d>]]></phtml></macro><illegal character 0x1b>k0f"a
iab module> <module name=""><phtml><![CDATA[<illegal character 0x0d>]]></phtml></module><illegal character 0x1b>k0f"a
iab callback> <callback name=""><perl><![CDATA[<illegal character 0x0d>]]></perl></callback><illegal character 0x1b>k0f"a
" au BufReadPost,FileReadPost *.papp so /opt/share/vim/vim60/syntax/papp.vim
au BufReadPost,FileReadPost *.jan so /opt/share/vim/vim60/syntax/janman.vim
" add ; to the end-of-line, unless one is already there
map ; :s/;*$/;/
" call macro q
map <illegal character 0x1b>q @q
set gfn=tixus
if !exists(":Mi")
command Mi :%!myindent
endif
function! CleverTab()
if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
return "\<Tab>"
else
return "\<C-N>"
endfunction
inoremap <Tab> <C-R>=CleverTab()<CR>
set showmatch
ball
set tags=/dev/shm/work/gtm_perl/tags
set ic
files | main | my work environment | vi or emacs? | photos | oesi sites | good sites | fighting e-patents | signatures | last words | research | about
(c) 2004 by Stefan Traby (running in
unmanaged mode - iddqd idkfa)
OESI COMES WITH ABSOLUTELY NO WARRANTY! USE HIM AT YOUR OWN
RISK!
Letzte Änderung: Wed, 24 Nov 2004 15:24:30 GMT