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

workaround for #446268
[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/vimcurrent,/usr/share/vim/vimfiles/after,/home/madduck/.vim/after
44
45 " helpfile
46 " name of the main help file
47 "       set hf=/usr/share/vim/vimcurrent/doc/help.txt
48
49 """ moving around, searching and patterns
50
51 " whichwrap
52 " list of flags specifying which commands wrap to another line
53 "       (local to window)
54 "       set ww=
55 set ww=b,s,[,],~
56
57 " startofline
58 " many jump commands move the cursor to the first non-blank
59 "       character of a line
60 "       set sol nosol
61
62 " paragraphs
63 " nroff macro names that separate paragraphs
64 "       set para=IPLPPPQPP\ LIpplpipbp
65
66 " sections
67 " nroff macro names that separate sections
68 "       set sect=SHNHH\ HUnhsh
69
70 " path
71 " list of directory names used for file searching
72 "       (global or local to buffer)
73 "       set pa=.,/usr/include,,
74
75 " cdpath
76 " list of directory names used for :cd
77 "       set cd=,,
78
79 " wrapscan
80 " search commands wrap around the end of the buffer
81 "       set ws  nows
82 "set ws
83
84 " incsearch
85 " show match for partly typed search command
86 "       set nois        is
87 set is
88
89 " magic
90 " change the way backslashes are used in search patterns
91 "       set magic       nomagic
92
93 " ignorecase
94 " ignore case when using a search pattern
95 "       set noic        ic
96 set ic
97
98 " smartcase
99 " override 'ignorecase' when pattern has upper case characters
100 "       set noscs       scs
101 set scs
102
103 " casemap
104 " What method to use for changing case of letters
105 "       set cmp=internal,keepascii
106
107 " maxmempattern
108 " maximum amount of memory in Kbyte used for pattern matching
109 "       set mmp=1000
110
111 " define
112 " pattern for a macro definition line
113 "       (global or local to buffer)
114 "       set def=^\\s*#\\s*define
115
116 " include
117 " pattern for an include-file line
118 "       (local to buffer)
119 "       set inc=^\\s*#\\s*include
120
121 " includeexpr
122 " expression used to transform an include line to a file name
123 "       (local to buffer)
124 "       set inex=
125
126 """ tags
127
128 " tagbsearch
129 " use binary searching in tags files
130 "       set tbs notbs
131
132 " taglength
133 " number of significant characters in a tag name or zero
134 "       set tl=0
135
136 " tags
137 " list of file names to search for tags
138 "       (global or local to buffer)
139 "       set tag=./tags,./TAGS,tags,TAGS
140
141 " tagrelative
142 " file names in a tags file are relative to the tags file
143 "       set notr        tr
144
145 " tagstack
146 " a :tag command will use the tagstack
147 "       set tgst        notgst
148
149 " showfulltag
150 " when completing tags in Insert mode show more info
151 "       set nosft       sft
152
153 " cscopeprg
154 " command for executing cscope
155 "       set csprg=cscope
156
157 " cscopetag
158 " use cscope for tag commands
159 "       set nocst       cst
160
161 " cscopetagorder
162 " 0 or 1; the order in which ":cstag" performs a search
163 "       set csto=0
164
165 " cscopeverbose
166 " give messages when adding a cscope database
167 "       set nocsverb    csverb
168
169 " cscopepathcomp
170 " how many components of the path to show
171 "       set cspc=0
172
173 " cscopequickfix
174 " When to open a quickfix window for cscope
175 "       set csqf=
176
177 """ displaying text
178
179 " scroll
180 " number of lines to scroll for CTRL-U and CTRL-D
181 "       (local to window)
182 "       set scr=8
183
184 " scrolloff
185 " number of screen lines to show around the cursor
186 "       set so=0
187 set so=5
188
189 " wrap
190 " long lines wrap
191 "       set wrap        nowrap
192 set nowrap
193
194 " linebreak
195 " wrap long lines at a character in 'breakat'
196 "       (local to window)
197 "       set nolbr       lbr
198 set linebreak
199
200 " breakat
201 " which characters might cause a line break
202 "       set brk=\ \     !@*-+;:,./?
203
204 " showbreak
205 " string to put before wrapped screen lines
206 "       set sbr=
207
208 " sidescroll
209 " minimal number of columns to scroll horizontally
210 "       set ss=0
211
212 " sidescrolloff
213 " minimal number of columns to keep left and right of the cursor
214 "       set siso=0
215 set siso=0
216
217 " display
218 " include "lastline" to show the last line even if it doesn't fit
219 "       include "uhex" to show unprintable characters as a hex number
220 "       set dy=
221 set dy=lastline,uhex
222
223 " fillchars
224 " characters to use for the status line, folds and filler lines
225 "       set fcs=vert:\|,fold:-
226
227 " cmdheight
228 " number of lines used for the command-line
229 "       set ch=1
230
231 " columns
232 " width of the display
233 "       set co=80
234
235 " lines
236 " number of lines in the display
237 "       set lines=25
238
239 " lazyredraw
240 " don't redraw while executing macros
241 "       set nolz        lz
242 set lz
243
244 " writedelay
245 " delay in msec for each char written to the display
246 "       (for debugging)
247 "       set wd=0
248
249 " list
250 " show <Tab> as ^I and end-of-line as $
251 "       (local to window)
252 "       set nolist      list
253 set list
254
255 " listchars
256 " list of strings used for list mode
257 "       set lcs=eol:$
258 set lcs=tab:⇝·,trail:·
259
260 " number
261 " show the line number for each line
262 "       (local to window)
263 "       set nonu        nu
264
265 " numberwidth
266 " number of columns to use for the line number
267 "       (local to window)
268 "       set nuw=8
269
270 """ syntax, highlighting and spelling
271
272 " background
273 " "dark" or "light"; the background color brightness
274 "       set bg=light
275
276 " filetype
277 " type of file; triggers the FileType event when set
278 "       (local to buffer)
279 "       set ft=
280
281 " syntax
282 " name of syntax highlighting used
283 "       (local to buffer)
284 "       set syn=
285
286 " synmaxcol
287 " maximum column to look for syntax items
288 "       (local to buffer)
289 "       set smc=3000
290
291 " highlight
292 " which highlighting to use for various occasions
293 "       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
294
295 " hlsearch
296 " highlight all matches for the last used search pattern
297 "       set nohls       hls
298 set hls
299
300 " cursorcolumn
301 " highlight the screen column of the cursor
302 "       (local to window)
303 "       set nocuc       cuc
304
305 " cursorline
306 " highlight the screen line of the cursor
307 "       (local to window)
308 "       set nocul       cul
309
310 " spell
311 " highlight spelling mistakes
312 "       (local to window)
313 "       set nospell     spell
314
315 " spelllang
316 " list of accepted languages
317 "       (local to buffer)
318 "       set spl=en
319
320 " spellfile
321 " file that "zg" adds good words to
322 "       (local to buffer)
323 "       set spf=
324
325 " spellcapcheck
326 " pattern to locate the end of a sentence
327 "       (local to buffer)
328 "       set spc=[.?!]\\_[\\])'\"\       \ ]\\+
329 set spc=
330
331 " spellsuggest
332 " methods used to suggest corrections
333 "       set sps=best
334
335 " mkspellmem
336 " amount of memory used by :mkspell before compressing
337 "       set msm=460000,2000,500
338
339 """ multiple windows
340
341 " laststatus
342 " 0, 1 or 2; when to use a status line for the last window
343 "       set ls=1
344
345 " statusline
346 " alternate format to be used for a status line
347 "       set stl=
348
349 " equalalways
350 " make all windows the same size when adding/removing windows
351 "       set ea  noea
352
353 " eadirection
354 " in which direction 'equalalways' works: "ver", "hor" or "both"
355 "       set ead=both
356
357 " winheight
358 " minimal number of lines used for the current window
359 "       set wh=1
360
361 " winminheight
362 " minimal number of lines used for any window
363 "       set wmh=1
364
365 " winfixheight
366 " keep the height of the window
367 "       (local to window)
368 "       set nowfh       wfh
369
370 " winfixwidth
371 " keep the width of the window
372 "       (local to window)
373 "       set nowfw       wfw
374
375 " winwidth
376 " minimal number of columns used for the current window
377 "       set wiw=20
378
379 " winminwidth
380 " minimal number of columns used for any window
381 "       set wmw=1
382
383 " helpheight
384 " initial height of the help window
385 "       set hh=20
386
387 " previewheight
388 " default height for the preview window
389 "       set pvh=12
390
391 " previewwindow
392 " identifies the preview window
393 "       (local to window)
394 "       set nopvw       pvw
395
396 " hidden
397 " don't unload a buffer when no longer shown in a window
398 "       set nohid       hid
399
400 " switchbuf
401 " "useopen" and/or "split"; which window to use when jumping
402 "       to a buffer
403 "       set swb=
404
405 " splitbelow
406 " a new window is put below the current one
407 "       set nosb        sb
408
409 " splitright
410 " a new window is put right of the current one
411 "       set nospr       spr
412
413 " scrollbind
414 " this window scrolls together with other bound windows
415 "       (local to window)
416 "       set noscb       scb
417
418 " scrollopt
419 " "ver", "hor" and/or "jump"; list of options for 'scrollbind'
420 "       set sbo=ver,jump
421
422 """ multiple tab pages
423
424 " showtabline
425 " 0, 1 or 2; when to use a tab pages line
426 "       set stal=1
427
428 " tabpagemax
429 " maximum number of tab pages to open for -p and "tab all"
430 "       set tpm=10
431
432 " tabline
433 " custom tab pages line
434 "       set tal=
435
436 """ terminal
437
438 " term
439 " name of the used terminal
440 "       set term=rxvt-unicode
441
442 " ttytype
443 " alias for 'term'
444 "       set tty=rxvt-unicode
445
446 " ttybuiltin
447 " check built-in termcaps first
448 "       set tbi notbi
449
450 " ttyfast
451 " terminal connection is fast
452 "       set tf  notf
453
454 " weirdinvert
455 " terminal that requires extra redrawing
456 "       set nowiv       wiv
457
458 " esckeys
459 " recognize keys that start with <Esc> in Insert mode
460 "       set noek        ek
461
462 " scrolljump
463 " minimal number of lines to scroll at a time
464 "       set sj=1
465
466 " ttyscroll
467 " maximum number of lines to use scrolling instead of redrawing
468 "       set tsl=999
469
470 " title
471 " show info in the window title
472 "       set notitle     title
473 set notitle
474
475 " titlelen
476 " percentage of 'columns' used for the window title
477 "       set titlelen=85
478
479 " titlestring
480 " when not empty, string to be used for the window title
481 "       set titlestring=
482
483 " titleold
484 " string to restore the title to when exiting Vim
485 "       set titleold=Thanks\ for\ flying\ Vim
486
487 " icon
488 " set the text of the icon for this window
489 "       set noicon      icon
490
491 " iconstring
492 " when not empty, text for the icon of this window
493 "       set iconstring=
494
495 """ using the mouse
496
497 " mouse
498 " list of flags for using the mouse
499 "       set mouse=
500
501 " mousemodel
502 " "extend", "popup" or "popup_setpos"; what the right
503 "       mouse button is used for
504 "       set mousem=extend
505
506 " mousetime
507 " maximum time in msec to recognize a double-click
508 "       set mouset=500
509
510 " ttymouse
511 " "xterm", "xterm2", "dec" or "netterm"; type of mouse
512 "       set ttym=xterm
513
514 """ printing
515
516 " printoptions
517 " list of items that control the format of :hardcopy output
518 "       set popt=
519
520 " printdevice
521 " name of the printer to be used for :hardcopy
522 "       set pdev=
523
524 " printexpr
525 " expression used to print the PostScript file for :hardcopy
526 "       set pexpr=system('lpr'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -P'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error
527 set pexpr=system('lp'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -d'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error
528
529 " printfont
530 " name of the font to be used for :hardcopy
531 "       set pfn=courier
532
533 " printheader
534 " format of the header used for :hardcopy
535 "       set pheader=%<%f%h%m%=Page\ %N
536
537 " printencoding
538 " encoding used to print the PostScript file for :hardcopy
539 "       set penc=
540
541 " printmbcharset
542 " the CJK character set to be used for CJK output from :hardcopy
543 "       set pmbcs=
544
545 " printmbfont
546 " list of font names to be used for CJK output from :hardcopy
547 "       set pmbfn=
548
549 """ messages and info
550
551 " terse
552 " add 's' flag in 'shortmess' (don't show search message)
553 "       set noterse     terse
554
555 " shortmess
556 " list of flags to make messages shorter
557 "       set shm=
558 set shortmess=atTWoOI
559
560 " showcmd
561 " show (partial) command keys in the status line
562 "       set nosc        sc
563
564 " showmode
565 " display the current mode in the status line
566 "       set nosmd       smd
567
568 " ruler
569 " show cursor position below each window
570 "       set noru        ru
571 set ruler
572
573 " rulerformat
574 " alternate format to be used for the ruler
575 "       set ruf=%20(%=%-14(%l,%c%V%)\ %P%)
576
577 " report
578 " threshold for reporting number of changed lines
579 "       set report=2
580
581 " verbose
582 " the higher the more messages are given
583 "       set vbs=0
584
585 " verbosefile
586 " file to write messages in
587 "       set vfile=
588
589 " more
590 " pause listings when the screen is full
591 "       set nomore      more
592
593 " confirm
594 " start a dialog when a command fails
595 "       set nocf        cf
596
597 " errorbells
598 " ring the bell for error messages
599 "       set noeb        eb
600
601 " visualbell
602 " use a visual bell instead of beeping
603 "       set novb        vb
604
605 " helplang
606 " list of preferred languages for finding help
607 "       set hlg=en
608
609 """ selecting text
610
611 " selection
612 " "old", "inclusive" or "exclusive"; how selecting text behaves
613 "       set sel=inclusive
614
615 " selectmode
616 " "mouse", "key" and/or "cmd"; when to start Select mode
617 "       instead of Visual mode
618 "       set slm=
619
620 " keymodel
621 " "startsel" and/or "stopsel"; what special keys can do
622 "       set km=
623
624 """ editing text
625
626 " undolevels
627 " maximum number of changes that can be undone
628 "       set ul=1000
629
630 " modified
631 " changes have been made and not written to a file
632 "       (local to buffer)
633 "       set nomod       mod
634
635 " readonly
636 " buffer is not to be written
637 "       (local to buffer)
638 "       set noro        ro
639
640 " modifiable
641 " changes to the text are not possible
642 "       (local to buffer)
643 "       set ma  noma
644
645 " textwidth
646 " line length above which to break a line
647 "       (local to buffer)
648 "       set tw=0
649 set tw=78
650
651 " wrapmargin
652 " margin from the right in which to break a line
653 "       (local to buffer)
654 "       set wm=0
655
656 " backspace
657 " specifies what <BS>, CTRL-W, etc. can do in Insert mode
658 "       set bs=
659 set bs=indent,eol,start
660
661 " comments
662 " definition of what comment lines look like
663 "       (local to buffer)
664 "       set com=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
665
666 " formatoptions
667 " list of flags that tell how automatic formatting works
668 "       (local to buffer)
669 "       set fo=vt
670 set fo=tcroqn1l
671
672 " formatlistpat
673 " pattern to recognize a numbered list
674 "       (local to buffer)
675 "       set flp=^\\s*\\d\\+[\\]:.)}\\t\ ]\\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('patch135')
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 set fdls=1
883
884 " foldcolumn
885 " width of the column used to indicate folds
886 "       (local to window)
887 "       set fdc=0
888
889 " foldtext
890 " expression used to display the text of a closed fold
891 "       (local to window)
892 "       set fdt=foldtext()
893
894 " foldclose
895 " set to "all" to close a fold when the cursor leaves it
896 "       set fcl=
897
898 " foldopen
899 " specifies for which commands a fold will be opened
900 "       set fdo=block,hor,mark,percent,quickfix,search,tag,undo
901
902 " foldminlines
903 " minimum number of screen lines for a fold to be closed
904 "       (local to window)
905 "       set fml=1
906
907 " commentstring
908 " template for comments; used to put the marker in
909 "       set cms=/*%s*/
910
911 " foldmethod
912 " folding type: "manual", "indent", "expr", "marker" or "syntax"
913 "       (local to window)
914 "       set fdm=manual
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=.,~/tmp//,/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
1103 " updatecount
1104 " number of characters typed to cause a swap file update
1105 "       set uc=200
1106
1107 " updatetime
1108 " time in msec after which the swap file will be updated
1109 "       set ut=4000
1110
1111 " maxmem
1112 " maximum amount of memory in Kbyte used for one buffer
1113 "       set mm=1030480
1114
1115 " maxmemtot
1116 " maximum amount of memory in Kbyte used for all buffers
1117 "       set mmt=1030480
1118
1119 """ command line editing
1120
1121 " history
1122 " how many command lines are remembered 
1123 "       set hi=0
1124 set hi=100
1125
1126 " wildchar
1127 " key that triggers command-line expansion
1128 "       set wc=5
1129
1130 " wildcharm
1131 " like 'wildchar' but can also be used in a mapping
1132 "       set wcm=0
1133
1134 " wildmode
1135 " specifies how command line completion works
1136 "       set wim=full
1137 set wim=list
1138
1139 " suffixes
1140 " list of file name extensions that have a lower priority
1141 "       set su=.bak,~,.o,.h,.info,.swp,.obj
1142
1143 " suffixesadd
1144 " list of file name extensions added when searching for a file
1145 "       (local to buffer)
1146 "       set sua=
1147
1148 " wildignore
1149 " list of patterns to ignore files for file name completion
1150 "       set wig=
1151 set wig=*.o,*.pyc,*.pyo,*~,*.bk,*.bak
1152
1153 " wildmenu
1154 " command-line completion shows a list of matches
1155 "       set nowmnu      wmnu
1156
1157 " cedit
1158 " key used to open the command-line window
1159 "       set cedit=
1160
1161 " cmdwinheight
1162 " height of the command-line window
1163 "       set cwh=7
1164
1165 """ executing external commands
1166
1167 " shell
1168 " name of the shell program used for external commands
1169 "       set sh=/bin/zsh
1170
1171 " shellquote
1172 " character(s) to enclose a shell command in
1173 "       set shq=
1174
1175 " shellxquote
1176 " like 'shellquote' but include the redirection
1177 "       set sxq=
1178
1179 " shellcmdflag
1180 " argument for 'shell' to execute a command
1181 "       set shcf=-c
1182
1183 " shellredir
1184 " used to redirect command output to a file
1185 "       set srr=>%s\ 2>&1
1186
1187 " shelltemp
1188 " use a temp file for shell commands instead of using a pipe
1189 "       set nostmp      stmp
1190
1191 " equalprg
1192 " program used for "=" command
1193 "       (global or local to buffer)
1194 "       set ep=
1195
1196 " formatprg
1197 " program used to format lines with "gq" command
1198 "       set fp=
1199
1200 " keywordprg
1201 " program used for the "K" command
1202 "       set kp=man
1203
1204 " warn
1205 " warn when using a shell command and a buffer has changes
1206 "       set warn        nowarn
1207 set warn
1208
1209 """ running make and jumping to errors
1210
1211 " errorfile
1212 " name of the file that contains error messages
1213 "       set ef=errors.err
1214
1215 " errorformat
1216 " list of formats for error messages
1217 "       (global or local to buffer)
1218 "       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
1219
1220 " makeprg
1221 " program used for the ":make" command
1222 "       (global or local to buffer)
1223 "       set mp=make
1224
1225 " shellpipe
1226 " string used to put the output of ":make" in the error file
1227 "       set sp=2>&1\|\ tee
1228
1229 " makeef
1230 " name of the errorfile for the 'makeprg' command
1231 "       set mef=
1232
1233 " grepprg
1234 " program used for the ":grep" command
1235 "       (global or local to buffer)
1236 "       set gp=grep\ -n\ $*\ /dev/null
1237
1238 " grepformat
1239 " list of formats for output of 'grepprg'
1240 "       set gfm=%f:%l:%m,%f:%l%m,%f\ \ %l%m
1241
1242 """ language specific
1243
1244 " isfname
1245 " specifies the characters in a file name
1246 "       set isf=@,48-57,/,.,-,_,+,,,#,$,%,~,=
1247
1248 " isident
1249 " specifies the characters in an identifier
1250 "       set isi=@,48-57,_,192-255
1251
1252 " iskeyword
1253 " specifies the characters in a keyword
1254 "       (local to buffer)
1255 "       set isk=@,48-57,_
1256
1257 " isprint
1258 " specifies printable characters
1259 "       set isp=@,161-255
1260
1261 " quoteescape
1262 " specifies escape characters in a string
1263 "       (local to buffer)
1264 "       set qe=\\
1265
1266 " rightleft
1267 " display the buffer right-to-left
1268 "       (local to window)
1269 "       set norl        rl
1270
1271 " rightleftcmd
1272 " When to edit the command-line right-to-left
1273 "       (local to window)
1274 "       set rlc=search
1275
1276 " revins
1277 " Insert characters backwards
1278 "       set nori        ri
1279
1280 " allowrevins
1281 " Allow CTRL-_ in Insert and Command-line mode to toggle 'revins'
1282 "       set noari       ari
1283
1284 " aleph
1285 " the ASCII code for the first letter of the Hebrew alphabet
1286 "       set al=224
1287
1288 " hkmap
1289 " use Hebrew keyboard mapping
1290 "       set nohk        hk
1291
1292 " hkmapp
1293 " use phonetic Hebrew keyboard mapping
1294 "       set nohkp       hkp
1295
1296 " altkeymap
1297 " use Farsi as the second language when 'revins' is set
1298 "       set noakm       akm
1299
1300 " fkmap
1301 " use Farsi keyboard mapping
1302 "       set nofk        fk
1303
1304 " arabic
1305 " Prepare for editing Arabic text
1306 "       (local to window)
1307 "       set noarab      arab
1308
1309 " arabicshape
1310 " Perform shaping of Arabic characters
1311 "       set noarshape   noarshape
1312
1313 " termbidi
1314 " Terminal will perform bidi handling
1315 "       set notbidi     tbidi
1316
1317 " keymap
1318 " name of a keyboard mappping
1319 "       set kmp=
1320
1321 " langmap
1322 " translate characters for Normal mode
1323 "       set lmap=
1324
1325 " iminsert
1326 " in Insert mode: 1: use :lmap; 2: use IM; 0: neither
1327 "       (local to window)
1328 "       set imi=0
1329
1330 " imsearch
1331 " entering a search pattern: 1: use :lmap; 2: use IM; 0: neither
1332 "       (local to window)
1333 "       set ims=0
1334
1335 """ multi-byte characters
1336
1337 " encoding
1338 " character encoding used in Vim: "latin1", "utf-8"
1339 "       "euc-jp", "big5", etc.
1340 "       set enc=utf-8
1341
1342 " fileencoding
1343 " character encoding for the current file
1344 "       (local to buffer)
1345 "       set fenc=utf-8
1346
1347 " fileencodings
1348 " automatically detected character encodings
1349 "       set fencs=ucs-bom,utf-8,default,latin1
1350
1351 " termencoding
1352 " character encoding used by the terminal
1353 "       set tenc=
1354
1355 " charconvert   expression
1356 " used for character encoding conversion
1357 "       set ccv=
1358
1359 " delcombine
1360 " Delete combining (composing) characters on their own
1361 "       set nodeco      deco
1362
1363 " maxcombine
1364 " Maximum number of combining (composing) characters displayed
1365 "       set mco=2
1366
1367 " ambiwidth
1368 " Width of ambiguous width characters
1369 "       set ambw=single
1370
1371 """ various
1372
1373 " virtualedit
1374 " when to use virtual editing: "block", "insert" and/or "all"
1375 "       set ve=
1376
1377 " eventignore
1378 " list of autocommand events which are to be ignored
1379 "       set ei=
1380
1381 " loadplugins
1382 " load plugin scripts when starting up
1383 "       set nolpl       lpl
1384 set lpl
1385
1386 " exrc
1387 " enable reading .vimrc/.exrc/.gvimrc in the current directory
1388 "       set noex        ex
1389
1390 " secure
1391 " safer working with script files in the current directory
1392 "       set nosecure    secure
1393 set secure
1394
1395 " gdefault
1396 " use the 'g' flag for ":substitute"
1397 "       set nogd        gd
1398
1399 " edcompatible
1400 " 'g' and 'c' flags of ":substitute" toggle
1401 "       set noed        ed
1402
1403 " maxfuncdepth
1404 " maximum depth of function calls
1405 "       set mfd=100
1406
1407 " sessionoptions
1408 " list of words that specifies what to put in a session file
1409 "       set ssop=blank,buffers,curdir,folds,help,options,tabpages,winsize
1410
1411 " viewoptions
1412 " list of words that specifies what to save for :mkview
1413 "       set vop=folds,options,cursor
1414
1415 " viewdir
1416 " directory where to store files with :mkview
1417 "       set vdir=/home/madduck/.vim/view
1418 set vdir=$VAR/vim/view
1419
1420 " viminfo
1421 " list that specifies what to write in the viminfo file
1422 "       set vi=
1423 set vi='1000,f1,\"1000,:20,/20,%,!,h,n$VAR/vim/viminfo
1424
1425 " bufhidden
1426 " what happens with a buffer when it's no longer in a window
1427 "       (local to buffer)
1428 "       set bh=
1429
1430 " buftype
1431 " "", "nofile", "nowrite" or "quickfix": type of buffer
1432 "       (local to buffer)
1433 "       set bt=
1434
1435 " buflisted
1436 " whether the buffer shows up in the buffer list
1437 "       (local to buffer)
1438 "       set bl  nobl
1439
1440 " debug
1441 " set to "msg" to see all error messages
1442 "       set debug=
1443
1444 filetype plugin indent on
1445 syntax on
1446 colorscheme madduck
1447
1448 autocmd BufNewFile,BufRead /etc/logcheck/*.d*/* set tw=0
1449 autocmd BufNewFile,BufRead /home/madduck/debian/pkg/logcheck/*/rulefiles/linux/*.d*/* set tw=0
1450
1451 " jump to last known position in file (:he last-position-jump)
1452 autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"zz" | endif
1453
1454 " disable list mode when inserting stuff, otherwise keep it enabled, it's
1455 " useful
1456 augroup listinsert
1457   autocmd InsertEnter * set nolist
1458   autocmd InsertLeave * set list
1459 augroup end
1460
1461 if &cp | set nocp | endif
1462 let s:cpo_save=&cpo
1463 set cpo&vim
1464
1465 " treat wrapped lines normally
1466 map k gk
1467 map <Up> gk
1468 map j gj
1469 map <Down> gj
1470
1471 " this isn't windows, screw the F1->help key
1472 "map <F1> <Esc>
1473 "imap <F1> <Esc>
1474 "vmap <F1> <Esc>
1475
1476 " ignore Q -- Ex mode
1477 map Q <Esc>
1478
1479 imap <Leader>-- –
1480 imap <Leader>--- —
1481 imap <Leader>... …
1482
1483 iab sgf Sehr geehrte Frau
1484 iab sgh Sehr geehrter Herr
1485 iab lf Liebe Frau
1486 iab lh Lieber Herr
1487 iab sgdh Sehr geehrte Damen und Herren
1488 iab twimc To Whom It May Concern
1489 iab lg liebe Grüsse
1490 iab Lg Liebe Grüsse
1491 iab fg Freundliche Grüsse
1492 iab mfg Mit freundlichen Grüssen
1493 iab mbbg Mit bundesbrüderlichen Grüßen
1494 iab mvbg Mit verbandsbrüderlichen Grüßen
1495 iab vd Vielen Dank
1496 iab vld Vielen lieben Dank
1497
1498 let &cpo=s:cpo_save
1499 unlet s:cpo_save