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

fail softly if pathogen is not installed
[etc/vim.git] / .vimrc
1 " obtained from the output of :options, then postprocessed:
2 "   d2}
3 "   :%s/^ *[[:digit:]]\+/"""
4 "   qa
5 "   ma
6 "   wi<BS>\n<ESC>
7 "   /^\([^[:space:]"].*\)\?$/
8 "   k
9 "   :'a,.s/^/" /
10 "   /^[^[:space:]"]
11 "   O<ESC>
12 "   :%s,\n\n\n",\r\r"
13
14 """ important
15
16 " compatible
17 " behave very Vi compatible (not advisable)
18 "       set cp  nocp
19 set nocp
20
21 " cpoptions
22 " list of flags to specify Vi compatibility
23 "       set cpo=aABceFs
24
25 " insertmode
26 " use Insert mode as the default mode
27 "       set noim        im
28
29 " paste
30 " paste mode, insert typed text literally
31 "       set nopaste     paste
32
33 " pastetoggle
34 " key sequence to toggle paste mode
35 "       set pt=
36 set pt=<F2>
37
38 " runtimepath
39 " list of directories used for runtime files and plugins
40 "       set rtp=/home/madduck/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vimcurrent,/usr/share/vim/vimfiles/after,/home/madduck/.vim/after
41
42 " helpfile
43 " name of the main help file
44 "       set hf=/usr/share/vim/vimcurrent/doc/help.txt
45
46 """ moving around, searching and patterns
47
48 " whichwrap
49 " list of flags specifying which commands wrap to another line
50 "       (local to window)
51 "       set ww=
52 set ww=b,s,[,<,>,],~
53
54 " startofline
55 " many jump commands move the cursor to the first non-blank
56 "       character of a line
57 "       set sol nosol
58
59 " paragraphs
60 " nroff macro names that separate paragraphs
61 "       set para=IPLPPPQPP\ LIpplpipbp
62
63 " sections
64 " nroff macro names that separate sections
65 "       set sect=SHNHH\ HUnhsh
66
67 " path
68 " list of directory names used for file searching
69 "       (global or local to buffer)
70 "       set pa=.,/usr/include,,
71
72 " cdpath
73 " list of directory names used for :cd
74 "       set cd=,,
75
76 " wrapscan
77 " search commands wrap around the end of the buffer
78 "       set ws  nows
79 "set ws
80
81 " incsearch
82 " show match for partly typed search command
83 "       set nois        is
84 set is
85
86 " magic
87 " change the way backslashes are used in search patterns
88 "       set magic       nomagic
89
90 " ignorecase
91 " ignore case when using a search pattern
92 "       set noic        ic
93 set ic
94
95 " smartcase
96 " override 'ignorecase' when pattern has upper case characters
97 "       set noscs       scs
98 set scs
99
100 " casemap
101 " What method to use for changing case of letters
102 "       set cmp=internal,keepascii
103
104 " maxmempattern
105 " maximum amount of memory in Kbyte used for pattern matching
106 "       set mmp=1000
107
108 " define
109 " pattern for a macro definition line
110 "       (global or local to buffer)
111 "       set def=^\\s*#\\s*define
112
113 " include
114 " pattern for an include-file line
115 "       (local to buffer)
116 "       set inc=^\\s*#\\s*include
117
118 " includeexpr
119 " expression used to transform an include line to a file name
120 "       (local to buffer)
121 "       set inex=
122
123 """ tags
124
125 " tagbsearch
126 " use binary searching in tags files
127 "       set tbs notbs
128
129 " taglength
130 " number of significant characters in a tag name or zero
131 "       set tl=0
132
133 " tags
134 " list of file names to search for tags
135 "       (global or local to buffer)
136 "       set tag=./tags,./TAGS,tags,TAGS
137
138 " tagrelative
139 " file names in a tags file are relative to the tags file
140 "       set notr        tr
141
142 " tagstack
143 " a :tag command will use the tagstack
144 "       set tgst        notgst
145
146 " showfulltag
147 " when completing tags in Insert mode show more info
148 "       set nosft       sft
149
150 " cscopeprg
151 " command for executing cscope
152 "       set csprg=cscope
153
154 " cscopetag
155 " use cscope for tag commands
156 "       set nocst       cst
157
158 " cscopetagorder
159 " 0 or 1; the order in which ":cstag" performs a search
160 "       set csto=0
161
162 " cscopeverbose
163 " give messages when adding a cscope database
164 "       set nocsverb    csverb
165
166 " cscopepathcomp
167 " how many components of the path to show
168 "       set cspc=0
169
170 " cscopequickfix
171 " When to open a quickfix window for cscope
172 "       set csqf=
173
174 """ displaying text
175
176 " scroll
177 " number of lines to scroll for CTRL-U and CTRL-D
178 "       (local to window)
179 "       set scr=8
180
181 " scrolloff
182 " number of screen lines to show around the cursor
183 "       set so=0
184 set so=5
185
186 " wrap
187 " long lines wrap
188 "       set wrap        nowrap
189 set nowrap
190
191 " linebreak
192 " wrap long lines at a character in 'breakat'
193 "       (local to window)
194 "       set nolbr       lbr
195 " does not work with autocmd set list/nolist below
196
197 " breakat
198 " which characters might cause a line break
199 "       set brk=\ \     !@*-+;:,./?
200
201 " showbreak
202 " string to put before wrapped screen lines
203 "       set sbr=
204
205 " sidescroll
206 " minimal number of columns to scroll horizontally
207 "       set ss=0
208
209 " sidescrolloff
210 " minimal number of columns to keep left and right of the cursor
211 "       set siso=0
212 set siso=0
213
214 " display
215 " include "lastline" to show the last line even if it doesn't fit
216 "       include "uhex" to show unprintable characters as a hex number
217 "       set dy=
218 set dy=lastline,uhex
219
220 " fillchars
221 " characters to use for the status line, folds and filler lines
222 "       set fcs=vert:\|,fold:-
223
224 " cmdheight
225 " number of lines used for the command-line
226 "       set ch=1
227
228 " columns
229 " width of the display
230 "       set co=80
231
232 " lines
233 " number of lines in the display
234 "       set lines=25
235
236 " lazyredraw
237 " don't redraw while executing macros
238 "       set nolz        lz
239 set lz
240
241 " writedelay
242 " delay in msec for each char written to the display
243 "       (for debugging)
244 "       set wd=0
245
246 " list
247 " show <Tab> as ^I and end-of-line as $
248 "       (local to window)
249 "       set nolist      list
250 set list
251
252 " listchars
253 " list of strings used for list mode
254 "       set lcs=eol:$
255 set lcs=tab:⇝·,trail:·
256
257 " number
258 " show the line number for each line
259 "       (local to window)
260 "       set nonu        nu
261
262 " numberwidth
263 " number of columns to use for the line number
264 "       (local to window)
265 "       set nuw=8
266
267 """ syntax, highlighting and spelling
268
269 " background
270 " "dark" or "light"; the background color brightness
271 "       set bg=light
272
273 " filetype
274 " type of file; triggers the FileType event when set
275 "       (local to buffer)
276 "       set ft=
277
278 " syntax
279 " name of syntax highlighting used
280 "       (local to buffer)
281 "       set syn=
282
283 " synmaxcol
284 " maximum column to look for syntax items
285 "       (local to buffer)
286 "       set smc=3000
287
288 " highlight
289 " which highlighting to use for various occasions
290 "       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
291
292 " hlsearch
293 " highlight all matches for the last used search pattern
294 "       set nohls       hls
295 set hls
296
297 " cursorcolumn
298 " highlight the screen column of the cursor
299 "       (local to window)
300 "       set nocuc       cuc
301
302 " cursorline
303 " highlight the screen line of the cursor
304 "       (local to window)
305 "       set nocul       cul
306
307 " spell
308 " highlight spelling mistakes
309 "       (local to window)
310 "       set nospell     spell
311
312 " spelllang
313 " list of accepted languages
314 "       (local to buffer)
315 "       set spl=en
316
317 " spellfile
318 " file that "zg" adds good words to
319 "       (local to buffer)
320 "       set spf=
321
322 " spellcapcheck
323 " pattern to locate the end of a sentence
324 "       (local to buffer)
325 "       set spc=[.?!]\\_[\\])'\"\       \ ]\\+
326 set spc=
327
328 " spellsuggest
329 " methods used to suggest corrections
330 "       set sps=best
331
332 " mkspellmem
333 " amount of memory used by :mkspell before compressing
334 "       set msm=460000,2000,500
335
336 """ multiple windows
337
338 " laststatus
339 " 0, 1 or 2; when to use a status line for the last window
340 "       set ls=1
341
342 " statusline
343 " alternate format to be used for a status line
344 "       set stl=
345
346 " equalalways
347 " make all windows the same size when adding/removing windows
348 "       set ea  noea
349
350 " eadirection
351 " in which direction 'equalalways' works: "ver", "hor" or "both"
352 "       set ead=both
353
354 " winheight
355 " minimal number of lines used for the current window
356 "       set wh=1
357
358 " winminheight
359 " minimal number of lines used for any window
360 "       set wmh=1
361
362 " winfixheight
363 " keep the height of the window
364 "       (local to window)
365 "       set nowfh       wfh
366
367 " winfixwidth
368 " keep the width of the window
369 "       (local to window)
370 "       set nowfw       wfw
371
372 " winwidth
373 " minimal number of columns used for the current window
374 "       set wiw=20
375
376 " winminwidth
377 " minimal number of columns used for any window
378 "       set wmw=1
379
380 " helpheight
381 " initial height of the help window
382 "       set hh=20
383
384 " previewheight
385 " default height for the preview window
386 "       set pvh=12
387
388 " previewwindow
389 " identifies the preview window
390 "       (local to window)
391 "       set nopvw       pvw
392
393 " hidden
394 " don't unload a buffer when no longer shown in a window
395 "       set nohid       hid
396
397 " switchbuf
398 " "useopen" and/or "split"; which window to use when jumping
399 "       to a buffer
400 "       set swb=
401
402 " splitbelow
403 " a new window is put below the current one
404 "       set nosb        sb
405
406 " splitright
407 " a new window is put right of the current one
408 "       set nospr       spr
409
410 " scrollbind
411 " this window scrolls together with other bound windows
412 "       (local to window)
413 "       set noscb       scb
414
415 " scrollopt
416 " "ver", "hor" and/or "jump"; list of options for 'scrollbind'
417 "       set sbo=ver,jump
418
419 """ multiple tab pages
420
421 " showtabline
422 " 0, 1 or 2; when to use a tab pages line
423 "       set stal=1
424
425 " tabpagemax
426 " maximum number of tab pages to open for -p and "tab all"
427 "       set tpm=10
428
429 " tabline
430 " custom tab pages line
431 "       set tal=
432
433 """ terminal
434
435 " term
436 " name of the used terminal
437 "       set term=rxvt-unicode
438
439 " ttytype
440 " alias for 'term'
441 "       set tty=rxvt-unicode
442
443 " ttybuiltin
444 " check built-in termcaps first
445 "       set tbi notbi
446
447 " ttyfast
448 " terminal connection is fast
449 "       set tf  notf
450
451 " weirdinvert
452 " terminal that requires extra redrawing
453 "       set nowiv       wiv
454
455 " esckeys
456 " recognize keys that start with <Esc> in Insert mode
457 "       set noek        ek
458
459 " scrolljump
460 " minimal number of lines to scroll at a time
461 "       set sj=1
462
463 " ttyscroll
464 " maximum number of lines to use scrolling instead of redrawing
465 "       set tsl=999
466
467 " title
468 " show info in the window title
469 "       set notitle     title
470 set notitle
471
472 " titlelen
473 " percentage of 'columns' used for the window title
474 "       set titlelen=85
475
476 " titlestring
477 " when not empty, string to be used for the window title
478 "       set titlestring=
479
480 " titleold
481 " string to restore the title to when exiting Vim
482 "       set titleold=Thanks\ for\ flying\ Vim
483
484 " icon
485 " set the text of the icon for this window
486 "       set noicon      icon
487
488 " iconstring
489 " when not empty, text for the icon of this window
490 "       set iconstring=
491
492 """ using the mouse
493
494 " mouse
495 " list of flags for using the mouse
496 "       set mouse=
497
498 " mousemodel
499 " "extend", "popup" or "popup_setpos"; what the right
500 "       mouse button is used for
501 "       set mousem=extend
502
503 " mousetime
504 " maximum time in msec to recognize a double-click
505 "       set mouset=500
506
507 " ttymouse
508 " "xterm", "xterm2", "dec" or "netterm"; type of mouse
509 "       set ttym=xterm
510
511 """ printing
512
513 " printoptions
514 " list of items that control the format of :hardcopy output
515 "       set popt=
516
517 " printdevice
518 " name of the printer to be used for :hardcopy
519 "       set pdev=
520
521 " printexpr
522 " expression used to print the PostScript file for :hardcopy
523 "       set pexpr=system('lpr'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -P'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error
524 set pexpr=system('lp'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -d'\ .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\ v:shell_error
525
526 " printfont
527 " name of the font to be used for :hardcopy
528 "       set pfn=courier
529
530 " printheader
531 " format of the header used for :hardcopy
532 "       set pheader=%<%f%h%m%=Page\ %N
533
534 " printencoding
535 " encoding used to print the PostScript file for :hardcopy
536 "       set penc=
537
538 " printmbcharset
539 " the CJK character set to be used for CJK output from :hardcopy
540 "       set pmbcs=
541
542 " printmbfont
543 " list of font names to be used for CJK output from :hardcopy
544 "       set pmbfn=
545
546 """ messages and info
547
548 " terse
549 " add 's' flag in 'shortmess' (don't show search message)
550 "       set noterse     terse
551
552 " shortmess
553 " list of flags to make messages shorter
554 "       set shm=
555 set shortmess=atTWoOI
556
557 " showcmd
558 " show (partial) command keys in the status line
559 "       set nosc        sc
560
561 " showmode
562 " display the current mode in the status line
563 "       set nosmd       smd
564
565 " ruler
566 " show cursor position below each window
567 "       set noru        ru
568 set ruler
569
570 " rulerformat
571 " alternate format to be used for the ruler
572 "       set ruf=%20(%=%-14(%l,%c%V%)\ %P%)
573
574 " report
575 " threshold for reporting number of changed lines
576 "       set report=2
577
578 " verbose
579 " the higher the more messages are given
580 "       set vbs=0
581
582 " verbosefile
583 " file to write messages in
584 "       set vfile=
585
586 " more
587 " pause listings when the screen is full
588 "       set nomore      more
589
590 " confirm
591 " start a dialog when a command fails
592 "       set nocf        cf
593
594 " errorbells
595 " ring the bell for error messages
596 "       set noeb        eb
597
598 " visualbell
599 " use a visual bell instead of beeping
600 "       set novb        vb
601
602 " helplang
603 " list of preferred languages for finding help
604 "       set hlg=en
605
606 """ selecting text
607
608 " selection
609 " "old", "inclusive" or "exclusive"; how selecting text behaves
610 "       set sel=inclusive
611
612 " selectmode
613 " "mouse", "key" and/or "cmd"; when to start Select mode
614 "       instead of Visual mode
615 "       set slm=
616
617 " keymodel
618 " "startsel" and/or "stopsel"; what special keys can do
619 "       set km=
620
621 """ editing text
622
623 " undolevels
624 " maximum number of changes that can be undone
625 "       set ul=1000
626
627 " modified
628 " changes have been made and not written to a file
629 "       (local to buffer)
630 "       set nomod       mod
631
632 " readonly
633 " buffer is not to be written
634 "       (local to buffer)
635 "       set noro        ro
636
637 " modifiable
638 " changes to the text are not possible
639 "       (local to buffer)
640 "       set ma  noma
641
642 " textwidth
643 " line length above which to break a line
644 "       (local to buffer)
645 "       set tw=0
646 set tw=78
647
648 " wrapmargin
649 " margin from the right in which to break a line
650 "       (local to buffer)
651 "       set wm=0
652
653 " backspace
654 " specifies what <BS>, CTRL-W, etc. can do in Insert mode
655 "       set bs=
656 set bs=indent,eol,start
657
658 " comments
659 " definition of what comment lines look like
660 "       (local to buffer)
661 "       set com=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
662
663 " formatoptions
664 " list of flags that tell how automatic formatting works
665 "       (local to buffer)
666 "       set fo=vt
667 set fo=tcroqn1l
668
669 " formatlistpat
670 " pattern to recognize a numbered list
671 "       (local to buffer)
672 "       set flp=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
673 let &flp='^\v\s*(((\a|\d+)[]:.)}/-])+|[-\*.·→+])\s+'
674
675 " formatexpr
676 " expression used for "gq" to format lines
677 "       (local to buffer)
678 "       set fex=
679
680 " complete
681 " specifies how Insert mode completion works for CTRL-N and CTRL-P
682 "       (local to buffer)
683 "       set cpt=.,w,b,u,t,i
684
685 " completeopt
686 " whether to use a popup menu for Insert mode completion
687 "       set cot=menu,preview
688
689 " pumheight
690 " maximum height of the popup menu
691 "       set ph=0
692
693 " completefunc
694 " user defined function for Insert mode completion
695 "       (local to buffer)
696 "       set cfu=
697
698 " omnifunc
699 " function for filetype-specific Insert mode completion
700 "       (local to buffer)
701 "       set ofu=
702
703 " dictionary
704 " list of dictionary files for keyword completion
705 "       (global or local to buffer)
706 "       set dict=
707
708 " thesaurus
709 " list of thesaurus files for keyword completion
710 "       (global or local to buffer)
711 "       set tsr=
712
713 " infercase
714 " adjust case of a keyword completion match
715 "       (local to buffer)
716 "       set noinf       inf
717 set inf
718
719 " digraph
720 " enable entering digraps with c1 <BS> c2
721 "       set nodg        dg
722 "set dg
723
724 " tildeop
725 " the "~" command behaves like an operator
726 "       set notop       top
727 "set tildeop
728
729 " operatorfunc
730 " function called for the"g@"  operator
731 "       set opfunc=
732
733 " showmatch
734 " When inserting a bracket, briefly jump to its match
735 "       set nosm        sm
736
737 " matchtime
738 " tenth of a second to show a match for 'showmatch'
739 "       set mat=5
740
741 " matchpairs
742 " list of pairs that match for the "%" command
743 "       (local to buffer)
744 "       set mps=(:),{:},[:]
745
746 " joinspaces
747 " use two spaces after '.' when joining a line
748 "       set js  nojs
749 set nojs
750
751 " nrformats
752 " "alpha", "octal" and/or "hex"; number formats recognized for
753 "       CTRL-A and CTRL-X commands
754 "       (local to buffer)
755 "       set nf=octal,hex
756
757 """ tabs and indenting
758
759 " tabstop
760 " number of spaces a <Tab> in the text stands for
761 "       (local to buffer)
762 "       set ts=8
763 "
764 "         You could set the 'tabstop' option to 2.  However, if you edit the file
765 "         another time, with 'tabstop' set to the default value of 8, it will look
766 "         wrong.  In other programs and when printing the indent will also be
767 "         wrong.  Therefore it is recommended to keep 'tabstop' at eight all the
768 "         time.  That's the standard value everywhere.
769 "
770 "set ts=2
771
772 " shiftwidth
773 " number of spaces used for each step of (auto)indent
774 "       (local to buffer)
775 "       set sw=8
776 set sw=2
777
778 " smarttab
779 " a <Tab> in an indent inserts 'shiftwidth' spaces
780 "       set nosta       sta
781 set sta
782
783 " softtabstop
784 " if non-zero, number of spaces to insert for a <Tab>
785 "       (local to buffer)
786 "       set sts=0
787 set sts=2
788
789 " shiftround
790 " round to 'shiftwidth' for "<<" and ">>"
791 "       set nosr        sr
792 set sr
793
794 " expandtab
795 " expand <Tab> to spaces in Insert mode
796 "       (local to buffer)
797 "       set noet        et
798 set et
799
800 " autoindent
801 " automatically set the indent of a new line
802 "       (local to buffer)
803 "       set noai        ai
804 set ai
805
806 " smartindent
807 " do clever autoindenting
808 "       (local to buffer)
809 "       set nosi        si
810
811 " cindent
812 " enable specific indenting for C code
813 "       (local to buffer)
814 "       set nocin       cin
815
816 " cinoptions
817 " options for C-indenting
818 "       (local to buffer)
819 "       set cino=
820
821 " cinkeys
822 " keys that trigger C-indenting in Insert mode
823 "       (local to buffer)
824 "       set cink=0{,0},0),:,0#,!^F,o,O,e
825
826 " cinwords
827 " list of words that cause more C-indent
828 "       (local to buffer)
829 "       set cinw=if,else,while,do,for,switch
830
831 " indentexpr
832 " expression used to obtain the indent of a line
833 "       (local to buffer)
834 "       set inde=
835
836 " indentkeys
837 " keys that trigger indenting with 'indentexpr' in Insert mode
838 "       (local to buffer)
839 "       set indk=0{,0},:,0#,!^F,o,O,e
840
841 " copyindent
842 " Copy whitespace for indenting from previous line
843 "       (local to buffer)
844 "       set noci        ci
845 set ci
846
847 " preserveindent
848 " Preserve kind of whitespace when changing indent
849 "       (local to buffer)
850 "       set nopi        pi
851 """ set pi this ABORTS < 1:7.1-135+1 (see #446268)
852 if has('patch073')
853   set pi
854 endif
855
856 " lisp
857 " enable lisp mode
858 "       (local to buffer)
859 "       set nolisp      lisp
860
861 " lispwords
862 " words that change how lisp indenting works
863 "       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
864
865 """ folding
866
867 " foldenable
868 " set to display all folds open
869 "       (local to window)
870 "       set fen nofen
871
872 " foldlevel
873 " folds with a level higher than this number will be closed
874 "       (local to window)
875 "       set fdl=0
876
877 " foldlevelstart
878 " value for 'foldlevel' when starting to edit a file
879 "       set fdls=-1
880
881 " foldcolumn
882 " width of the column used to indicate folds
883 "       (local to window)
884 "       set fdc=0
885
886 " foldtext
887 " expression used to display the text of a closed fold
888 "       (local to window)
889 "       set fdt=foldtext()
890
891 " foldclose
892 " set to "all" to close a fold when the cursor leaves it
893 "       set fcl=
894
895 " foldopen
896 " specifies for which commands a fold will be opened
897 "       set fdo=block,hor,mark,percent,quickfix,search,tag,undo
898
899 " foldminlines
900 " minimum number of screen lines for a fold to be closed
901 "       (local to window)
902 "       set fml=1
903
904 " commentstring
905 " template for comments; used to put the marker in
906 "       set cms=/*%s*/
907
908 " foldmethod
909 " folding type: "manual", "indent", "expr", "marker" or "syntax"
910 "       (local to window)
911 "       set fdm=manual
912 set fdm=marker
913
914 " foldexpr
915 " expression used when 'foldmethod' is "expr"
916 "       (local to window)
917 "       set fde=0
918
919 " foldignore
920 " used to ignore lines when 'foldmethod' is "indent"
921 "       (local to window)
922 "       set fdi=#
923
924 " foldmarker
925 " markers used when 'foldmethod' is "marker"
926 "       (local to window)
927 "       set fmr={{{,}}}
928
929 " foldnestmax
930 " maximum fold depth for when 'foldmethod is "indent" or "syntax"
931 "       (local to window)
932 "       set fdn=20
933
934 """ diff mode
935
936 " diff
937 " use diff mode for the current window
938 "       (local to window)
939 "       set nodiff      diff
940
941 " diffopt
942 " options for using diff mode
943 "       set dip=filler
944
945 " diffexpr
946 " expression used to obtain a diff file
947 "       set dex=
948
949 " patchexpr
950 " expression used to patch a file
951 "       set pex=
952
953 """ mapping
954
955 " maxmapdepth
956 " maximum depth of mapping
957 "       set mmd=1000
958
959 " remap
960 " recognize mappings in mapped keys
961 "       set remap       noremap
962
963 " timeout
964 " allow timing out halfway into a mapping
965 "       set to  noto
966
967 " ttimeout
968 " allow timing out halfway into a key code
969 "       set nottimeout  ttimeout
970
971 " timeoutlen
972 " time in msec for 'timeout'
973 "       set tm=1000
974
975 " ttimeoutlen
976 " time in msec for 'ttimeout'
977 "       set ttm=-1
978
979 """ reading and writing files
980
981 " modeline
982 " enable using settings from modelines when reading a file
983 "       (local to buffer)
984 "       set noml        ml
985 set ml
986
987 " modelines
988 " number of lines to check for modelines
989 "       set mls=5
990
991 " binary
992 " binary file editing
993 "       (local to buffer)
994 "       set nobin       bin
995
996 " endofline
997 " last line in the file has an end-of-line
998 "       (local to buffer)
999 "       set eol noeol
1000
1001 " bomb
1002 " Prepend a Byte Order Mark to the file
1003 "       (local to buffer)
1004 "       set nobomb      bomb
1005
1006 " fileformat
1007 " end-of-line format: "dos", "unix" or "mac"
1008 "       (local to buffer)
1009 "       set ff=unix
1010
1011 " fileformats
1012 " list of file formats to look for when editing a file
1013 "       set ffs=
1014
1015 " textmode
1016 " obsolete, use 'fileformat'
1017 "       (local to buffer)
1018 "       set notx        tx
1019
1020 " textauto
1021 " obsolete, use 'fileformats'
1022 "       set nota        ta
1023
1024 " write
1025 " writing files is allowed
1026 "       set write       nowrite
1027
1028 " writebackup
1029 " write a backup file before overwriting a file
1030 "       set wb  nowb
1031
1032 " backup
1033 " keep a backup after overwriting a file
1034 "       set nobk        bk
1035
1036 " backupskip
1037 " patterns that specify for which files a backup is not made
1038 "       set bsk=/tmp/*
1039
1040 " backupcopy
1041 " whether to make the backup as a copy or rename the existing file
1042 "       set bkc=yes
1043
1044 " backupdir
1045 " list of directories to put backup files in
1046 "       set bdir=.,/home/madduck/tmp,/home/madduck/
1047
1048 " backupext
1049 " file name extension for the backup file
1050 "       set bex=~
1051
1052 " autowrite
1053 " automatically write a file when leaving a modified buffer
1054 "       set noaw        aw
1055 set aw
1056
1057 " autowriteall
1058 " as 'autowrite', but works with more commands
1059 "       set noawa       awa
1060 set awa
1061
1062 " writeany
1063 " always write without asking for confirmation
1064 "       set nowa        wa
1065
1066 " autoread
1067 " automatically read a file when it was modified outside of Vim
1068 "       (global or local to buffer)
1069 "       set noar        ar
1070 set ar
1071
1072 " patchmode
1073 " keep oldest version of a file; specifies file name extension
1074 "       set pm=
1075
1076 " fsync
1077 " forcibly sync the file to disk after writing it
1078 "       set fs  nofs
1079
1080 " shortname
1081 " use 8.3 file names
1082 "       (local to buffer)
1083 "       set nosn        sn
1084
1085 """ the swap file
1086
1087 " directory
1088 " list of directories for the swap file
1089 "       set dir=.,/home/madduck/tmp,/var/tmp,/tmp
1090 set dir=.,$TMPDIR//,/var/tmp//,/tmp//
1091
1092 " swapfile
1093 " use a swap file for this buffer
1094 "       (local to buffer)
1095 "       set swf noswf
1096
1097 " swapsync
1098 " "sync", "fsync" or empty; how to flush a swap file to disk
1099 "       set sws=fsync
1100 set sws=
1101
1102 " updatecount
1103 " number of characters typed to cause a swap file update
1104 "       set uc=200
1105
1106 " updatetime
1107 " time in msec after which the swap file will be updated
1108 "       set ut=4000
1109 set ut=10000
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:full
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=$VARDIR/vim/view
1419
1420 " viminfo
1421 " list that specifies what to write in the viminfo file
1422 "       set vi=
1423 set vi=<1000,'1000,\"1000,:100,/100,@100,f1,%,!,h,n$VARDIR/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 if &cp | set nocp | endif
1445 let s:cpo_save=&cpo
1446 set cpo&vim
1447
1448 filetype plugin indent on
1449 syntax on
1450 colorscheme madduck
1451
1452 " leave the w mark whenever a file is written
1453 autocmd BufWrite * normal mw
1454
1455 autocmd BufRead *.vcf set filetype=vcard
1456
1457 " leave the i mark whenever we go idle (after updatetime)
1458 "augroup markidle
1459   "autocmd CursorHold * normal mi
1460   "autocmd CursorHoldI * normal mi "DISABLED while broken (shifts left)
1461 "augroup end
1462
1463 " disable list mode when inserting stuff, otherwise keep it enabled, it's
1464 " useful (see also setting lcs)
1465 augroup listinsert
1466   autocmd InsertEnter * set nolist
1467   autocmd InsertLeave * set list
1468 augroup end
1469 " flag trailing spaces as error only when not inserting
1470 augroup tsperrorinsert
1471   autocmd InsertEnter * match none /\s\+$/
1472   autocmd InsertLeave * match Error /\s\+$/
1473 augroup end
1474
1475 " treat wrapped lines normally
1476 nnoremap k gk
1477 nnoremap <Up> gk
1478 inoremap <Up> <C-\><C-o>gk
1479 nnoremap j gj
1480 nnoremap <Down> gj
1481 inoremap <Down> <C-\><C-o>gj
1482
1483 " this isn't windows, screw the F1->help key
1484 map <F1> <Esc>
1485 imap <F1> <Esc>
1486 vmap <F1> <Esc>
1487
1488 " ignore Q -- Ex mode
1489 map Q <Esc>
1490
1491 let mapleader = ';'
1492 let maplocalleader = ';'
1493
1494 " replace fake tab chars with real ones
1495 map <Leader>ft :%s,⇝·*,      ,g<CR>:nohlsearch<CR>``
1496 " replace fake spaces with real ones
1497 map <Leader>fs :%s,·, ,g<CR>:nohlsearch<CR>``
1498
1499 map <Leader>sy :echo synIDattr(synID(line("."), col("."), 1), "name")<CR>
1500
1501 map <Leader>/ :nohlsearch<CR>
1502
1503 omap [{ :normal {jj<CR>
1504 nmap [{ :normal {jj<CR>
1505 omap ]} :normal }kk<CR>
1506 nmap ]} :normal }kk<CR>
1507
1508 iab sgf Sehr geehrte Frau
1509 iab sgh Sehr geehrter Herr
1510 iab sghn Sehr geehrte Herren
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 mbg Mit den besten Grüssen
1520 iab hg Herzliche Grüsse
1521 iab mhg Mit herzlichen Grüssen
1522 iab mbbg Mit bundesbrüderlichen Grüssen
1523 iab mvbg Mit verbandsbrüderlichen Grüssen
1524
1525 let g:airline_theme='minimalist'
1526
1527 try
1528   execute pathogen#infect()
1529 catch
1530   "echo "Pathogen not installed"
1531 endtry
1532
1533 let g:is_posix = 1
1534
1535 let &cpo=s:cpo_save
1536 unlet s:cpo_save