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