]> git.madduck.net Git - etc/vim.git/blob - .vimrc

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

remove modeline that is no longer needed
[etc/vim.git] / .vimrc
1 version 7.1
2
3 " obtained from the output of :options, then postprocessed:
4 "   d2}
5 "   :%s/^ *[[:digit:]]\+/"""
6 "   qa
7 "   ma
8 "   wi<BS>\n<ESC>
9 "   /^\([^[:space:]"].*\)\?$/
10 "   k
11 "   :'a,.s/^/" /
12 "   /^[^[:space:]"]
13 "   O<ESC>
14 "   :%s,\n\n\n",\r\r"
15
16 """ important
17
18 " compatible
19 " behave very Vi compatible (not advisable)
20 "       set cp  nocp
21 set nocp
22
23 " cpoptions
24 " list of flags to specify Vi compatibility
25 "       set cpo=aABceFs
26
27 " insertmode
28 " use Insert mode as the default mode
29 "       set noim        im
30
31 " paste
32 " paste mode, insert typed text literally
33 "       set nopaste     paste
34
35 " pastetoggle
36 " key sequence to toggle paste mode
37 "       set pt=
38 set pt=<F2>
39
40 " runtimepath
41 " list of directories used for runtime files and plugins
42 "       set rtp=/home/madduck/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vimcurrent,/usr/share/vim/vimfiles/after,/home/madduck/.vim/after
43
44 " helpfile
45 " name of the main help file
46 "       set hf=/usr/share/vim/vimcurrent/doc/help.txt
47
48 """ moving around, searching and patterns
49
50 " whichwrap
51 " list of flags specifying which commands wrap to another line
52 "       (local to window)
53 "       set ww=
54 set ww=b,s,[,<,>,],~
55
56 " startofline
57 " many jump commands move the cursor to the first non-blank
58 "       character of a line
59 "       set sol nosol
60
61 " paragraphs
62 " nroff macro names that separate paragraphs
63 "       set para=IPLPPPQPP\ LIpplpipbp
64
65 " sections
66 " nroff macro names that separate sections
67 "       set sect=SHNHH\ HUnhsh
68
69 " path
70 " list of directory names used for file searching
71 "       (global or local to buffer)
72 "       set pa=.,/usr/include,,
73
74 " cdpath
75 " list of directory names used for :cd
76 "       set cd=,,
77
78 " wrapscan
79 " search commands wrap around the end of the buffer
80 "       set ws  nows
81 "set ws
82
83 " incsearch
84 " show match for partly typed search command
85 "       set nois        is
86 set is
87
88 " magic
89 " change the way backslashes are used in search patterns
90 "       set magic       nomagic
91
92 " ignorecase
93 " ignore case when using a search pattern
94 "       set noic        ic
95 set ic
96
97 " smartcase
98 " override 'ignorecase' when pattern has upper case characters
99 "       set noscs       scs
100 set scs
101
102 " casemap
103 " What method to use for changing case of letters
104 "       set cmp=internal,keepascii
105
106 " maxmempattern
107 " maximum amount of memory in Kbyte used for pattern matching
108 "       set mmp=1000
109
110 " define
111 " pattern for a macro definition line
112 "       (global or local to buffer)
113 "       set def=^\\s*#\\s*define
114
115 " include
116 " pattern for an include-file line
117 "       (local to buffer)
118 "       set inc=^\\s*#\\s*include
119
120 " includeexpr
121 " expression used to transform an include line to a file name
122 "       (local to buffer)
123 "       set inex=
124
125 """ tags
126
127 " tagbsearch
128 " use binary searching in tags files
129 "       set tbs notbs
130
131 " taglength
132 " number of significant characters in a tag name or zero
133 "       set tl=0
134
135 " tags
136 " list of file names to search for tags
137 "       (global or local to buffer)
138 "       set tag=./tags,./TAGS,tags,TAGS
139
140 " tagrelative
141 " file names in a tags file are relative to the tags file
142 "       set notr        tr
143
144 " tagstack
145 " a :tag command will use the tagstack
146 "       set tgst        notgst
147
148 " showfulltag
149 " when completing tags in Insert mode show more info
150 "       set nosft       sft
151
152 " cscopeprg
153 " command for executing cscope
154 "       set csprg=cscope
155
156 " cscopetag
157 " use cscope for tag commands
158 "       set nocst       cst
159
160 " cscopetagorder
161 " 0 or 1; the order in which ":cstag" performs a search
162 "       set csto=0
163
164 " cscopeverbose
165 " give messages when adding a cscope database
166 "       set nocsverb    csverb
167
168 " cscopepathcomp
169 " how many components of the path to show
170 "       set cspc=0
171
172 " cscopequickfix
173 " When to open a quickfix window for cscope
174 "       set csqf=
175
176 """ displaying text
177
178 " scroll
179 " number of lines to scroll for CTRL-U and CTRL-D
180 "       (local to window)
181 "       set scr=8
182
183 " scrolloff
184 " number of screen lines to show around the cursor
185 "       set so=0
186 set so=5
187
188 " wrap
189 " long lines wrap
190 "       set wrap        nowrap
191 set nowrap
192
193 " linebreak
194 " wrap long lines at a character in 'breakat'
195 "       (local to window)
196 "       set nolbr       lbr
197 " does not work with autocmd set list/nolist below
198
199 " breakat
200 " which characters might cause a line break
201 "       set brk=\ \     !@*-+;:,./?
202
203 " showbreak
204 " string to put before wrapped screen lines
205 "       set sbr=
206
207 " sidescroll
208 " minimal number of columns to scroll horizontally
209 "       set ss=0
210
211 " sidescrolloff
212 " minimal number of columns to keep left and right of the cursor
213 "       set siso=0
214 set siso=0
215
216 " display
217 " include "lastline" to show the last line even if it doesn't fit
218 "       include "uhex" to show unprintable characters as a hex number
219 "       set dy=
220 set dy=lastline,uhex
221
222 " fillchars
223 " characters to use for the status line, folds and filler lines
224 "       set fcs=vert:\|,fold:-
225
226 " cmdheight
227 " number of lines used for the command-line
228 "       set ch=1
229
230 " columns
231 " width of the display
232 "       set co=80
233
234 " lines
235 " number of lines in the display
236 "       set lines=25
237
238 " lazyredraw
239 " don't redraw while executing macros
240 "       set nolz        lz
241 set lz
242
243 " writedelay
244 " delay in msec for each char written to the display
245 "       (for debugging)
246 "       set wd=0
247
248 " list
249 " show <Tab> as ^I and end-of-line as $
250 "       (local to window)
251 "       set nolist      list
252 set list
253
254 " listchars
255 " list of strings used for list mode
256 "       set lcs=eol:$
257 set lcs=tab:⇝·,trail:·
258
259 " number
260 " show the line number for each line
261 "       (local to window)
262 "       set nonu        nu
263
264 " numberwidth
265 " number of columns to use for the line number
266 "       (local to window)
267 "       set nuw=8
268
269 """ syntax, highlighting and spelling
270
271 " background
272 " "dark" or "light"; the background color brightness
273 "       set bg=light
274
275 " filetype
276 " type of file; triggers the FileType event when set
277 "       (local to buffer)
278 "       set ft=
279
280 " syntax
281 " name of syntax highlighting used
282 "       (local to buffer)
283 "       set syn=
284
285 " synmaxcol
286 " maximum column to look for syntax items
287 "       (local to buffer)
288 "       set smc=3000
289
290 " highlight
291 " which highlighting to use for various occasions
292 "       set hl=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine
293
294 " hlsearch
295 " highlight all matches for the last used search pattern
296 "       set nohls       hls
297 set hls
298
299 " cursorcolumn
300 " highlight the screen column of the cursor
301 "       (local to window)
302 "       set nocuc       cuc
303
304 " cursorline
305 " highlight the screen line of the cursor
306 "       (local to window)
307 "       set nocul       cul
308
309 " spell
310 " highlight spelling mistakes
311 "       (local to window)
312 "       set nospell     spell
313
314 " spelllang
315 " list of accepted languages
316 "       (local to buffer)
317 "       set spl=en
318
319 " spellfile
320 " file that "zg" adds good words to
321 "       (local to buffer)
322 "       set spf=
323
324 " spellcapcheck
325 " pattern to locate the end of a sentence
326 "       (local to buffer)
327 "       set spc=[.?!]\\_[\\])'\"\       \ ]\\+
328 set spc=
329
330 " spellsuggest
331 " methods used to suggest corrections
332 "       set sps=best
333
334 " mkspellmem
335 " amount of memory used by :mkspell before compressing
336 "       set msm=460000,2000,500
337
338 """ multiple windows
339
340 " laststatus
341 " 0, 1 or 2; when to use a status line for the last window
342 "       set ls=1
343
344 " statusline
345 " alternate format to be used for a status line
346 "       set stl=
347
348 " equalalways
349 " make all windows the same size when adding/removing windows
350 "       set ea  noea
351
352 " eadirection
353 " in which direction 'equalalways' works: "ver", "hor" or "both"
354 "       set ead=both
355
356 " winheight
357 " minimal number of lines used for the current window
358 "       set wh=1
359
360 " winminheight
361 " minimal number of lines used for any window
362 "       set wmh=1
363
364 " winfixheight
365 " keep the height of the window
366 "       (local to window)
367 "       set nowfh       wfh
368
369 " winfixwidth
370 " keep the width of the window
371 "       (local to window)
372 "       set nowfw       wfw
373
374 " winwidth
375 " minimal number of columns used for the current window
376 "       set wiw=20
377
378 " winminwidth
379 " minimal number of columns used for any window
380 "       set wmw=1
381
382 " helpheight
383 " initial height of the help window
384 "       set hh=20
385
386 " previewheight
387 " default height for the preview window
388 "       set pvh=12
389
390 " previewwindow
391 " identifies the preview window
392 "       (local to window)
393 "       set nopvw       pvw
394
395 " hidden
396 " don't unload a buffer when no longer shown in a window
397 "       set nohid       hid
398
399 " switchbuf
400 " "useopen" and/or "split"; which window to use when jumping
401 "       to a buffer
402 "       set swb=
403
404 " splitbelow
405 " a new window is put below the current one
406 "       set nosb        sb
407
408 " splitright
409 " a new window is put right of the current one
410 "       set nospr       spr
411
412 " scrollbind
413 " this window scrolls together with other bound windows
414 "       (local to window)
415 "       set noscb       scb
416
417 " scrollopt
418 " "ver", "hor" and/or "jump"; list of options for 'scrollbind'
419 "       set sbo=ver,jump
420
421 """ multiple tab pages
422
423 " showtabline
424 " 0, 1 or 2; when to use a tab pages line
425 "       set stal=1
426
427 " tabpagemax
428 " maximum number of tab pages to open for -p and "tab all"
429 "       set tpm=10
430
431 " tabline
432 " custom tab pages line
433 "       set tal=
434
435 """ terminal
436
437 " term
438 " name of the used terminal
439 "       set term=rxvt-unicode
440
441 " ttytype
442 " alias for 'term'
443 "       set tty=rxvt-unicode
444
445 " ttybuiltin
446 " check built-in termcaps first
447 "       set tbi notbi
448
449 " ttyfast
450 " terminal connection is fast
451 "       set tf  notf
452
453 " weirdinvert
454 " terminal that requires extra redrawing
455 "       set nowiv       wiv
456
457 " esckeys
458 " recognize keys that start with <Esc> in Insert mode
459 "       set noek        ek
460
461 " scrolljump
462 " minimal number of lines to scroll at a time
463 "       set sj=1
464
465 " ttyscroll
466 " maximum number of lines to use scrolling instead of redrawing
467 "       set tsl=999
468
469 " title
470 " show info in the window title
471 "       set notitle     title
472 set notitle
473
474 " titlelen
475 " percentage of 'columns' used for the window title
476 "       set titlelen=85
477
478 " titlestring
479 " when not empty, string to be used for the window title
480 "       set titlestring=
481
482 " titleold
483 " string to restore the title to when exiting Vim
484 "       set titleold=Thanks\ for\ flying\ Vim
485
486 " icon
487 " set the text of the icon for this window
488 "       set noicon      icon
489
490 " iconstring
491 " when not empty, text for the icon of this window
492 "       set iconstring=
493
494 """ using the mouse
495
496 " mouse
497 " list of flags for using the mouse
498 "       set mouse=
499
500 " mousemodel
501 " "extend", "popup" or "popup_setpos"; what the right
502 "       mouse button is used for
503 "       set mousem=extend
504
505 " mousetime
506 " maximum time in msec to recognize a double-click
507 "       set mouset=500
508
509 " ttymouse
510 " "xterm", "xterm2", "dec" or "netterm"; type of mouse
511 "       set ttym=xterm
512
513 """ printing
514
515 " printoptions
516 " list of items that control the format of :hardcopy output
517 "       set popt=
518
519 " printdevice
520 " name of the printer to be used for :hardcopy
521 "       set pdev=
522
523 " printexpr
524 " expression used to print the PostScript file for :hardcopy
525 "       set pexpr=system('lpr'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -P'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error
526 set pexpr=system('lp'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -d'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error
527
528 " printfont
529 " name of the font to be used for :hardcopy
530 "       set pfn=courier
531
532 " printheader
533 " format of the header used for :hardcopy
534 "       set pheader=%<%f%h%m%=Page\ %N
535
536 " printencoding
537 " encoding used to print the PostScript file for :hardcopy
538 "       set penc=
539
540 " printmbcharset
541 " the CJK character set to be used for CJK output from :hardcopy
542 "       set pmbcs=
543
544 " printmbfont
545 " list of font names to be used for CJK output from :hardcopy
546 "       set pmbfn=
547
548 """ messages and info
549
550 " terse
551 " add 's' flag in 'shortmess' (don't show search message)
552 "       set noterse     terse
553
554 " shortmess
555 " list of flags to make messages shorter
556 "       set shm=
557 set shortmess=atTWoOI
558
559 " showcmd
560 " show (partial) command keys in the status line
561 "       set nosc        sc
562
563 " showmode
564 " display the current mode in the status line
565 "       set nosmd       smd
566
567 " ruler
568 " show cursor position below each window
569 "       set noru        ru
570 set ruler
571
572 " rulerformat
573 " alternate format to be used for the ruler
574 "       set ruf=%20(%=%-14(%l,%c%V%)\ %P%)
575
576 " report
577 " threshold for reporting number of changed lines
578 "       set report=2
579
580 " verbose
581 " the higher the more messages are given
582 "       set vbs=0
583
584 " verbosefile
585 " file to write messages in
586 "       set vfile=
587
588 " more
589 " pause listings when the screen is full
590 "       set nomore      more
591
592 " confirm
593 " start a dialog when a command fails
594 "       set nocf        cf
595
596 " errorbells
597 " ring the bell for error messages
598 "       set noeb        eb
599
600 " visualbell
601 " use a visual bell instead of beeping
602 "       set novb        vb
603
604 " helplang
605 " list of preferred languages for finding help
606 "       set hlg=en
607
608 """ selecting text
609
610 " selection
611 " "old", "inclusive" or "exclusive"; how selecting text behaves
612 "       set sel=inclusive
613
614 " selectmode
615 " "mouse", "key" and/or "cmd"; when to start Select mode
616 "       instead of Visual mode
617 "       set slm=
618
619 " keymodel
620 " "startsel" and/or "stopsel"; what special keys can do
621 "       set km=
622
623 """ editing text
624
625 " undolevels
626 " maximum number of changes that can be undone
627 "       set ul=1000
628
629 " modified
630 " changes have been made and not written to a file
631 "       (local to buffer)
632 "       set nomod       mod
633
634 " readonly
635 " buffer is not to be written
636 "       (local to buffer)
637 "       set noro        ro
638
639 " modifiable
640 " changes to the text are not possible
641 "       (local to buffer)
642 "       set ma  noma
643
644 " textwidth
645 " line length above which to break a line
646 "       (local to buffer)
647 "       set tw=0
648 set tw=78
649
650 " wrapmargin
651 " margin from the right in which to break a line
652 "       (local to buffer)
653 "       set wm=0
654
655 " backspace
656 " specifies what <BS>, CTRL-W, etc. can do in Insert mode
657 "       set bs=
658 set bs=indent,eol,start
659
660 " comments
661 " definition of what comment lines look like
662 "       (local to buffer)
663 "       set com=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
664
665 " formatoptions
666 " list of flags that tell how automatic formatting works
667 "       (local to buffer)
668 "       set fo=vt
669 set fo=tcroqn1l
670
671 " formatlistpat
672 " pattern to recognize a numbered list
673 "       (local to buffer)
674 "       set flp=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
675 let &flp='^\v\s*((\a|\d+)[\]:.)}\t/-]\s|[-\*.·→+]\s)\s*'
676
677 " formatexpr
678 " expression used for "gq" to format lines
679 "       (local to buffer)
680 "       set fex=
681
682 " complete
683 " specifies how Insert mode completion works for CTRL-N and CTRL-P
684 "       (local to buffer)
685 "       set cpt=.,w,b,u,t,i
686
687 " completeopt
688 " whether to use a popup menu for Insert mode completion
689 "       set cot=menu,preview
690
691 " pumheight
692 " maximum height of the popup menu
693 "       set ph=0
694
695 " completefunc
696 " user defined function for Insert mode completion
697 "       (local to buffer)
698 "       set cfu=
699
700 " omnifunc
701 " function for filetype-specific Insert mode completion
702 "       (local to buffer)
703 "       set ofu=
704
705 " dictionary
706 " list of dictionary files for keyword completion
707 "       (global or local to buffer)
708 "       set dict=
709
710 " thesaurus
711 " list of thesaurus files for keyword completion
712 "       (global or local to buffer)
713 "       set tsr=
714
715 " infercase
716 " adjust case of a keyword completion match
717 "       (local to buffer)
718 "       set noinf       inf
719 set inf
720
721 " digraph
722 " enable entering digraps with c1 <BS> c2
723 "       set nodg        dg
724 "set dg
725
726 " tildeop
727 " the "~" command behaves like an operator
728 "       set notop       top
729 "set tildeop
730
731 " operatorfunc
732 " function called for the"g@"  operator
733 "       set opfunc=
734
735 " showmatch
736 " When inserting a bracket, briefly jump to its match
737 "       set nosm        sm
738
739 " matchtime
740 " tenth of a second to show a match for 'showmatch'
741 "       set mat=5
742
743 " matchpairs
744 " list of pairs that match for the "%" command
745 "       (local to buffer)
746 "       set mps=(:),{:},[:]
747
748 " joinspaces
749 " use two spaces after '.' when joining a line
750 "       set js  nojs
751 set nojs
752
753 " nrformats
754 " "alpha", "octal" and/or "hex"; number formats recognized for
755 "       CTRL-A and CTRL-X commands
756 "       (local to buffer)
757 "       set nf=octal,hex
758
759 """ tabs and indenting
760
761 " tabstop
762 " number of spaces a <Tab> in the text stands for
763 "       (local to buffer)
764 "       set ts=8
765 "
766 "         You could set the 'tabstop' option to 2.  However, if you edit the file
767 "         another time, with 'tabstop' set to the default value of 8, it will look
768 "         wrong.  In other programs and when printing the indent will also be
769 "         wrong.  Therefore it is recommended to keep 'tabstop' at eight all the
770 "         time.  That's the standard value everywhere.
771 "
772 "set ts=2
773
774 " shiftwidth
775 " number of spaces used for each step of (auto)indent
776 "       (local to buffer)
777 "       set sw=8
778 set sw=2
779
780 " smarttab
781 " a <Tab> in an indent inserts 'shiftwidth' spaces
782 "       set nosta       sta
783 set sta
784
785 " softtabstop
786 " if non-zero, number of spaces to insert for a <Tab>
787 "       (local to buffer)
788 "       set sts=0
789 set sts=2
790
791 " shiftround
792 " round to 'shiftwidth' for "<<" and ">>"
793 "       set nosr        sr
794 set sr
795
796 " expandtab
797 " expand <Tab> to spaces in Insert mode
798 "       (local to buffer)
799 "       set noet        et
800 set et
801
802 " autoindent
803 " automatically set the indent of a new line
804 "       (local to buffer)
805 "       set noai        ai
806 set ai
807
808 " smartindent
809 " do clever autoindenting
810 "       (local to buffer)
811 "       set nosi        si
812
813 " cindent
814 " enable specific indenting for C code
815 "       (local to buffer)
816 "       set nocin       cin
817
818 " cinoptions
819 " options for C-indenting
820 "       (local to buffer)
821 "       set cino=
822
823 " cinkeys
824 " keys that trigger C-indenting in Insert mode
825 "       (local to buffer)
826 "       set cink=0{,0},0),:,0#,!^F,o,O,e
827
828 " cinwords
829 " list of words that cause more C-indent
830 "       (local to buffer)
831 "       set cinw=if,else,while,do,for,switch
832
833 " indentexpr
834 " expression used to obtain the indent of a line
835 "       (local to buffer)
836 "       set inde=
837
838 " indentkeys
839 " keys that trigger indenting with 'indentexpr' in Insert mode
840 "       (local to buffer)
841 "       set indk=0{,0},:,0#,!^F,o,O,e
842
843 " copyindent
844 " Copy whitespace for indenting from previous line
845 "       (local to buffer)
846 "       set noci        ci
847 set ci
848
849 " preserveindent
850 " Preserve kind of whitespace when changing indent
851 "       (local to buffer)
852 "       set nopi        pi
853 """ set pi this ABORTS < 1:7.1-135+1 (see #446268)
854 if has('patch073')
855   set pi
856 endif
857
858 " lisp
859 " enable lisp mode
860 "       (local to buffer)
861 "       set nolisp      lisp
862
863 " lispwords
864 " words that change how lisp indenting works
865 "       set lw=defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object
866
867 """ folding
868
869 " foldenable
870 " set to display all folds open
871 "       (local to window)
872 "       set fen nofen
873
874 " foldlevel
875 " folds with a level higher than this number will be closed
876 "       (local to window)
877 "       set fdl=0
878
879 " foldlevelstart
880 " value for 'foldlevel' when starting to edit a file
881 "       set fdls=-1
882
883 " foldcolumn
884 " width of the column used to indicate folds
885 "       (local to window)
886 "       set fdc=0
887
888 " foldtext
889 " expression used to display the text of a closed fold
890 "       (local to window)
891 "       set fdt=foldtext()
892
893 " foldclose
894 " set to "all" to close a fold when the cursor leaves it
895 "       set fcl=
896
897 " foldopen
898 " specifies for which commands a fold will be opened
899 "       set fdo=block,hor,mark,percent,quickfix,search,tag,undo
900
901 " foldminlines
902 " minimum number of screen lines for a fold to be closed
903 "       (local to window)
904 "       set fml=1
905
906 " commentstring
907 " template for comments; used to put the marker in
908 "       set cms=/*%s*/
909
910 " foldmethod
911 " folding type: "manual", "indent", "expr", "marker" or "syntax"
912 "       (local to window)
913 "       set fdm=manual
914 set fdm=marker
915
916 " foldexpr
917 " expression used when 'foldmethod' is "expr"
918 "       (local to window)
919 "       set fde=0
920
921 " foldignore
922 " used to ignore lines when 'foldmethod' is "indent"
923 "       (local to window)
924 "       set fdi=#
925
926 " foldmarker
927 " markers used when 'foldmethod' is "marker"
928 "       (local to window)
929 "       set fmr={{{,}}}
930
931 " foldnestmax
932 " maximum fold depth for when 'foldmethod is "indent" or "syntax"
933 "       (local to window)
934 "       set fdn=20
935
936 """ diff mode
937
938 " diff
939 " use diff mode for the current window
940 "       (local to window)
941 "       set nodiff      diff
942
943 " diffopt
944 " options for using diff mode
945 "       set dip=filler
946
947 " diffexpr
948 " expression used to obtain a diff file
949 "       set dex=
950
951 " patchexpr
952 " expression used to patch a file
953 "       set pex=
954
955 """ mapping
956
957 " maxmapdepth
958 " maximum depth of mapping
959 "       set mmd=1000
960
961 " remap
962 " recognize mappings in mapped keys
963 "       set remap       noremap
964
965 " timeout
966 " allow timing out halfway into a mapping
967 "       set to  noto
968
969 " ttimeout
970 " allow timing out halfway into a key code
971 "       set nottimeout  ttimeout
972
973 " timeoutlen
974 " time in msec for 'timeout'
975 "       set tm=1000
976
977 " ttimeoutlen
978 " time in msec for 'ttimeout'
979 "       set ttm=-1
980
981 """ reading and writing files
982
983 " modeline
984 " enable using settings from modelines when reading a file
985 "       (local to buffer)
986 "       set noml        ml
987 set ml
988
989 " modelines
990 " number of lines to check for modelines
991 "       set mls=5
992
993 " binary
994 " binary file editing
995 "       (local to buffer)
996 "       set nobin       bin
997
998 " endofline
999 " last line in the file has an end-of-line
1000 "       (local to buffer)
1001 "       set eol noeol
1002
1003 " bomb
1004 " Prepend a Byte Order Mark to the file
1005 "       (local to buffer)
1006 "       set nobomb      bomb
1007
1008 " fileformat
1009 " end-of-line format: "dos", "unix" or "mac"
1010 "       (local to buffer)
1011 "       set ff=unix
1012
1013 " fileformats
1014 " list of file formats to look for when editing a file
1015 "       set ffs=
1016
1017 " textmode
1018 " obsolete, use 'fileformat'
1019 "       (local to buffer)
1020 "       set notx        tx
1021
1022 " textauto
1023 " obsolete, use 'fileformats'
1024 "       set nota        ta
1025
1026 " write
1027 " writing files is allowed
1028 "       set write       nowrite
1029
1030 " writebackup
1031 " write a backup file before overwriting a file
1032 "       set wb  nowb
1033
1034 " backup
1035 " keep a backup after overwriting a file
1036 "       set nobk        bk
1037
1038 " backupskip
1039 " patterns that specify for which files a backup is not made
1040 "       set bsk=/tmp/*
1041
1042 " backupcopy
1043 " whether to make the backup as a copy or rename the existing file
1044 "       set bkc=yes
1045
1046 " backupdir
1047 " list of directories to put backup files in
1048 "       set bdir=.,/home/madduck/tmp,/home/madduck/
1049
1050 " backupext
1051 " file name extension for the backup file
1052 "       set bex=~
1053
1054 " autowrite
1055 " automatically write a file when leaving a modified buffer
1056 "       set noaw        aw
1057 set aw
1058
1059 " autowriteall
1060 " as 'autowrite', but works with more commands
1061 "       set noawa       awa
1062 set awa
1063
1064 " writeany
1065 " always write without asking for confirmation
1066 "       set nowa        wa
1067
1068 " autoread
1069 " automatically read a file when it was modified outside of Vim
1070 "       (global or local to buffer)
1071 "       set noar        ar
1072 set ar
1073
1074 " patchmode
1075 " keep oldest version of a file; specifies file name extension
1076 "       set pm=
1077
1078 " fsync
1079 " forcibly sync the file to disk after writing it
1080 "       set fs  nofs
1081
1082 " shortname
1083 " use 8.3 file names
1084 "       (local to buffer)
1085 "       set nosn        sn
1086
1087 """ the swap file
1088
1089 " directory
1090 " list of directories for the swap file
1091 "       set dir=.,/home/madduck/tmp,/var/tmp,/tmp
1092 set dir=.,$TMPDIR//,/var/tmp//,/tmp//
1093
1094 " swapfile
1095 " use a swap file for this buffer
1096 "       (local to buffer)
1097 "       set swf noswf
1098
1099 " swapsync
1100 " "sync", "fsync" or empty; how to flush a swap file to disk
1101 "       set sws=fsync
1102 set sws=
1103
1104 " updatecount
1105 " number of characters typed to cause a swap file update
1106 "       set uc=200
1107
1108 " updatetime
1109 " time in msec after which the swap file will be updated
1110 "       set ut=4000
1111 set ut=10000
1112
1113 " maxmem
1114 " maximum amount of memory in Kbyte used for one buffer
1115 "       set mm=1030480
1116
1117 " maxmemtot
1118 " maximum amount of memory in Kbyte used for all buffers
1119 "       set mmt=1030480
1120
1121 """ command line editing
1122
1123 " history
1124 " how many command lines are remembered 
1125 "       set hi=0
1126 set hi=100
1127
1128 " wildchar
1129 " key that triggers command-line expansion
1130 "       set wc=5
1131
1132 " wildcharm
1133 " like 'wildchar' but can also be used in a mapping
1134 "       set wcm=0
1135
1136 " wildmode
1137 " specifies how command line completion works
1138 "       set wim=full
1139 set wim=list:full
1140
1141 " suffixes
1142 " list of file name extensions that have a lower priority
1143 "       set su=.bak,~,.o,.h,.info,.swp,.obj
1144
1145 " suffixesadd
1146 " list of file name extensions added when searching for a file
1147 "       (local to buffer)
1148 "       set sua=
1149
1150 " wildignore
1151 " list of patterns to ignore files for file name completion
1152 "       set wig=
1153 set wig=*.o,*.pyc,*.pyo,*~,*.bk,*.bak
1154
1155 " wildmenu
1156 " command-line completion shows a list of matches
1157 "       set nowmnu      wmnu
1158
1159 " cedit
1160 " key used to open the command-line window
1161 "       set cedit=
1162
1163 " cmdwinheight
1164 " height of the command-line window
1165 "       set cwh=7
1166
1167 """ executing external commands
1168
1169 " shell
1170 " name of the shell program used for external commands
1171 "       set sh=/bin/zsh
1172
1173 " shellquote
1174 " character(s) to enclose a shell command in
1175 "       set shq=
1176
1177 " shellxquote
1178 " like 'shellquote' but include the redirection
1179 "       set sxq=
1180
1181 " shellcmdflag
1182 " argument for 'shell' to execute a command
1183 "       set shcf=-c
1184
1185 " shellredir
1186 " used to redirect command output to a file
1187 "       set srr=>%s\ 2>&1
1188
1189 " shelltemp
1190 " use a temp file for shell commands instead of using a pipe
1191 "       set nostmp      stmp
1192
1193 " equalprg
1194 " program used for "=" command
1195 "       (global or local to buffer)
1196 "       set ep=
1197
1198 " formatprg
1199 " program used to format lines with "gq" command
1200 "       set fp=
1201
1202 " keywordprg
1203 " program used for the "K" command
1204 "       set kp=man
1205
1206 " warn
1207 " warn when using a shell command and a buffer has changes
1208 "       set warn        nowarn
1209 set warn
1210
1211 """ running make and jumping to errors
1212
1213 " errorfile
1214 " name of the file that contains error messages
1215 "       set ef=errors.err
1216
1217 " errorformat
1218 " list of formats for error messages
1219 "       (global or local to buffer)
1220 "       set efm=%*[^\"]\"%f\"%*\\D%l:\ %m,\"%f\"%*\\D%l:\ %m,%-G%f:%l:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,%-G%f:%l:\ for\ each\ function\ it\ appears\ in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',%D%*\\a:\ Entering\ directory\ `%f',%X%*\\a:\ Leaving\ directory\ `%f',%DMaking\ %*\\a\ in\ %f,%f\|%l\|\ %m
1221
1222 " makeprg
1223 " program used for the ":make" command
1224 "       (global or local to buffer)
1225 "       set mp=make
1226
1227 " shellpipe
1228 " string used to put the output of ":make" in the error file
1229 "       set sp=2>&1\|\ tee
1230
1231 " makeef
1232 " name of the errorfile for the 'makeprg' command
1233 "       set mef=
1234
1235 " grepprg
1236 " program used for the ":grep" command
1237 "       (global or local to buffer)
1238 "       set gp=grep\ -n\ $*\ /dev/null
1239
1240 " grepformat
1241 " list of formats for output of 'grepprg'
1242 "       set gfm=%f:%l:%m,%f:%l%m,%f\ \ %l%m
1243
1244 """ language specific
1245
1246 " isfname
1247 " specifies the characters in a file name
1248 "       set isf=@,48-57,/,.,-,_,+,,,#,$,%,~,=
1249
1250 " isident
1251 " specifies the characters in an identifier
1252 "       set isi=@,48-57,_,192-255
1253
1254 " iskeyword
1255 " specifies the characters in a keyword
1256 "       (local to buffer)
1257 "       set isk=@,48-57,_
1258
1259 " isprint
1260 " specifies printable characters
1261 "       set isp=@,161-255
1262
1263 " quoteescape
1264 " specifies escape characters in a string
1265 "       (local to buffer)
1266 "       set qe=\\
1267
1268 " rightleft
1269 " display the buffer right-to-left
1270 "       (local to window)
1271 "       set norl        rl
1272
1273 " rightleftcmd
1274 " When to edit the command-line right-to-left
1275 "       (local to window)
1276 "       set rlc=search
1277
1278 " revins
1279 " Insert characters backwards
1280 "       set nori        ri
1281
1282 " allowrevins
1283 " Allow CTRL-_ in Insert and Command-line mode to toggle 'revins'
1284 "       set noari       ari
1285
1286 " aleph
1287 " the ASCII code for the first letter of the Hebrew alphabet
1288 "       set al=224
1289
1290 " hkmap
1291 " use Hebrew keyboard mapping
1292 "       set nohk        hk
1293
1294 " hkmapp
1295 " use phonetic Hebrew keyboard mapping
1296 "       set nohkp       hkp
1297
1298 " altkeymap
1299 " use Farsi as the second language when 'revins' is set
1300 "       set noakm       akm
1301
1302 " fkmap
1303 " use Farsi keyboard mapping
1304 "       set nofk        fk
1305
1306 " arabic
1307 " Prepare for editing Arabic text
1308 "       (local to window)
1309 "       set noarab      arab
1310
1311 " arabicshape
1312 " Perform shaping of Arabic characters
1313 "       set noarshape   noarshape
1314
1315 " termbidi
1316 " Terminal will perform bidi handling
1317 "       set notbidi     tbidi
1318
1319 " keymap
1320 " name of a keyboard mappping
1321 "       set kmp=
1322
1323 " langmap
1324 " translate characters for Normal mode
1325 "       set lmap=
1326
1327 " iminsert
1328 " in Insert mode: 1: use :lmap; 2: use IM; 0: neither
1329 "       (local to window)
1330 "       set imi=0
1331
1332 " imsearch
1333 " entering a search pattern: 1: use :lmap; 2: use IM; 0: neither
1334 "       (local to window)
1335 "       set ims=0
1336
1337 """ multi-byte characters
1338
1339 " encoding
1340 " character encoding used in Vim: "latin1", "utf-8"
1341 "       "euc-jp", "big5", etc.
1342 "       set enc=utf-8
1343
1344 " fileencoding
1345 " character encoding for the current file
1346 "       (local to buffer)
1347 "       set fenc=utf-8
1348
1349 " fileencodings
1350 " automatically detected character encodings
1351 "       set fencs=ucs-bom,utf-8,default,latin1
1352
1353 " termencoding
1354 " character encoding used by the terminal
1355 "       set tenc=
1356
1357 " charconvert   expression
1358 " used for character encoding conversion
1359 "       set ccv=
1360
1361 " delcombine
1362 " Delete combining (composing) characters on their own
1363 "       set nodeco      deco
1364
1365 " maxcombine
1366 " Maximum number of combining (composing) characters displayed
1367 "       set mco=2
1368
1369 " ambiwidth
1370 " Width of ambiguous width characters
1371 "       set ambw=single
1372
1373 """ various
1374
1375 " virtualedit
1376 " when to use virtual editing: "block", "insert" and/or "all"
1377 "       set ve=
1378
1379 " eventignore
1380 " list of autocommand events which are to be ignored
1381 "       set ei=
1382
1383 " loadplugins
1384 " load plugin scripts when starting up
1385 "       set nolpl       lpl
1386 set lpl
1387
1388 " exrc
1389 " enable reading .vimrc/.exrc/.gvimrc in the current directory
1390 "       set noex        ex
1391
1392 " secure
1393 " safer working with script files in the current directory
1394 "       set nosecure    secure
1395 set secure
1396
1397 " gdefault
1398 " use the 'g' flag for ":substitute"
1399 "       set nogd        gd
1400
1401 " edcompatible
1402 " 'g' and 'c' flags of ":substitute" toggle
1403 "       set noed        ed
1404
1405 " maxfuncdepth
1406 " maximum depth of function calls
1407 "       set mfd=100
1408
1409 " sessionoptions
1410 " list of words that specifies what to put in a session file
1411 "       set ssop=blank,buffers,curdir,folds,help,options,tabpages,winsize
1412
1413 " viewoptions
1414 " list of words that specifies what to save for :mkview
1415 "       set vop=folds,options,cursor
1416
1417 " viewdir
1418 " directory where to store files with :mkview
1419 "       set vdir=/home/madduck/.vim/view
1420 set vdir=$VARDIR/vim/view
1421
1422 " viminfo
1423 " list that specifies what to write in the viminfo file
1424 "       set vi=
1425 set vi=<1000,'1000,\"1000,:100,/100,@100,f1,%,!,h,n$VARDIR/vim/viminfo
1426
1427 " bufhidden
1428 " what happens with a buffer when it's no longer in a window
1429 "       (local to buffer)
1430 "       set bh=
1431
1432 " buftype
1433 " "", "nofile", "nowrite" or "quickfix": type of buffer
1434 "       (local to buffer)
1435 "       set bt=
1436
1437 " buflisted
1438 " whether the buffer shows up in the buffer list
1439 "       (local to buffer)
1440 "       set bl  nobl
1441
1442 " debug
1443 " set to "msg" to see all error messages
1444 "       set debug=
1445
1446 filetype plugin indent on
1447 syntax on
1448 colorscheme madduck
1449
1450 autocmd BufNewFile,BufRead /etc/logcheck/*.d*/* set tw=0
1451 autocmd BufNewFile,BufRead /home/madduck/debian/pkg/logcheck/*/rulefiles/linux/*.d*/* set tw=0
1452 autocmd BufNewFile,BufRead /home/madduck/.tmp/dir????? set tw=0
1453
1454 " jump to last known position in file (:he last-position-jump)
1455 autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g`\"zz" | endif
1456
1457 " leave the w mark whenever a file is written
1458 autocmd BufWrite * normal mw
1459
1460 " keep an extra backup of vimperator's ctrl-i
1461 autocmd BufWritePost */vimperator-*.tmp exe 'write ' . fnameescape((exists('$TMPDIR') ? $TMPDIR : '/tmp') . '/vimperator.ctrl-i.' . strftime('%Y.%m.%d.%H%M%S'))
1462 autocmd BufWritePost */pentadactyl.*.txt exe 'write ' . fnameescape((exists('$TMPDIR') ? $TMPDIR : '/tmp') . '/pentadactyl.ctrl-i.' . strftime('%Y.%m.%d.%H%M%S'))
1463
1464 autocmd BufRead *.vcf set filetype=vcard
1465
1466 " leave the i mark whenever we go idle (after updatetime)
1467 "augroup markidle
1468   "autocmd CursorHold * normal mi
1469   "autocmd CursorHoldI * normal mi "DISABLED while broken (shifts left)
1470 "augroup end
1471
1472 " disable list mode when inserting stuff, otherwise keep it enabled, it's
1473 " useful (see also setting lcs)
1474 augroup listinsert
1475   autocmd InsertEnter * set nolist
1476   autocmd InsertLeave * set list
1477 augroup end
1478 " flag trailing spaces as error only when not inserting
1479 augroup tsperrorinsert
1480   autocmd InsertEnter * match none /\s\+$/
1481   autocmd InsertLeave * match Error /\s\+$/
1482 augroup end
1483
1484 if &cp | set nocp | endif
1485 let s:cpo_save=&cpo
1486 set cpo&vim
1487
1488 " treat wrapped lines normally
1489 nnoremap k gk
1490 nnoremap <Up> gk
1491 inoremap <Up> <C-\><C-o>gk
1492 nnoremap j gj
1493 nnoremap <Down> gj
1494 inoremap <Down> <C-\><C-o>gj
1495
1496 " this isn't windows, screw the F1->help key
1497 map <F1> <Esc>
1498 imap <F1> <Esc>
1499 vmap <F1> <Esc>
1500
1501 " ignore Q -- Ex mode
1502 map Q <Esc>
1503
1504 let mapleader = ';'
1505 let maplocalleader = ';'
1506
1507 imap <Leader>-- –
1508 imap <Leader>--- —
1509 imap <Leader>... …
1510
1511 " replace fake tab chars with real ones
1512 map <Leader>ft :%s,⇝·*,      ,g<CR>:nohlsearch<CR>``
1513 " replace fake spaces with real ones
1514 map <Leader>fs :%s,·, ,g<CR>:nohlsearch<CR>``
1515
1516 map <Leader>sy :echo synIDattr(synID(line("."), col("."), 1), "name")<CR>
1517
1518 map <Leader>/ :nohlsearch<CR>
1519
1520 omap [{ :normal {jj<CR>
1521 nmap [{ :normal {jj<CR>
1522 omap ]} :normal }kk<CR>
1523 nmap ]} :normal }kk<CR>
1524
1525 iab sgf Sehr geehrte Frau
1526 iab sgh Sehr geehrter Herr
1527 iab sghn Sehr geehrte Herren
1528 iab lf Liebe Frau
1529 iab lh Lieber Herr
1530 iab sgdh Sehr geehrte Damen und Herren
1531 iab twimc To Whom It May Concern
1532 iab lg liebe Grüsse
1533 iab Lg Liebe Grüsse
1534 iab fg Freundliche Grüsse
1535 iab mfg Mit freundlichen Grüssen
1536 iab mbg Mit den besten Grüssen
1537 iab hg Herzliche Grüsse
1538 iab mhg Mit herzlichen Grüssen
1539 iab mbbg Mit bundesbrüderlichen Grüssen
1540 iab mvbg Mit verbandsbrüderlichen Grüssen
1541 iab vd Vielen Dank
1542 iab vld Vielen lieben Dank
1543 iab vhd Vielen herzlichen Dank
1544 iab email e-mail
1545 iab emails e-mails
1546 iab Email E-mail
1547 iab Emails E-mails
1548 iab mk Martin Krafft
1549 iab mfk Martin F. Krafft
1550 iab addr Hanfstaenglstraße 15\rD–80638 München
1551
1552 let &cpo=s:cpo_save
1553 unlet s:cpo_save
1554
1555 source $HOME/.vim/macros/table.vim
1556
1557 let g:SuperTabMappingForward = '<nul>'
1558 let g:SuperTabMappingBackward = '<s-nul>'
1559
1560 let g:is_posix = 1