]> 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:

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