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

increase updatetime to 10s
[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 " does not work with autocmd set list/nolist below
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 set flp=^\\s*\\d\\+[\\]:.)}]\\s*
677
678 " formatexpr
679 " expression used for "gq" to format lines
680 "       (local to buffer)
681 "       set fex=
682
683 " complete
684 " specifies how Insert mode completion works for CTRL-N and CTRL-P
685 "       (local to buffer)
686 "       set cpt=.,w,b,u,t,i
687
688 " completeopt
689 " whether to use a popup menu for Insert mode completion
690 "       set cot=menu,preview
691
692 " pumheight
693 " maximum height of the popup menu
694 "       set ph=0
695
696 " completefunc
697 " user defined function for Insert mode completion
698 "       (local to buffer)
699 "       set cfu=
700
701 " omnifunc
702 " function for filetype-specific Insert mode completion
703 "       (local to buffer)
704 "       set ofu=
705
706 " dictionary
707 " list of dictionary files for keyword completion
708 "       (global or local to buffer)
709 "       set dict=
710
711 " thesaurus
712 " list of thesaurus files for keyword completion
713 "       (global or local to buffer)
714 "       set tsr=
715
716 " infercase
717 " adjust case of a keyword completion match
718 "       (local to buffer)
719 "       set noinf       inf
720 set inf
721
722 " digraph
723 " enable entering digraps with c1 <BS> c2
724 "       set nodg        dg
725 "set dg
726
727 " tildeop
728 " the "~" command behaves like an operator
729 "       set notop       top
730 "set tildeop
731
732 " operatorfunc
733 " function called for the"g@"  operator
734 "       set opfunc=
735
736 " showmatch
737 " When inserting a bracket, briefly jump to its match
738 "       set nosm        sm
739
740 " matchtime
741 " tenth of a second to show a match for 'showmatch'
742 "       set mat=5
743
744 " matchpairs
745 " list of pairs that match for the "%" command
746 "       (local to buffer)
747 "       set mps=(:),{:},[:]
748
749 " joinspaces
750 " use two spaces after '.' when joining a line
751 "       set js  nojs
752 set nojs
753
754 " nrformats
755 " "alpha", "octal" and/or "hex"; number formats recognized for
756 "       CTRL-A and CTRL-X commands
757 "       (local to buffer)
758 "       set nf=octal,hex
759
760 """ tabs and indenting
761
762 " tabstop
763 " number of spaces a <Tab> in the text stands for
764 "       (local to buffer)
765 "       set ts=8
766 "
767 "         You could set the 'tabstop' option to 2.  However, if you edit the file
768 "         another time, with 'tabstop' set to the default value of 8, it will look
769 "         wrong.  In other programs and when printing the indent will also be
770 "         wrong.  Therefore it is recommended to keep 'tabstop' at eight all the
771 "         time.  That's the standard value everywhere.
772 "
773 "set ts=2
774
775 " shiftwidth
776 " number of spaces used for each step of (auto)indent
777 "       (local to buffer)
778 "       set sw=8
779 set sw=2
780
781 " smarttab
782 " a <Tab> in an indent inserts 'shiftwidth' spaces
783 "       set nosta       sta
784 set sta
785
786 " softtabstop
787 " if non-zero, number of spaces to insert for a <Tab>
788 "       (local to buffer)
789 "       set sts=0
790 set sts=2
791
792 " shiftround
793 " round to 'shiftwidth' for "<<" and ">>"
794 "       set nosr        sr
795 set sr
796
797 " expandtab
798 " expand <Tab> to spaces in Insert mode
799 "       (local to buffer)
800 "       set noet        et
801 set et
802
803 " autoindent
804 " automatically set the indent of a new line
805 "       (local to buffer)
806 "       set noai        ai
807 set ai
808
809 " smartindent
810 " do clever autoindenting
811 "       (local to buffer)
812 "       set nosi        si
813
814 " cindent
815 " enable specific indenting for C code
816 "       (local to buffer)
817 "       set nocin       cin
818
819 " cinoptions
820 " options for C-indenting
821 "       (local to buffer)
822 "       set cino=
823
824 " cinkeys
825 " keys that trigger C-indenting in Insert mode
826 "       (local to buffer)
827 "       set cink=0{,0},0),:,0#,!^F,o,O,e
828
829 " cinwords
830 " list of words that cause more C-indent
831 "       (local to buffer)
832 "       set cinw=if,else,while,do,for,switch
833
834 " indentexpr
835 " expression used to obtain the indent of a line
836 "       (local to buffer)
837 "       set inde=
838
839 " indentkeys
840 " keys that trigger indenting with 'indentexpr' in Insert mode
841 "       (local to buffer)
842 "       set indk=0{,0},:,0#,!^F,o,O,e
843
844 " copyindent
845 " Copy whitespace for indenting from previous line
846 "       (local to buffer)
847 "       set noci        ci
848 set ci
849
850 " preserveindent
851 " Preserve kind of whitespace when changing indent
852 "       (local to buffer)
853 "       set nopi        pi
854 """ set pi this ABORTS < 1:7.1-135+1 (see #446268)
855 if has('patch073')
856   set pi
857 endif
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
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 set fdm=marker
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=.,$TMPDIR//,/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 set ut=10000
1112
1113 " maxmem
1114 " maximum amount of memory in Kbyte used for one buffer
1115 "       set mm=1030480
1116
1117 " maxmemtot
1118 " maximum amount of memory in Kbyte used for all buffers
1119 "       set mmt=1030480
1120
1121 """ command line editing
1122
1123 " history
1124 " how many command lines are remembered 
1125 "       set hi=0
1126 set hi=100
1127
1128 " wildchar
1129 " key that triggers command-line expansion
1130 "       set wc=5
1131
1132 " wildcharm
1133 " like 'wildchar' but can also be used in a mapping
1134 "       set wcm=0
1135
1136 " wildmode
1137 " specifies how command line completion works
1138 "       set wim=full
1139 set wim=list:full
1140
1141 " suffixes
1142 " list of file name extensions that have a lower priority
1143 "       set su=.bak,~,.o,.h,.info,.swp,.obj
1144
1145 " suffixesadd
1146 " list of file name extensions added when searching for a file
1147 "       (local to buffer)
1148 "       set sua=
1149
1150 " wildignore
1151 " list of patterns to ignore files for file name completion
1152 "       set wig=
1153 set wig=*.o,*.pyc,*.pyo,*~,*.bk,*.bak
1154
1155 " wildmenu
1156 " command-line completion shows a list of matches
1157 "       set nowmnu      wmnu
1158
1159 " cedit
1160 " key used to open the command-line window
1161 "       set cedit=
1162
1163 " cmdwinheight
1164 " height of the command-line window
1165 "       set cwh=7
1166
1167 """ executing external commands
1168
1169 " shell
1170 " name of the shell program used for external commands
1171 "       set sh=/bin/zsh
1172
1173 " shellquote
1174 " character(s) to enclose a shell command in
1175 "       set shq=
1176
1177 " shellxquote
1178 " like 'shellquote' but include the redirection
1179 "       set sxq=
1180
1181 " shellcmdflag
1182 " argument for 'shell' to execute a command
1183 "       set shcf=-c
1184
1185 " shellredir
1186 " used to redirect command output to a file
1187 "       set srr=>%s\ 2>&1
1188
1189 " shelltemp
1190 " use a temp file for shell commands instead of using a pipe
1191 "       set nostmp      stmp
1192
1193 " equalprg
1194 " program used for "=" command
1195 "       (global or local to buffer)
1196 "       set ep=
1197
1198 " formatprg
1199 " program used to format lines with "gq" command
1200 "       set fp=
1201
1202 " keywordprg
1203 " program used for the "K" command
1204 "       set kp=man
1205
1206 " warn
1207 " warn when using a shell command and a buffer has changes
1208 "       set warn        nowarn
1209 set warn
1210
1211 """ running make and jumping to errors
1212
1213 " errorfile
1214 " name of the file that contains error messages
1215 "       set ef=errors.err
1216
1217 " errorformat
1218 " list of formats for error messages
1219 "       (global or local to buffer)
1220 "       set efm=%*[^\"]\"%f\"%*\\D%l:\ %m,\"%f\"%*\\D%l:\ %m,%-G%f:%l:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,%-G%f:%l:\ for\ each\ function\ it\ appears\ in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',%D%*\\a:\ Entering\ directory\ `%f',%X%*\\a:\ Leaving\ directory\ `%f',%DMaking\ %*\\a\ in\ %f,%f\|%l\|\ %m
1221
1222 " makeprg
1223 " program used for the ":make" command
1224 "       (global or local to buffer)
1225 "       set mp=make
1226
1227 " shellpipe
1228 " string used to put the output of ":make" in the error file
1229 "       set sp=2>&1\|\ tee
1230
1231 " makeef
1232 " name of the errorfile for the 'makeprg' command
1233 "       set mef=
1234
1235 " grepprg
1236 " program used for the ":grep" command
1237 "       (global or local to buffer)
1238 "       set gp=grep\ -n\ $*\ /dev/null
1239
1240 " grepformat
1241 " list of formats for output of 'grepprg'
1242 "       set gfm=%f:%l:%m,%f:%l%m,%f\ \ %l%m
1243
1244 """ language specific
1245
1246 " isfname
1247 " specifies the characters in a file name
1248 "       set isf=@,48-57,/,.,-,_,+,,,#,$,%,~,=
1249
1250 " isident
1251 " specifies the characters in an identifier
1252 "       set isi=@,48-57,_,192-255
1253
1254 " iskeyword
1255 " specifies the characters in a keyword
1256 "       (local to buffer)
1257 "       set isk=@,48-57,_
1258
1259 " isprint
1260 " specifies printable characters
1261 "       set isp=@,161-255
1262
1263 " quoteescape
1264 " specifies escape characters in a string
1265 "       (local to buffer)
1266 "       set qe=\\
1267
1268 " rightleft
1269 " display the buffer right-to-left
1270 "       (local to window)
1271 "       set norl        rl
1272
1273 " rightleftcmd
1274 " When to edit the command-line right-to-left
1275 "       (local to window)
1276 "       set rlc=search
1277
1278 " revins
1279 " Insert characters backwards
1280 "       set nori        ri
1281
1282 " allowrevins
1283 " Allow CTRL-_ in Insert and Command-line mode to toggle 'revins'
1284 "       set noari       ari
1285
1286 " aleph
1287 " the ASCII code for the first letter of the Hebrew alphabet
1288 "       set al=224
1289
1290 " hkmap
1291 " use Hebrew keyboard mapping
1292 "       set nohk        hk
1293
1294 " hkmapp
1295 " use phonetic Hebrew keyboard mapping
1296 "       set nohkp       hkp
1297
1298 " altkeymap
1299 " use Farsi as the second language when 'revins' is set
1300 "       set noakm       akm
1301
1302 " fkmap
1303 " use Farsi keyboard mapping
1304 "       set nofk        fk
1305
1306 " arabic
1307 " Prepare for editing Arabic text
1308 "       (local to window)
1309 "       set noarab      arab
1310
1311 " arabicshape
1312 " Perform shaping of Arabic characters
1313 "       set noarshape   noarshape
1314
1315 " termbidi
1316 " Terminal will perform bidi handling
1317 "       set notbidi     tbidi
1318
1319 " keymap
1320 " name of a keyboard mappping
1321 "       set kmp=
1322
1323 " langmap
1324 " translate characters for Normal mode
1325 "       set lmap=
1326
1327 " iminsert
1328 " in Insert mode: 1: use :lmap; 2: use IM; 0: neither
1329 "       (local to window)
1330 "       set imi=0
1331
1332 " imsearch
1333 " entering a search pattern: 1: use :lmap; 2: use IM; 0: neither
1334 "       (local to window)
1335 "       set ims=0
1336
1337 """ multi-byte characters
1338
1339 " encoding
1340 " character encoding used in Vim: "latin1", "utf-8"
1341 "       "euc-jp", "big5", etc.
1342 "       set enc=utf-8
1343
1344 " fileencoding
1345 " character encoding for the current file
1346 "       (local to buffer)
1347 "       set fenc=utf-8
1348
1349 " fileencodings
1350 " automatically detected character encodings
1351 "       set fencs=ucs-bom,utf-8,default,latin1
1352
1353 " termencoding
1354 " character encoding used by the terminal
1355 "       set tenc=
1356
1357 " charconvert   expression
1358 " used for character encoding conversion
1359 "       set ccv=
1360
1361 " delcombine
1362 " Delete combining (composing) characters on their own
1363 "       set nodeco      deco
1364
1365 " maxcombine
1366 " Maximum number of combining (composing) characters displayed
1367 "       set mco=2
1368
1369 " ambiwidth
1370 " Width of ambiguous width characters
1371 "       set ambw=single
1372
1373 """ various
1374
1375 " virtualedit
1376 " when to use virtual editing: "block", "insert" and/or "all"
1377 "       set ve=
1378
1379 " eventignore
1380 " list of autocommand events which are to be ignored
1381 "       set ei=
1382
1383 " loadplugins
1384 " load plugin scripts when starting up
1385 "       set nolpl       lpl
1386 set lpl
1387
1388 " exrc
1389 " enable reading .vimrc/.exrc/.gvimrc in the current directory
1390 "       set noex        ex
1391
1392 " secure
1393 " safer working with script files in the current directory
1394 "       set nosecure    secure
1395 set secure
1396
1397 " gdefault
1398 " use the 'g' flag for ":substitute"
1399 "       set nogd        gd
1400
1401 " edcompatible
1402 " 'g' and 'c' flags of ":substitute" toggle
1403 "       set noed        ed
1404
1405 " maxfuncdepth
1406 " maximum depth of function calls
1407 "       set mfd=100
1408
1409 " sessionoptions
1410 " list of words that specifies what to put in a session file
1411 "       set ssop=blank,buffers,curdir,folds,help,options,tabpages,winsize
1412
1413 " viewoptions
1414 " list of words that specifies what to save for :mkview
1415 "       set vop=folds,options,cursor
1416
1417 " viewdir
1418 " directory where to store files with :mkview
1419 "       set vdir=/home/madduck/.vim/view
1420 set vdir=$VARDIR/vim/view
1421
1422 " viminfo
1423 " list that specifies what to write in the viminfo file
1424 "       set vi=
1425 set vi='1000,f1,\"1000,:20,/20,%,!,h,n$VARDIR/vim/viminfo
1426
1427 " bufhidden
1428 " what happens with a buffer when it's no longer in a window
1429 "       (local to buffer)
1430 "       set bh=
1431
1432 " buftype
1433 " "", "nofile", "nowrite" or "quickfix": type of buffer
1434 "       (local to buffer)
1435 "       set bt=
1436
1437 " buflisted
1438 " whether the buffer shows up in the buffer list
1439 "       (local to buffer)
1440 "       set bl  nobl
1441
1442 " debug
1443 " set to "msg" to see all error messages
1444 "       set debug=
1445
1446 filetype plugin indent on
1447 syntax on
1448 colorscheme madduck
1449
1450 autocmd BufNewFile,BufRead /etc/logcheck/*.d*/* set tw=0
1451 autocmd BufNewFile,BufRead /home/madduck/debian/pkg/logcheck/*/rulefiles/linux/*.d*/* set tw=0
1452
1453 " jump to last known position in file (:he last-position-jump)
1454 autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g`\"zz" | endif
1455
1456 " disable list mode when inserting stuff, otherwise keep it enabled, it's
1457 " useful (see also setting lcs)
1458 augroup listinsert
1459   autocmd InsertEnter * set nolist
1460   autocmd InsertLeave * set list
1461 augroup end
1462 " flag trailing spaces as error only when not inserting
1463 augroup tsperrorinsert
1464   autocmd InsertEnter * match none /\s\+$/
1465   autocmd InsertLeave * match Error /\s\+$/
1466 augroup end
1467
1468 if &cp | set nocp | endif
1469 let s:cpo_save=&cpo
1470 set cpo&vim
1471
1472 " treat wrapped lines normally
1473 nnoremap k gk
1474 nnoremap <Up> gk
1475 inoremap <Up> <C-\><C-o>gk
1476 nnoremap j gj
1477 nnoremap <Down> gj
1478 inoremap <Down> <C-\><C-o>gj
1479
1480 " this isn't windows, screw the F1->help key
1481 map <F1> <Esc>
1482 imap <F1> <Esc>
1483 vmap <F1> <Esc>
1484
1485 " ignore Q -- Ex mode
1486 map Q <Esc>
1487
1488 let mapleader = ';'
1489 let maplocalleader = ';'
1490
1491 imap <Leader>-- –
1492 imap <Leader>--- —
1493 imap <Leader>... …
1494
1495 " replace fake tab chars with real ones
1496 map <Leader>ft :%s,⇝·*,      ,g<CR>:nohlsearch<CR>``
1497 " replace fake spaces with real ones
1498 map <Leader>fs :%s,·, ,g<CR>:nohlsearch<CR>``
1499
1500 map <Leader>sy :echo synIDattr(synID(line("."), col("."), 1), "name")<CR>
1501
1502 map <Leader>/ :nohlsearch<CR>
1503
1504 omap [{ :normal {jj<CR>
1505 nmap [{ :normal {jj<CR>
1506 omap ]} :normal }kk<CR>
1507 nmap ]} :normal }kk<CR>
1508
1509 iab sgf Sehr geehrte Frau
1510 iab sgh Sehr geehrter Herr
1511 iab lf Liebe Frau
1512 iab lh Lieber Herr
1513 iab sgdh Sehr geehrte Damen und Herren
1514 iab twimc To Whom It May Concern
1515 iab lg liebe Grüsse
1516 iab Lg Liebe Grüsse
1517 iab fg Freundliche Grüsse
1518 iab mfg Mit freundlichen Grüssen
1519 iab mbbg Mit bundesbrüderlichen Grüßen
1520 iab mvbg Mit verbandsbrüderlichen Grüßen
1521 iab vd Vielen Dank
1522 iab vld Vielen lieben Dank
1523 iab email e-mail
1524 iab emails e-mails
1525 iab Email E-mail
1526 iab Emails E-mails
1527
1528 let &cpo=s:cpo_save
1529 unlet s:cpo_save
1530
1531 source $HOME/.vim/macros/table.vim
1532
1533 let g:SuperTabMappingForward = '<nul>'
1534 let g:SuperTabMappingBackward = '<s-nul>'