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

add uuid autogen for vcards
[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=^\\v[[:space:]]*([[:digit:]]\|[[:alpha:]]){1,2}[\\]:.)}[:space:]][[:space:]]+
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 set sws=
1104
1105 " updatecount
1106 " number of characters typed to cause a swap file update
1107 "       set uc=200
1108
1109 " updatetime
1110 " time in msec after which the swap file will be updated
1111 "       set ut=4000
1112 set ut=10000
1113
1114 " maxmem
1115 " maximum amount of memory in Kbyte used for one buffer
1116 "       set mm=1030480
1117
1118 " maxmemtot
1119 " maximum amount of memory in Kbyte used for all buffers
1120 "       set mmt=1030480
1121
1122 """ command line editing
1123
1124 " history
1125 " how many command lines are remembered 
1126 "       set hi=0
1127 set hi=100
1128
1129 " wildchar
1130 " key that triggers command-line expansion
1131 "       set wc=5
1132
1133 " wildcharm
1134 " like 'wildchar' but can also be used in a mapping
1135 "       set wcm=0
1136
1137 " wildmode
1138 " specifies how command line completion works
1139 "       set wim=full
1140 set wim=list:full
1141
1142 " suffixes
1143 " list of file name extensions that have a lower priority
1144 "       set su=.bak,~,.o,.h,.info,.swp,.obj
1145
1146 " suffixesadd
1147 " list of file name extensions added when searching for a file
1148 "       (local to buffer)
1149 "       set sua=
1150
1151 " wildignore
1152 " list of patterns to ignore files for file name completion
1153 "       set wig=
1154 set wig=*.o,*.pyc,*.pyo,*~,*.bk,*.bak
1155
1156 " wildmenu
1157 " command-line completion shows a list of matches
1158 "       set nowmnu      wmnu
1159
1160 " cedit
1161 " key used to open the command-line window
1162 "       set cedit=
1163
1164 " cmdwinheight
1165 " height of the command-line window
1166 "       set cwh=7
1167
1168 """ executing external commands
1169
1170 " shell
1171 " name of the shell program used for external commands
1172 "       set sh=/bin/zsh
1173
1174 " shellquote
1175 " character(s) to enclose a shell command in
1176 "       set shq=
1177
1178 " shellxquote
1179 " like 'shellquote' but include the redirection
1180 "       set sxq=
1181
1182 " shellcmdflag
1183 " argument for 'shell' to execute a command
1184 "       set shcf=-c
1185
1186 " shellredir
1187 " used to redirect command output to a file
1188 "       set srr=>%s\ 2>&1
1189
1190 " shelltemp
1191 " use a temp file for shell commands instead of using a pipe
1192 "       set nostmp      stmp
1193
1194 " equalprg
1195 " program used for "=" command
1196 "       (global or local to buffer)
1197 "       set ep=
1198
1199 " formatprg
1200 " program used to format lines with "gq" command
1201 "       set fp=
1202
1203 " keywordprg
1204 " program used for the "K" command
1205 "       set kp=man
1206
1207 " warn
1208 " warn when using a shell command and a buffer has changes
1209 "       set warn        nowarn
1210 set warn
1211
1212 """ running make and jumping to errors
1213
1214 " errorfile
1215 " name of the file that contains error messages
1216 "       set ef=errors.err
1217
1218 " errorformat
1219 " list of formats for error messages
1220 "       (global or local to buffer)
1221 "       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
1222
1223 " makeprg
1224 " program used for the ":make" command
1225 "       (global or local to buffer)
1226 "       set mp=make
1227
1228 " shellpipe
1229 " string used to put the output of ":make" in the error file
1230 "       set sp=2>&1\|\ tee
1231
1232 " makeef
1233 " name of the errorfile for the 'makeprg' command
1234 "       set mef=
1235
1236 " grepprg
1237 " program used for the ":grep" command
1238 "       (global or local to buffer)
1239 "       set gp=grep\ -n\ $*\ /dev/null
1240
1241 " grepformat
1242 " list of formats for output of 'grepprg'
1243 "       set gfm=%f:%l:%m,%f:%l%m,%f\ \ %l%m
1244
1245 """ language specific
1246
1247 " isfname
1248 " specifies the characters in a file name
1249 "       set isf=@,48-57,/,.,-,_,+,,,#,$,%,~,=
1250
1251 " isident
1252 " specifies the characters in an identifier
1253 "       set isi=@,48-57,_,192-255
1254
1255 " iskeyword
1256 " specifies the characters in a keyword
1257 "       (local to buffer)
1258 "       set isk=@,48-57,_
1259
1260 " isprint
1261 " specifies printable characters
1262 "       set isp=@,161-255
1263
1264 " quoteescape
1265 " specifies escape characters in a string
1266 "       (local to buffer)
1267 "       set qe=\\
1268
1269 " rightleft
1270 " display the buffer right-to-left
1271 "       (local to window)
1272 "       set norl        rl
1273
1274 " rightleftcmd
1275 " When to edit the command-line right-to-left
1276 "       (local to window)
1277 "       set rlc=search
1278
1279 " revins
1280 " Insert characters backwards
1281 "       set nori        ri
1282
1283 " allowrevins
1284 " Allow CTRL-_ in Insert and Command-line mode to toggle 'revins'
1285 "       set noari       ari
1286
1287 " aleph
1288 " the ASCII code for the first letter of the Hebrew alphabet
1289 "       set al=224
1290
1291 " hkmap
1292 " use Hebrew keyboard mapping
1293 "       set nohk        hk
1294
1295 " hkmapp
1296 " use phonetic Hebrew keyboard mapping
1297 "       set nohkp       hkp
1298
1299 " altkeymap
1300 " use Farsi as the second language when 'revins' is set
1301 "       set noakm       akm
1302
1303 " fkmap
1304 " use Farsi keyboard mapping
1305 "       set nofk        fk
1306
1307 " arabic
1308 " Prepare for editing Arabic text
1309 "       (local to window)
1310 "       set noarab      arab
1311
1312 " arabicshape
1313 " Perform shaping of Arabic characters
1314 "       set noarshape   noarshape
1315
1316 " termbidi
1317 " Terminal will perform bidi handling
1318 "       set notbidi     tbidi
1319
1320 " keymap
1321 " name of a keyboard mappping
1322 "       set kmp=
1323
1324 " langmap
1325 " translate characters for Normal mode
1326 "       set lmap=
1327
1328 " iminsert
1329 " in Insert mode: 1: use :lmap; 2: use IM; 0: neither
1330 "       (local to window)
1331 "       set imi=0
1332
1333 " imsearch
1334 " entering a search pattern: 1: use :lmap; 2: use IM; 0: neither
1335 "       (local to window)
1336 "       set ims=0
1337
1338 """ multi-byte characters
1339
1340 " encoding
1341 " character encoding used in Vim: "latin1", "utf-8"
1342 "       "euc-jp", "big5", etc.
1343 "       set enc=utf-8
1344
1345 " fileencoding
1346 " character encoding for the current file
1347 "       (local to buffer)
1348 "       set fenc=utf-8
1349
1350 " fileencodings
1351 " automatically detected character encodings
1352 "       set fencs=ucs-bom,utf-8,default,latin1
1353
1354 " termencoding
1355 " character encoding used by the terminal
1356 "       set tenc=
1357
1358 " charconvert   expression
1359 " used for character encoding conversion
1360 "       set ccv=
1361
1362 " delcombine
1363 " Delete combining (composing) characters on their own
1364 "       set nodeco      deco
1365
1366 " maxcombine
1367 " Maximum number of combining (composing) characters displayed
1368 "       set mco=2
1369
1370 " ambiwidth
1371 " Width of ambiguous width characters
1372 "       set ambw=single
1373
1374 """ various
1375
1376 " virtualedit
1377 " when to use virtual editing: "block", "insert" and/or "all"
1378 "       set ve=
1379
1380 " eventignore
1381 " list of autocommand events which are to be ignored
1382 "       set ei=
1383
1384 " loadplugins
1385 " load plugin scripts when starting up
1386 "       set nolpl       lpl
1387 set lpl
1388
1389 " exrc
1390 " enable reading .vimrc/.exrc/.gvimrc in the current directory
1391 "       set noex        ex
1392
1393 " secure
1394 " safer working with script files in the current directory
1395 "       set nosecure    secure
1396 set secure
1397
1398 " gdefault
1399 " use the 'g' flag for ":substitute"
1400 "       set nogd        gd
1401
1402 " edcompatible
1403 " 'g' and 'c' flags of ":substitute" toggle
1404 "       set noed        ed
1405
1406 " maxfuncdepth
1407 " maximum depth of function calls
1408 "       set mfd=100
1409
1410 " sessionoptions
1411 " list of words that specifies what to put in a session file
1412 "       set ssop=blank,buffers,curdir,folds,help,options,tabpages,winsize
1413
1414 " viewoptions
1415 " list of words that specifies what to save for :mkview
1416 "       set vop=folds,options,cursor
1417
1418 " viewdir
1419 " directory where to store files with :mkview
1420 "       set vdir=/home/madduck/.vim/view
1421 set vdir=$VARDIR/vim/view
1422
1423 " viminfo
1424 " list that specifies what to write in the viminfo file
1425 "       set vi=
1426 set vi='1000,f1,\"1000,:20,/20,%,!,h,n$VARDIR/vim/viminfo
1427
1428 " bufhidden
1429 " what happens with a buffer when it's no longer in a window
1430 "       (local to buffer)
1431 "       set bh=
1432
1433 " buftype
1434 " "", "nofile", "nowrite" or "quickfix": type of buffer
1435 "       (local to buffer)
1436 "       set bt=
1437
1438 " buflisted
1439 " whether the buffer shows up in the buffer list
1440 "       (local to buffer)
1441 "       set bl  nobl
1442
1443 " debug
1444 " set to "msg" to see all error messages
1445 "       set debug=
1446
1447 filetype plugin indent on
1448 syntax on
1449 colorscheme madduck
1450
1451 autocmd BufNewFile,BufRead /etc/logcheck/*.d*/* set tw=0
1452 autocmd BufNewFile,BufRead /home/madduck/debian/pkg/logcheck/*/rulefiles/linux/*.d*/* set tw=0
1453 autocmd BufNewFile,BufRead /home/madduck/.tmp/dir????? set tw=0
1454
1455 " jump to last known position in file (:he last-position-jump)
1456 autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g`\"zz" | endif
1457
1458 " leave the w mark whenever a file is written
1459 autocmd BufWrite * normal mw
1460
1461 " keep an extra backup of vimperator's ctrl-i
1462 autocmd BufWritePost */vimperator-*.tmp exe 'write ' . fnameescape((exists('$TMPDIR') ? $TMPDIR : '/tmp') . '/vimperator.ctrl-i.' . strftime('%Y.%m.%d.%H%M%S'))
1463
1464 autocmd BufRead *.vcf set filetype=vcard
1465
1466 " leave the i mark whenever we go idle (after updatetime)
1467 "augroup markidle
1468   "autocmd CursorHold * normal mi
1469   "autocmd CursorHoldI * normal mi "DISABLED while broken (shifts left)
1470 "augroup end
1471
1472 " disable list mode when inserting stuff, otherwise keep it enabled, it's
1473 " useful (see also setting lcs)
1474 augroup listinsert
1475   autocmd InsertEnter * set nolist
1476   autocmd InsertLeave * set list
1477 augroup end
1478 " flag trailing spaces as error only when not inserting
1479 augroup tsperrorinsert
1480   autocmd InsertEnter * match none /\s\+$/
1481   autocmd InsertLeave * match Error /\s\+$/
1482 augroup end
1483
1484 if &cp | set nocp | endif
1485 let s:cpo_save=&cpo
1486 set cpo&vim
1487
1488 " treat wrapped lines normally
1489 nnoremap k gk
1490 nnoremap <Up> gk
1491 inoremap <Up> <C-\><C-o>gk
1492 nnoremap j gj
1493 nnoremap <Down> gj
1494 inoremap <Down> <C-\><C-o>gj
1495
1496 " this isn't windows, screw the F1->help key
1497 map <F1> <Esc>
1498 imap <F1> <Esc>
1499 vmap <F1> <Esc>
1500
1501 " ignore Q -- Ex mode
1502 map Q <Esc>
1503
1504 let mapleader = ';'
1505 let maplocalleader = ';'
1506
1507 imap <Leader>-- –
1508 imap <Leader>--- —
1509 imap <Leader>... …
1510
1511 " replace fake tab chars with real ones
1512 map <Leader>ft :%s,⇝·*,      ,g<CR>:nohlsearch<CR>``
1513 " replace fake spaces with real ones
1514 map <Leader>fs :%s,·, ,g<CR>:nohlsearch<CR>``
1515
1516 map <Leader>sy :echo synIDattr(synID(line("."), col("."), 1), "name")<CR>
1517
1518 map <Leader>/ :nohlsearch<CR>
1519
1520 omap [{ :normal {jj<CR>
1521 nmap [{ :normal {jj<CR>
1522 omap ]} :normal }kk<CR>
1523 nmap ]} :normal }kk<CR>
1524
1525 iab sgf Sehr geehrte Frau
1526 iab sgh Sehr geehrter Herr
1527 iab sghn Sehr geehrte Herren
1528 iab lf Liebe Frau
1529 iab lh Lieber Herr
1530 iab sgdh Sehr geehrte Damen und Herren
1531 iab twimc To Whom It May Concern
1532 iab lg liebe Grüsse
1533 iab Lg Liebe Grüsse
1534 iab fg Freundliche Grüsse
1535 iab mfg Mit freundlichen Grüssen
1536 iab mbg Mit den besten Grüssen
1537 iab hg Herzliche Grüsse
1538 iab mhg Mit herzlichen Grüssen
1539 iab mbbg Mit bundesbrüderlichen Grüssen
1540 iab mvbg Mit verbandsbrüderlichen Grüssen
1541 iab vd Vielen Dank
1542 iab vld Vielen lieben Dank
1543 iab vhd Vielen herzlichen Dank
1544 iab email e-mail
1545 iab emails e-mails
1546 iab Email E-mail
1547 iab Emails E-mails
1548
1549 let &cpo=s:cpo_save
1550 unlet s:cpo_save
1551
1552 source $HOME/.vim/macros/table.vim
1553
1554 let g:SuperTabMappingForward = '<nul>'
1555 let g:SuperTabMappingBackward = '<s-nul>'