DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

My Favourite .vimrc Settings

06.08.2006
| 329 views |
  • submit to reddit
        set number
set linebreak
set hidden
set nobackup
set autoindent
set smartindent
set nowrap
set incsearch
set shiftwidth=4
set tabstop=4
set showmatch
set term=ansi
set tabstop=4
set history=200
set display+=lastline
set laststatus=2
set backspace=eol,indent,start
set fileencodings=latin1,utf-8,ucs-bom
set formatoptions=tcrqw
"set dir=C:\\tmp "Verzeichnis für Swapfiles Windows
"set dir=~/Library/Swapfiles/Vim "Verzeichnis für Swapfiles Mac OS X (Muss angelegt werden!)
set printoptions=duplex:off,
set statusline=%<%f\ %h%m%r%=%-14.(%l,%v%)\ %P
filetype plugin on
syntax on
command W :w

map <up> gk
imap <up> <C-o>gk
map <down> gj
imap <down> <C-o>gj
imap <home> <C-o>g<home>
imap <end> <C-o>g<end>
"Zwei Buchstaben vertauschen (Cursor auf dem vorderen Buchstaben)
nmap ; "idl"ip
"Neue Zeile im Normalmodus einfügen:
nmap <C-CR> o<ESC>k
"execute "source ~/.vim/startupscripts/ToggleCommentify.vim"
"map ç :call ToggleCommentify()<CR>j
"imap ç <ESC>:call ToggleCommentify()<CR>j
iabbrev <silent> pp echo "<pre>";print_r();echo "</pre>";<C-O>T(
iabbrev fc  for ($i = 0; $i<count(); $i++)<C-O>T(
iabbrev htmlhead <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0<CR>Transitional//EN"<CR>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><CR><html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><CR><head><CR><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><CR><title></title><CR><link rel="stylesheet" type="text/css" href="css/style.css" /><CR></head><CR><body>

nmap <F2> :Tlist<CR>
imap <F2> <C-O>:Tlist<CR>

" Colorscheme-Aenderungen
hi Pmenu guibg=#2050d0 guifg=#90fff0
hi MatchParen guibg=bg guifg=Red