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

Do not set EDITOR/VISUAL for shell
[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=1
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{,4}|[ivx]{,4})[]:.)}/])+|[-\*.·→+])\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 set cot=menu,noinsert,popup,preview,fuzzy
689
690 " pumheight
691 " maximum height of the popup menu
692 "       set ph=0
693
694 " completefunc
695 " user defined function for Insert mode completion
696 "       (local to buffer)
697 "       set cfu=
698
699 " omnifunc
700 " function for filetype-specific Insert mode completion
701 "       (local to buffer)
702 "       set ofu=
703
704 " dictionary
705 " list of dictionary files for keyword completion
706 "       (global or local to buffer)
707 "       set dict=
708
709 " thesaurus
710 " list of thesaurus files for keyword completion
711 "       (global or local to buffer)
712 "       set tsr=
713
714 " infercase
715 " adjust case of a keyword completion match
716 "       (local to buffer)
717 "       set noinf       inf
718 set inf
719
720 " digraph
721 " enable entering digraps with c1 <BS> c2
722 "       set nodg        dg
723 "set dg
724
725 " tildeop
726 " the "~" command behaves like an operator
727 "       set notop       top
728 "set tildeop
729
730 " operatorfunc
731 " function called for the"g@"  operator
732 "       set opfunc=
733
734 " showmatch
735 " When inserting a bracket, briefly jump to its match
736 "       set nosm        sm
737
738 " matchtime
739 " tenth of a second to show a match for 'showmatch'
740 "       set mat=5
741
742 " matchpairs
743 " list of pairs that match for the "%" command
744 "       (local to buffer)
745 "       set mps=(:),{:},[:]
746
747 " joinspaces
748 " use two spaces after '.' when joining a line
749 "       set js  nojs
750 set nojs
751
752 " nrformats
753 " "alpha", "octal" and/or "hex"; number formats recognized for
754 "       CTRL-A and CTRL-X commands
755 "       (local to buffer)
756 "       set nf=octal,hex
757
758 """ tabs and indenting
759
760 " tabstop
761 " number of spaces a <Tab> in the text stands for
762 "       (local to buffer)
763 "       set ts=8
764 "
765 "         You could set the 'tabstop' option to 2.  However, if you edit the file
766 "         another time, with 'tabstop' set to the default value of 8, it will look
767 "         wrong.  In other programs and when printing the indent will also be
768 "         wrong.  Therefore it is recommended to keep 'tabstop' at eight all the
769 "         time.  That's the standard value everywhere.
770 "
771 "set ts=2
772
773 " shiftwidth
774 " number of spaces used for each step of (auto)indent
775 "       (local to buffer)
776 "       set sw=8
777 set sw=2
778
779 " smarttab
780 " a <Tab> in an indent inserts 'shiftwidth' spaces
781 "       set nosta       sta
782 set sta
783
784 " softtabstop
785 " if non-zero, number of spaces to insert for a <Tab>
786 "       (local to buffer)
787 "       set sts=0
788 set sts=2
789
790 " shiftround
791 " round to 'shiftwidth' for "<<" and ">>"
792 "       set nosr        sr
793 set sr
794
795 " expandtab
796 " expand <Tab> to spaces in Insert mode
797 "       (local to buffer)
798 "       set noet        et
799 set et
800
801 " autoindent
802 " automatically set the indent of a new line
803 "       (local to buffer)
804 "       set noai        ai
805 set ai
806
807 " smartindent
808 " do clever autoindenting
809 "       (local to buffer)
810 "       set nosi        si
811
812 " cindent
813 " enable specific indenting for C code
814 "       (local to buffer)
815 "       set nocin       cin
816
817 " cinoptions
818 " options for C-indenting
819 "       (local to buffer)
820 "       set cino=
821
822 " cinkeys
823 " keys that trigger C-indenting in Insert mode
824 "       (local to buffer)
825 "       set cink=0{,0},0),:,0#,!^F,o,O,e
826
827 " cinwords
828 " list of words that cause more C-indent
829 "       (local to buffer)
830 "       set cinw=if,else,while,do,for,switch
831
832 " indentexpr
833 " expression used to obtain the indent of a line
834 "       (local to buffer)
835 "       set inde=
836
837 " indentkeys
838 " keys that trigger indenting with 'indentexpr' in Insert mode
839 "       (local to buffer)
840 "       set indk=0{,0},:,0#,!^F,o,O,e
841
842 " copyindent
843 " Copy whitespace for indenting from previous line
844 "       (local to buffer)
845 "       set noci        ci
846 set ci
847
848 " preserveindent
849 " Preserve kind of whitespace when changing indent
850 "       (local to buffer)
851 "       set nopi        pi
852 """ set pi this ABORTS < 1:7.1-135+1 (see #446268)
853 if has('patch073')
854   set pi
855 endif
856
857 " lisp
858 " enable lisp mode
859 "       (local to buffer)
860 "       set nolisp      lisp
861
862 " lispwords
863 " words that change how lisp indenting works
864 "       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
865
866 """ folding
867
868 " foldenable
869 " set to display all folds open
870 "       (local to window)
871 "       set fen nofen
872
873 " foldlevel
874 " folds with a level higher than this number will be closed
875 "       (local to window)
876 "       set fdl=0
877
878 " foldlevelstart
879 " value for 'foldlevel' when starting to edit a file
880 "       set fdls=-1
881
882 " foldcolumn
883 " width of the column used to indicate folds
884 "       (local to window)
885 "       set fdc=0
886
887 " foldtext
888 " expression used to display the text of a closed fold
889 "       (local to window)
890 "       set fdt=foldtext()
891
892 " foldclose
893 " set to "all" to close a fold when the cursor leaves it
894 "       set fcl=
895
896 " foldopen
897 " specifies for which commands a fold will be opened
898 "       set fdo=block,hor,mark,percent,quickfix,search,tag,undo
899
900 " foldminlines
901 " minimum number of screen lines for a fold to be closed
902 "       (local to window)
903 "       set fml=1
904
905 " commentstring
906 " template for comments; used to put the marker in
907 "       set cms=/*%s*/
908
909 " foldmethod
910 " folding type: "manual", "indent", "expr", "marker" or "syntax"
911 "       (local to window)
912 "       set fdm=manual
913 set fdm=marker
914
915 " foldexpr
916 " expression used when 'foldmethod' is "expr"
917 "       (local to window)
918 "       set fde=0
919
920 " foldignore
921 " used to ignore lines when 'foldmethod' is "indent"
922 "       (local to window)
923 "       set fdi=#
924
925 " foldmarker
926 " markers used when 'foldmethod' is "marker"
927 "       (local to window)
928 "       set fmr={{{,}}}
929
930 " foldnestmax
931 " maximum fold depth for when 'foldmethod is "indent" or "syntax"
932 "       (local to window)
933 "       set fdn=20
934
935 """ diff mode
936
937 " diff
938 " use diff mode for the current window
939 "       (local to window)
940 "       set nodiff      diff
941
942 " diffopt
943 " options for using diff mode
944 "       set dip=filler
945
946 " diffexpr
947 " expression used to obtain a diff file
948 "       set dex=
949
950 " patchexpr
951 " expression used to patch a file
952 "       set pex=
953
954 """ mapping
955
956 " maxmapdepth
957 " maximum depth of mapping
958 "       set mmd=1000
959
960 " remap
961 " recognize mappings in mapped keys
962 "       set remap       noremap
963
964 " timeout
965 " allow timing out halfway into a mapping
966 "       set to  noto
967
968 " ttimeout
969 " allow timing out halfway into a key code
970 "       set nottimeout  ttimeout
971
972 " timeoutlen
973 " time in msec for 'timeout'
974 "       set tm=1000
975
976 " ttimeoutlen
977 " time in msec for 'ttimeout'
978 "       set ttm=-1
979
980 """ reading and writing files
981
982 " modeline
983 " enable using settings from modelines when reading a file
984 "       (local to buffer)
985 "       set noml        ml
986 set ml
987
988 " modelines
989 " number of lines to check for modelines
990 "       set mls=5
991
992 " binary
993 " binary file editing
994 "       (local to buffer)
995 "       set nobin       bin
996
997 " endofline
998 " last line in the file has an end-of-line
999 "       (local to buffer)
1000 "       set eol noeol
1001
1002 " bomb
1003 " Prepend a Byte Order Mark to the file
1004 "       (local to buffer)
1005 "       set nobomb      bomb
1006
1007 " fileformat
1008 " end-of-line format: "dos", "unix" or "mac"
1009 "       (local to buffer)
1010 "       set ff=unix
1011
1012 " fileformats
1013 " list of file formats to look for when editing a file
1014 "       set ffs=
1015
1016 " textmode
1017 " obsolete, use 'fileformat'
1018 "       (local to buffer)
1019 "       set notx        tx
1020
1021 " textauto
1022 " obsolete, use 'fileformats'
1023 "       set nota        ta
1024
1025 " write
1026 " writing files is allowed
1027 "       set write       nowrite
1028
1029 " writebackup
1030 " write a backup file before overwriting a file
1031 "       set wb  nowb
1032
1033 " backup
1034 " keep a backup after overwriting a file
1035 "       set nobk        bk
1036
1037 " backupskip
1038 " patterns that specify for which files a backup is not made
1039 "       set bsk=/tmp/*
1040
1041 " backupcopy
1042 " whether to make the backup as a copy or rename the existing file
1043 "       set bkc=yes
1044
1045 " backupdir
1046 " list of directories to put backup files in
1047 "       set bdir=.,/home/madduck/tmp,/home/madduck/
1048
1049 " backupext
1050 " file name extension for the backup file
1051 "       set bex=~
1052
1053 " autowrite
1054 " automatically write a file when leaving a modified buffer
1055 "       set noaw        aw
1056 set aw
1057
1058 " autowriteall
1059 " as 'autowrite', but works with more commands
1060 "       set noawa       awa
1061 set awa
1062
1063 " writeany
1064 " always write without asking for confirmation
1065 "       set nowa        wa
1066
1067 " autoread
1068 " automatically read a file when it was modified outside of Vim
1069 "       (global or local to buffer)
1070 "       set noar        ar
1071 set ar
1072
1073 " patchmode
1074 " keep oldest version of a file; specifies file name extension
1075 "       set pm=
1076
1077 " fsync
1078 " forcibly sync the file to disk after writing it
1079 "       set fs  nofs
1080
1081 " shortname
1082 " use 8.3 file names
1083 "       (local to buffer)
1084 "       set nosn        sn
1085
1086 """ the swap file
1087
1088 " directory
1089 " list of directories for the swap file
1090 "       set dir=.,/home/madduck/tmp,/var/tmp,/tmp
1091 set dir=.,$TMPDIR//,/var/tmp//,/tmp//
1092
1093 " swapfile
1094 " use a swap file for this buffer
1095 "       (local to buffer)
1096 "       set swf noswf
1097
1098 " swapsync
1099 " "sync", "fsync" or empty; how to flush a swap file to disk
1100 "       set sws=fsync
1101 set sws=
1102
1103 " updatecount
1104 " number of characters typed to cause a swap file update
1105 "       set uc=200
1106
1107 " updatetime
1108 " time in msec after which the swap file will be updated
1109 "       set ut=4000
1110 set ut=10000
1111
1112 " maxmem
1113 " maximum amount of memory in Kbyte used for one buffer
1114 "       set mm=1030480
1115
1116 " maxmemtot
1117 " maximum amount of memory in Kbyte used for all buffers
1118 "       set mmt=1030480
1119
1120 """ command line editing
1121
1122 " history
1123 " how many command lines are remembered 
1124 "       set hi=0
1125 set hi=100
1126
1127 " wildchar
1128 " key that triggers command-line expansion
1129 "       set wc=5
1130
1131 " wildcharm
1132 " like 'wildchar' but can also be used in a mapping
1133 "       set wcm=0
1134
1135 " wildmode
1136 " specifies how command line completion works
1137 "       set wim=full
1138 set wim=list:full
1139
1140 " suffixes
1141 " list of file name extensions that have a lower priority
1142 "       set su=.bak,~,.o,.h,.info,.swp,.obj
1143
1144 " suffixesadd
1145 " list of file name extensions added when searching for a file
1146 "       (local to buffer)
1147 "       set sua=
1148
1149 " wildignore
1150 " list of patterns to ignore files for file name completion
1151 "       set wig=
1152 set wig=*.o,*.pyc,*.pyo,*~,*.bk,*.bak
1153
1154 " wildmenu
1155 " command-line completion shows a list of matches
1156 "       set nowmnu      wmnu
1157
1158 " cedit
1159 " key used to open the command-line window
1160 "       set cedit=
1161
1162 " cmdwinheight
1163 " height of the command-line window
1164 "       set cwh=7
1165
1166 """ executing external commands
1167
1168 " shell
1169 " name of the shell program used for external commands
1170 "       set sh=/bin/zsh
1171
1172 " shellquote
1173 " character(s) to enclose a shell command in
1174 "       set shq=
1175
1176 " shellxquote
1177 " like 'shellquote' but include the redirection
1178 "       set sxq=
1179
1180 " shellcmdflag
1181 " argument for 'shell' to execute a command
1182 "       set shcf=-c
1183
1184 " shellredir
1185 " used to redirect command output to a file
1186 "       set srr=>%s\ 2>&1
1187
1188 " shelltemp
1189 " use a temp file for shell commands instead of using a pipe
1190 "       set nostmp      stmp
1191
1192 " equalprg
1193 " program used for "=" command
1194 "       (global or local to buffer)
1195 "       set ep=
1196
1197 " formatprg
1198 " program used to format lines with "gq" command
1199 "       set fp=
1200
1201 " keywordprg
1202 " program used for the "K" command
1203 "       set kp=man
1204
1205 " warn
1206 " warn when using a shell command and a buffer has changes
1207 "       set warn        nowarn
1208 set warn
1209
1210 """ running make and jumping to errors
1211
1212 " errorfile
1213 " name of the file that contains error messages
1214 "       set ef=errors.err
1215
1216 " errorformat
1217 " list of formats for error messages
1218 "       (global or local to buffer)
1219 "       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
1220
1221 " makeprg
1222 " program used for the ":make" command
1223 "       (global or local to buffer)
1224 "       set mp=make
1225
1226 " shellpipe
1227 " string used to put the output of ":make" in the error file
1228 "       set sp=2>&1\|\ tee
1229
1230 " makeef
1231 " name of the errorfile for the 'makeprg' command
1232 "       set mef=
1233
1234 " grepprg
1235 " program used for the ":grep" command
1236 "       (global or local to buffer)
1237 "       set gp=grep\ -n\ $*\ /dev/null
1238
1239 " grepformat
1240 " list of formats for output of 'grepprg'
1241 "       set gfm=%f:%l:%m,%f:%l%m,%f\ \ %l%m
1242
1243 """ language specific
1244
1245 " isfname
1246 " specifies the characters in a file name
1247 "       set isf=@,48-57,/,.,-,_,+,,,#,$,%,~,=
1248
1249 " isident
1250 " specifies the characters in an identifier
1251 "       set isi=@,48-57,_,192-255
1252
1253 " iskeyword
1254 " specifies the characters in a keyword
1255 "       (local to buffer)
1256 "       set isk=@,48-57,_
1257
1258 " isprint
1259 " specifies printable characters
1260 "       set isp=@,161-255
1261
1262 " quoteescape
1263 " specifies escape characters in a string
1264 "       (local to buffer)
1265 "       set qe=\\
1266
1267 " rightleft
1268 " display the buffer right-to-left
1269 "       (local to window)
1270 "       set norl        rl
1271
1272 " rightleftcmd
1273 " When to edit the command-line right-to-left
1274 "       (local to window)
1275 "       set rlc=search
1276
1277 " revins
1278 " Insert characters backwards
1279 "       set nori        ri
1280
1281 " allowrevins
1282 " Allow CTRL-_ in Insert and Command-line mode to toggle 'revins'
1283 "       set noari       ari
1284
1285 " aleph
1286 " the ASCII code for the first letter of the Hebrew alphabet
1287 "       set al=224
1288
1289 " hkmap
1290 " use Hebrew keyboard mapping
1291 "       set nohk        hk
1292
1293 " hkmapp
1294 " use phonetic Hebrew keyboard mapping
1295 "       set nohkp       hkp
1296
1297 " altkeymap
1298 " use Farsi as the second language when 'revins' is set
1299 "       set noakm       akm
1300
1301 " fkmap
1302 " use Farsi keyboard mapping
1303 "       set nofk        fk
1304
1305 " arabic
1306 " Prepare for editing Arabic text
1307 "       (local to window)
1308 "       set noarab      arab
1309
1310 " arabicshape
1311 " Perform shaping of Arabic characters
1312 "       set noarshape   noarshape
1313
1314 " termbidi
1315 " Terminal will perform bidi handling
1316 "       set notbidi     tbidi
1317
1318 " keymap
1319 " name of a keyboard mappping
1320 "       set kmp=
1321
1322 " langmap
1323 " translate characters for Normal mode
1324 "       set lmap=
1325
1326 " iminsert
1327 " in Insert mode: 1: use :lmap; 2: use IM; 0: neither
1328 "       (local to window)
1329 "       set imi=0
1330
1331 " imsearch
1332 " entering a search pattern: 1: use :lmap; 2: use IM; 0: neither
1333 "       (local to window)
1334 "       set ims=0
1335
1336 """ multi-byte characters
1337
1338 " encoding
1339 " character encoding used in Vim: "latin1", "utf-8"
1340 "       "euc-jp", "big5", etc.
1341 "       set enc=utf-8
1342
1343 " fileencoding
1344 " character encoding for the current file
1345 "       (local to buffer)
1346 "       set fenc=utf-8
1347
1348 " fileencodings
1349 " automatically detected character encodings
1350 "       set fencs=ucs-bom,utf-8,default,latin1
1351
1352 " termencoding
1353 " character encoding used by the terminal
1354 "       set tenc=
1355
1356 " charconvert   expression
1357 " used for character encoding conversion
1358 "       set ccv=
1359
1360 " delcombine
1361 " Delete combining (composing) characters on their own
1362 "       set nodeco      deco
1363
1364 " maxcombine
1365 " Maximum number of combining (composing) characters displayed
1366 "       set mco=2
1367
1368 " ambiwidth
1369 " Width of ambiguous width characters
1370 "       set ambw=single
1371
1372 """ various
1373
1374 " virtualedit
1375 " when to use virtual editing: "block", "insert" and/or "all"
1376 "       set ve=
1377
1378 " eventignore
1379 " list of autocommand events which are to be ignored
1380 "       set ei=
1381
1382 " loadplugins
1383 " load plugin scripts when starting up
1384 "       set nolpl       lpl
1385 set lpl
1386
1387 " exrc
1388 " enable reading .vimrc/.exrc/.gvimrc in the current directory
1389 "       set noex        ex
1390
1391 " secure
1392 " safer working with script files in the current directory
1393 "       set nosecure    secure
1394 set secure
1395
1396 " gdefault
1397 " use the 'g' flag for ":substitute"
1398 "       set nogd        gd
1399
1400 " edcompatible
1401 " 'g' and 'c' flags of ":substitute" toggle
1402 "       set noed        ed
1403
1404 " maxfuncdepth
1405 " maximum depth of function calls
1406 "       set mfd=100
1407
1408 " sessionoptions
1409 " list of words that specifies what to put in a session file
1410 "       set ssop=blank,buffers,curdir,folds,help,options,tabpages,winsize
1411
1412 " viewoptions
1413 " list of words that specifies what to save for :mkview
1414 "       set vop=folds,options,cursor
1415
1416 " viewdir
1417 " directory where to store files with :mkview
1418 "       set vdir=/home/madduck/.vim/view
1419 set vdir=$VARDIR/vim/view
1420
1421 " viminfo
1422 " list that specifies what to write in the viminfo file
1423 "       set vi=
1424 set vi=<1000,'1000,\"1000,:100,/100,@100,f1,%,!,h,n$VARDIR/vim/viminfo
1425
1426 " bufhidden
1427 " what happens with a buffer when it's no longer in a window
1428 "       (local to buffer)
1429 "       set bh=
1430
1431 " buftype
1432 " "", "nofile", "nowrite" or "quickfix": type of buffer
1433 "       (local to buffer)
1434 "       set bt=
1435
1436 " buflisted
1437 " whether the buffer shows up in the buffer list
1438 "       (local to buffer)
1439 "       set bl  nobl
1440
1441 " debug
1442 " set to "msg" to see all error messages
1443 "       set debug=
1444
1445 if &cp | set nocp | endif
1446 let s:cpo_save=&cpo
1447 set cpo&vim
1448
1449 let g:netrw_home="$VARDIR/vim"
1450
1451 filetype plugin indent on
1452 syntax on
1453
1454 packadd! editorconfig
1455 packadd! matchit
1456 packadd! gnupg
1457
1458 " leave the w mark whenever a file is written
1459 autocmd BufWrite * normal mw
1460
1461 autocmd BufRead *.vcf set filetype=vcard
1462
1463 " leave the i mark whenever we go idle (after updatetime)
1464 "augroup markidle
1465   "autocmd CursorHold * normal mi
1466   "autocmd CursorHoldI * normal mi "DISABLED while broken (shifts left)
1467 "augroup end
1468
1469 " disable list mode when inserting stuff, otherwise keep it enabled, it's
1470 " useful (see also setting lcs)
1471 augroup listinsert
1472   autocmd InsertEnter * set nolist
1473   autocmd InsertLeave * set list
1474 augroup end
1475 " flag trailing spaces as error only when not inserting
1476 augroup tsperrorinsert
1477   autocmd InsertEnter * match none /\s\+$/
1478   autocmd InsertLeave * match Error /\s\+$/
1479 augroup end
1480
1481 " this isn't windows, screw the F1->help key
1482 map <F1> <Esc>
1483 imap <F1> <Esc>
1484 vmap <F1> <Esc>
1485
1486 " ignore Q -- Ex mode
1487 map Q <Esc>
1488
1489 let mapleader = ';'
1490 let maplocalleader = ';'
1491
1492 " replace fake tab chars with real ones
1493 map <Leader>ft :%s,⇝·*,      ,g<CR>:nohlsearch<CR>``
1494 " replace fake spaces with real ones
1495 map <Leader>fs :%s,·, ,g<CR>:nohlsearch<CR>``
1496
1497 function WhatHighlight()
1498   echon 'hi<' . synIDattr(synID(line('.'),col('.'),1),'name') . '> '
1499   echon 'trans<' . synIDattr(synID(line('.'),col('.'),0),'name') . '> '
1500   echon 'lo<' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)),'name') . '>'
1501 endfunction
1502
1503 map <Leader>sy :call WhatHighlight()<CR>
1504
1505 map <Leader>/ :nohlsearch<CR>
1506
1507 iab sgf Sehr geehrte Frau
1508 iab sgh Sehr geehrter Herr
1509 iab sghn Sehr geehrte Herren
1510 iab lf Liebe Frau
1511 iab lh Lieber Herr
1512 iab sgdh Sehr geehrte Damen und Herren
1513 iab twimc To Whom It May Concern
1514 iab lg liebe Grüsse
1515 iab Lg Liebe Grüsse
1516 iab fg Freundliche Grüsse
1517 iab mfg Mit freundlichen Grüssen
1518 iab mbg Mit den besten Grüssen
1519 iab hg Herzliche Grüsse
1520 iab mhg Mit herzlichen Grüssen
1521 iab mbbg Mit bundesbrüderlichen Grüssen
1522 iab mvbg Mit verbandsbrüderlichen Grüssen
1523 iab dallarmi Dall'Armi-Strasse
1524 iab muc5 80538 München
1525 iab muc6 80638 München
1526
1527 iab <Leader>→ ➬
1528
1529 iab :thumbsup: 👍️
1530
1531 let g:ale_completion_enabled = 0
1532 let g:ale_fixers = { '*': [ "remove_trailing_lines", "trim_whitespace" ] }
1533 let g:ale_sign_error = '>>'
1534 let g:ale_sign_warning = '--'
1535 let g:ale_set_loclist = 1
1536 let g:ale_open_list = 1
1537 let g:ale_virtualtext_cursor = 'current'
1538 let g:ale_floating_window_border = repeat([''], 8)
1539
1540 try
1541   execute pathogen#infect()
1542 catch
1543   "echo "Pathogen not installed"
1544 endtry
1545
1546 set background=light
1547 let g:artesanal_dimmed = 1
1548 let g:artesanal_transparent = 1
1549 colorscheme artesanal
1550
1551 let g:is_posix = 1
1552
1553 let &cpo=s:cpo_save
1554 unlet s:cpo_save