-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc_
More file actions
executable file
·710 lines (627 loc) · 21.2 KB
/
Copy path.vimrc_
File metadata and controls
executable file
·710 lines (627 loc) · 21.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
"
" .vimrc common file
"
" Maintainer: Paul Kippes
" Original version: 1996
" TODO: http://vim.wikia.com/wiki/Indenting_source_code
" TODO: https://github.com/keith/swift.vim
" swift and syntastic
"
" TODO: " Windows enabling (admin cmd prompt)
" https://github.com/git-for-windows/git/wiki/Symbolic-Links
" mklink .vimrc /path/to/git/.vimrc
" mklink _vimrc /path/to/git/.vimrc
" mklink /d _vim /path/to/git/.vim
" mklink /d .vim /path/to/git/.vim
" #########################################################################
" ## PLATFORM SETTINGS
" #########################################################################
if version < 600
echo "This configuration file, .vimrc, assumes a modern vim."
echo "Run with -v option: 'vim -v [FILE]'"
endif
if has('win32') || has('win64')
set runtimepath=~/.vim,$VIMRUNTIME
endif
let ENABLE_CLANG_COMPLETE=0
if has("conceal") && has("python3")
let ENABLE_CLANG_COMPLETE=1
endif
" set path to user's .vim
if has('win32') || has('win64') " windows
let $VIMHOME = $VIM."vimfile"
let ENABLE_CLANG_COMPLETE=0
elseif has('win32unix') || has('win64unix') " cygwin
let $VIMHOME = $HOME."/.vim"
let ENABLE_CLANG_COMPLETE=0
else " unix/bsd
let $VIMHOME = $HOME."/.vim"
endif
" #########################################################################
" ## ENVIRONMENT AND CLIENT CAPABILITIES/RESTRICTIONS
" #########################################################################
" TODO: Determine in console
" TODO: Determine in GUI
" TODO: Get 'gqap' or other to reflow more sanely
" Do not restore the screen on returning to prompt
set t_ti= t_te=
" No terminal audible bells
set t_vb=
set visualbell
" #########################################################################
" ## VIM USABILITY ADJUSTMENTS (ALL FILE TYPES)
" #########################################################################
"if has('gui_running')
" if platform == "win"
" set guifont=ProggySquareTTSZ:h12 " Set font
" "winpos 110 30
" winsize 130 50
" elseif has('gui_gtk2')
" set guifont="Courier 10"
" elseif has('gui_gtk')
" set guifont="Ubuntu Mono 12"
" set guifont="Monospace 10,Courier 10"
" elseif has('gui_kde')
" else
" set guifont=LucidaTypewriter
" endif
"endif
" ## Vim Extensions and Miscellaneous
set nocompatible " Use Vim defaults (much better!)
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" " than 50 lines of registers
"set hidden " Allow hidden buffers
set noequalalways " Do not resize windows when splitting
set splitbelow " When splitting windows, current window is the lower
set history=75 " keep 75 lines of command line history
let mapleader=',' " set the <leader>
set modelines=1 " process a single modeline (as opposed to ...?)
" ## Mouse and Clipboard Settings
set mouse=nhv " Enable console mouse for Normal, Visual, and Help
set clipboard=autoselect,unnamed " (text mode) Attempt to place Visual mode selected text
" and yank text in windowing system's clipboard
" ## Search/Replace Behavior
set ignorecase " Ignore case when searching
set smartcase " Allow override of case-sensitive search patterns
set incsearch " Incremental search (highlight while searching)
set infercase " Keyword completion isn't picky about case
set gdefault " Substitute all matches in a line
" ## File Settings
set autowriteall " write files when switching files
"set patchmode=.org " Rename original file with .org extension
"
" Default Tab settings (Overridden by Specific File Types)
"
set expandtab " expand tab into spaces
set shiftwidth=4
set softtabstop=4 " existing tabs will remain standard 8
" ## Enable and customize wild-menu feature
set wildmenu " Enable wildmenu completion
set wildmode=list:longest,list:full
set wildignore=*.o,*.tar,*.tgz,*.a
"
" Key mappings for tab pages
"
map <leader>to :tabnew %<CR>
map <leader>tc :tabclose<CR>
map <leader>tn :tabnext<CR>
map <leader>tp :tabprevious<CR>
"WIP
"Check &diff == 1 for vimdiff mode
" https://vi.stackexchange.com/questions/2705/create-mappings-that-only-apply-to-diff-mode
":diffget REMOTE
":diffget BASE
":diffget LOCAL
"
" Key mappings for QuickFix buffer
"
map <C-n> :cn<C-m>
map <C-p> :cp<C-m>
"
" Command Aliases
"
nmap :W :w
nmap :Q :q
nmap :B :b
nmap :E :e
"
" Abbreviations And Typos Corrections
"
iabbrev teh the
" #########################################################################
" ## VIM LOOK AND FEEL SETTINGS (ALL FILE TYPES, ALL CLIENT TYPES)
" #########################################################################
" ## Interface view adjustments (non-editor)
set ruler " display ruler at bottom
set laststatus=2 " status line always on
" ## Editor view adjustments
set colorcolumn=78 " highlight a "soft" right bounds
set cpoptions+=$ " put the nice little $ when we change text
set scrolloff=2 " Keep 2 lines above/below cursor line
set sidescroll=1 " Scroll sideways 1 position at a time
set sidescrolloff=5 " Keep 5 characters to the right/left of cursor when side scrolling
set listchars+=precedes:<,extends:> " Use < and > to indicated text beyond visible area
" TODO: precedes not functioning
" TODO: see https://jeffkreeftmeijer.com/vim-number/
" for buffer switching
"set relativenumber " Enable relative vertical line numbering
set number " Enable line numbering
"set cursorline "TODO: (future) use to alter current line's line number color
" ## GUI settings
set guioptions-=r " No vertical scrollbar on right
set guioptions-=L " No vertical scrollbar on left when split
set guioptions-=m " No menu bar
set guioptions-=T " No toolbar
set guicursor+=i-n-v-c:blinkon0 " No blinking curser
" #########################################################################
" ## CTAGS CONFIG
" #########################################################################
if ("$TAGSFILE" != "") && filereadable($TAGSFILE)
set tags=$TAGSFILE
" with ctags, don't use clang_complete
let ENABLE_CLANG_COMPLETE=0
endif
" #########################################################################
" ## PLUGIN: CLANG COMPLETE
" #########################################################################
" (macports) install vim +python36 +cscope
" set dirctory to libclang
if ENABLE_CLANG_COMPLETE
let LIBCLANG_DIRPATH=system("$VIMHOME/myscripts/find_libclang.sh")
if LIBCLANG_DIRPATH == ""
let ENABLE_CLANG_COMPLETE=0
else
let g:clang_library_path=LIBCLANG_DIRPATH
let g:clang_auto_user_options="compile_commands.json"
",.clang_complete,path"
endif
else
" If we won't be enabling clang complete, set the flag indicating it has
" been loaded in order to prevent annoying errors on platforms without
" enough plugin support.
let g:clang_complete_loaded=1
endif
" "let g:clang_user_options="-std=c++0x "
" let g:clang_complete_auto = 1
" let g:clang_complete_copen = 1
" let g:clang_auto_select = 1
" let g:clang_periodic_quickfix = 0
"
"
" inoremap <S-Tab> <C-N>
"
" " :h clang_complete-auto_user_options
" if has('win32unix') " Cygwin
" " Using libclang requires a Vim built with +python
" let g:clang_use_library = 1
" " Mit der Option "gcc" kriege ich Fehler.
" " Remove "gcc" option as it causes errors.
" let g:clang_auto_user_options='path, .clang_complete'
" "elseif has('win32') " Windows
" " let g:clang_auto_user_options='path, .clang_complete'
" " let g:clang_use_library = 1
" " let g:clang_library_path='D:\Sourcen\LLVM\build\bin\Debug'
" endif
" ## Highlighting
"let kippes_bold=1
"let kippes_dark=1
colorscheme kippes
syntax on " Enable syntax highlighting
" hi Search cterm=NONE ctermbg=cyan ctermfg=black
" hi IncSearch cterm=NONE ctermbg=yellow ctermfg=black
" hi String cterm=NONE
" hi Special ctermfg=magenta
" hi Special cterm=NONE
"if version >= 600
" if exists("DEJAVU")
" finish
" else
" let DEJAVU = 1
" endif
"endif
"
" Determine platform
"
if &term == "win32" || &term == "pcterm" || has("gui_win32")
let platform="win"
else
let platform="unix"
endif
if has('gui_running')
if platform == "win"
set guifont=Lucida_Console:h10
" set guifont=ProggySquareTTSZ:h12 " Set font
" "winpos 110 30
" winsize 130 50
" elseif has('gui_gtk2')
" set guifont="Courier 10"
" elseif has('gui_gtk')
" set guifont="Ubuntu Mono 12"
" set guifont="Monospace 10,Courier 10"
" elseif has('gui_kde')
" else
" set guifont=LucidaTypewriter
endif
endif
"
"
"
""
"" Check for non-ansi emulation
""
"if platform == "unix"
" if &term == "vt220" || &term == "vt52" || &term == "ansi"
" let &term = "vt100"
" endif
"
"endif
"
""
"" Install 3rd party stuff
""
"if platform == "unix"
" "
" " Install Stephen Riehm's bracketing system
" "
"" let $SCRIPT_=$HOME . "/vim/macros/vim-bracketing/vim-bracketing-current/macros/bracketing.meta.vim"
"" if filereadable($SCRIPT_)
"" source $SCRIPT_
"" endif
"
" "
" " Install Dr. Campbell's diffwin script
" "
"" let $SCRIPT_=$HOME . "/usr-solaris/share/vim/vim-current/macros/diffwin.vim"
"" if filereadable($SCRIPT_)
"" source $SCRIPT_
"" endif
"
" "
" " Install Dr. Campbell's flist script
" "
" if version >= 600
" let flist_options="-ax"
"" let $SCRIPT_=$HOME . "/usr-solaris/share/vim/vim-usr/macros/flist.vim"
"" if filereadable($SCRIPT_)
"" source $SCRIPT_
" runtime macros/flist.vim
"
" nmap \fl :let flist_options="-Tfs"<CR>:Flist<CR>:let flist_options="-Tg -asx"<CR>
"" endif
" endif
"
" "
" " Load Man page viewer
" "
" :runtime! ftplugin/man.vim
"endif
"
"if platform == "win"
" set guifont=ProggySquareTTSZ:h12 " Set font
" "winpos 110 30
" winsize 130 50
"else
" set guifont=LucidaTypewriter
"endif
"
""
"" Popup menu settings
"
":set completeopt=longest,menuone
":inoremap <expr> <c-n> pumvisible() ? "\<lt>c-n>" : "\<lt>c-n>\<lt>c-r>=pumvisible() ? \"\\<lt>down>\" : \"\"\<lt>cr>"
"
"
" Editing settings
"
"set showmatch " Enable flash when matching brackets are found
"set matchtime=2 " time to delay on matched bracket
"set smartindent " use smartindent when not using cindent
""
"" Scroll settings
""
"if version >= 600
"endif
"set guioptions+=a " (gui mode) Attempt to place Visual mode selected text
" " in windowing system's clipboard
"map <M-k> <C-y> " Scroll window down
"map <M-j> <C-e> " Scroll window up
"map <M-l> zl " Scroll window right
"map <M-h> zh " Scroll window left
"nmap <M-+> <C-W>+ " Increase current window height by 1
"nmap <M--> <C-W>- " Decrease current window height by 1
"if has("folding")
" nmap \tw :botright ptag <C-R>=expand("<cword>")<CR><CR>:silent!
" \ wincmd P<CR>zv:wincmd p<CR> " Give preview-tag command a easy interface
"else
" nmap \tw :ptag <C-R>=expand("<cword>")<CR><CR> " Give preview-tag command a easy interface
"endif
"nmap \ts :ts <C-R>=expand("<cword>")<CR><CR> " Give select-tag command a easy interface
"if version >= 600
" nmap <M->> <C-W>> " Increase current window width by 1
" nmap <M-<> <C-W>< " Decrease current window width by 1
"endif
"
""
"" cscope key mappings
""
"if has("cscope")
" " add any cscope database in current directory
" if filereadable("cscope.out")
" cs add cscope.out
" endif
"
" " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
" set cscopetag
"
" " check ctags for definition of a symbol before checking cscope
" set csto=1
"
"
"" Support for cscope program
"" tag searches : Use tags file
"" cscope searches : Use cscope database. On failure search tags.
""
"" cscope usage:
"" \cs symbol: find all references to the token under cursor
"" \cg global: find global definition(s) of the token under cursor
"" \cc calls: find all calls to the function name under cursor
"" \ct text: find all instances of the text under cursor
"" \ce egrep: egrep search for the word under cursor
"" \cf file: open the filename under cursor
"" \ci includes: find files that include the filename under cursor
"" \cd called: find functions that function under cursor calls
" nmap \cs :cs find s <C-R>=expand("<cword>")<CR><CR>
" nmap \cg :cs find g <C-R>=expand("<cword>")<CR><CR>
" nmap \cc :cs find c <C-R>=expand("<cword>")<CR><CR>
" nmap \ct :cs find t <C-R>=expand("<cword>")<CR><CR>
" nmap \ce :cs find e <C-R>=expand("<cword>")<CR><CR>
" nmap \cf :cs find f <C-R>=expand("<cword>")<CR><CR>
" nmap \ci :cs find i <C-R>=expand("<cfile>")<CR><CR>
" nmap \cd :cs find d <C-R>=expand("<cfile>")<CR><CR>
"
"" Horizontially split the window with the found result
" nmap \chs :scs find s <C-R>=expand("<cword>")<CR><CR>
" nmap \chg :scs find g <C-R>=expand("<cword>")<CR><CR>
" nmap \chc :scs find c <C-R>=expand("<cword>")<CR><CR>
" nmap \cht :scs find t <C-R>=expand("<cword>")<CR><CR>
" nmap \che :scs find e <C-R>=expand("<cword>")<CR><CR>
" nmap \chf :scs find f <C-R>=expand("<cword>")<CR><CR>
" nmap \chi :scs find i <C-R>=expand("<cfile>")<CR><CR>
" nmap \chd :scs find d <C-R>=expand("<cfile>")<CR><CR>
"
"" Vertically split the window with the found result
" nmap \cvs :vert scs find s <C-R>=expand("<cword>")<CR><CR>
" nmap \cvg :vert scs find g <C-R>=expand("<cword>")<CR><CR>
" nmap \cvc :vert scs find c <C-R>=expand("<cword>")<CR><CR>
" nmap \cvt :vert scs find t <C-R>=expand("<cword>")<CR><CR>
" nmap \cve :vert scs find e <C-R>=expand("<cword>")<CR><CR>
" nmap \cvf :vert scs find f <C-R>=expand("<cword>")<CR><CR>
" nmap \cvi :vert scs find i <C-R>=expand("<cfile>")<CR><CR>
" nmap \cvd :vert scs find d <C-R>=expand("<cfile>")<CR><CR>
"endif
"
" Autocommands for specific file types
"
" C++ and C
augroup cppgroup
au!
autocmd BufNewFile,BufRead *.cpp,*.hpp,*.c,*.h setl formatoptions+=croqj shiftwidth=2 softtabstop=2 cindent comments=sr:/*,mb:*,el:*/,://
" For vim-cpp-enhanced-highlight in after/syntax
autocmd BufNewFile,BufRead *.cpp,*.hpp,*.c,*.h let g:cpp_class_scope_highlight=1
autocmd BufNewFile,BufRead *.cpp,*.hpp,*.c,*.h let g:cpp_experimental_template_highlight=1
augroup end
" ObjectiveC
augroup objc
au!
autocmd BufNewFile,BufRead *.m,*.mm setl formatoptions+=croqj shiftwidth=4 softtabstop=4 cindent comments=sr:/*,mb:*,el:*/,://
augroup end
" Metal
augroup metal
au!
autocmd BufNewFile,BufRead *.metal setl formatoptions+=croqj shiftwidth=2 softtabstop=2 cindent comments=sr:/*,mb:*,el:*/,://
augroup end
" CMakeLists.txt
augroup cmakelists
au!
autocmd BufRead,BufNewFile *.cmake,CMakeLists.txt setl shiftwidth=2 softtabstop=2
autocmd BufRead,BufNewFile *.cmake,CMakeLists.txt runtime! indent/cmake.vim
augroup end
" Makefiles
augroup makefiles
au!
autocmd BufNewFile,BufRead Makefile,Makefile.am,makefile setl softtabstop=0 shiftwidth=8 noexpandtab
augroup END
augroup python
" Do not unindent comments
autocmd FileType python setlocal autoindent comments=b:#|inoremap # X#
" Indent code blocks
autocmd FileType python setlocal si cinwords=if,elif,else,for,while,try,except,finally,def,class
" Display tabs at the beginning of a line in Python mode as bad
"autocmd BufRead,BufNewFile *.py,*.pyw match pythonSpaceError /^\t\+/
" Wrap text after a certain number of characters
autocmd BufRead,BufNewFile *.py,*.pyw setl textwidth=79
" Indent two spaces
autocmd BufRead,BufNewFile *.py,*.pyw,*.yaml setl shiftwidth=2 softtabstop=2
augroup END
" Special filename handling
augroup filenamespecific
au!
" Format ldscript (linkscript) without extension
autocmd BufNewFile,BufRead ldscript set syntax=ld
augroup end
" .ll and .td (llvm)
augroup llvm
au!
autocmd BufRead,BufNewFile *.td set filetype=tablegen
autocmd BufRead,BufNewFile *.ll set filetype=llvm
autocmd BufRead,BufNewFile *.ll set filetype=llvm
autocmd BufRead,BufNewFile *.ll runtime! indent/llvm.vim
autocmd BufRead,BufNewFile *.ll setl softtabstop=2 shiftwidth=2 expandtab comments+=:;
autocmd BufRead,BufNewFile *.td setl matchpairs+=<:> softtabstop=2 shiftwidth=2 expandtab
augroup end
"if version >= 600
" if has("autocmd")
" "
" " .php
" "
" augroup phpscr
" "
" " Remove all phpscr autocommands
" "
" au!
"
" "
" " PHP settings
" "
" function! PhpSettings()
" :set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
" :highlight rightMargin term=bold ctermfg=blue guifg=blue
" :match rightMargin /.\%>96v/
" endfunction
"
" " When starting to edit a file:
" " For *.php files set formatting of comments and set C-indenting on.
" " For other files switch it off.
" autocmd BufNewFile,BufRead *.php,*.ihtml,*.html,*.inc :call PhpSettings()
" augroup END
"
" "
" " .java
" "
" augroup javascr
" "
" " Remove all javascr autocommands
" "
" au!
"
" "
" " Java settings
" "
"
" " When starting to edit a file:
" " For *.java files set C-indenting on.
" autocmd BufNewFile,BufRead *.java set formatoptions=croql cindent
" augroup END
"
" "
" " .c, cpp
" "
" augroup cprog
" "
" " Remove all cprog autocommands
" "
" au!
"
" "
" " Add function to #define out C code
" "
" function! RemoveCCode()
" execute "normal `>o0\<C-d>#endif /* REMOVED_BLOCK_" . b:removed_count .
" \ " */\<Esc>'<O0\<C-d>#ifdef REMOVED_BLOCK_" . b:removed_count . "\<Esc>j"
" let b:removed_count = b:removed_count + 1
" endfunction
"
" " When starting to edit a file:
" " For *.c and *.h files set formatting of comments and set C-indenting on.
" " For other files switch it off.
" " Removed comments settings since I couldn't figure out if it was necessary anymore. (PK 3/29/05)
" "autocmd BufNewFile,BufRead *.c,*.h set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
" autocmd BufNewFile,BufRead *.c,*.h,*.cpp,*.hpp set formatoptions=croq shiftwidth=2 softtabstop=2 cindent comments=sr:/*,mb:*,el:*/,://
"
" " Allow \xx to #define-out a block of C code
" autocmd BufNewFile,BufRead *.c,*.h,*.cc,*.cpp let b:removed_count=1 | vmap \xx <Esc>:call RemoveCCode()<Return>
"
" " Key mappings for tal Comment Formatter
" autocmd BufNewFile,BufRead *.c,*.h,*.cc vmap ,v ! ~/perl/cor2.pl -l c -b i<CR>
" autocmd BufNewFile,BufRead *.c,*.h,*.cc vmap ,c ! ~/perl/cor2.pl -l c -b c<CR>
" autocmd BufNewFile,BufRead *.c,*.h,*.cc vmap ,b ! ~/perl/cor2.pl -l c -b o<CR>
" autocmd BufNewFile,BufRead *.c,*.h,*.cc vmap ,r ! ~/perl/cor2.pl -l c -r<CR>
"
" " Prevent insertion of '*' at the beginning of every line in a comment
" autocmd BufRead,BufNewFile *.c,*.h set formatoptions-=c formatoptions-=o formatoptions-=r
"
" " Wrap text after a certain number of characters
" autocmd BufRead,BufNewFile *.c,*.h set textwidth=79
"
" " Use clang-format
" map <leader>cf :pyf /home/pmkippes/.vim/clang-format.py<cr>
" vmap <leader>cf :pyf /home/pmkippes/.vim/clang-format.py<cr>
" augroup END
"
" "
" " .txt, .tex
" "
" augroup text
" autocmd BufNewFile,BufRead *.txt,*.tex setlocal linebreak
" autocmd BufNewFile,BufRead *.txt,*.tex setlocal shiftwidth=2 softtabstop=2
"
" " Map movement for visual line movement
" autocmd BufEnter *.txt,*.tex map j gj
" autocmd BufEnter *.txt,*.tex map k gk
" autocmd BufLeave *.txt,*.tex map j j
" autocmd BufLeave *.txt,*.tex map k k
" augroup END
"
" "
" " .f
" "
" augroup fortran
" function! FortranSettings()
" :set ts=6
" ":highlight rightMargin term=bold ctermbg=lightblue guifg=blue
" ":match rightMargin /.\%7v/
" :highlight rightMargin term=bold ctermbg=lightblue guifg=blue guibg=magenta
" :match rightMargin /.\%>73v/
" endfunction
"
" " When starting to edit a file:
" " For *.php files set formatting of comments and set C-indenting on.
" " For other files switch it off.
" autocmd BufNewFile,BufRead *.f :call FortranSettings()
" augroup END
"
" "
" " .r
" "
" augroup rprog
" " Remove all rprog autocommands
" au!
"
" autocmd BufNewFile,BufRead *.r,*.R set formatoptions=croq shiftwidth=2 softtabstop=2 cindent comments=b:#|inoremap # X#
" augroup END
" endif
"endif
"
" Color-terminal highlighting settings
"
"if &t_Co > 2 || has("gui_running")
" " Use the below highlight group when displaying bad whitespace is desired
" let c_space_errors=1 " Highlight C-Spacing "errors"
" let java_space_errors=1 " Highlight Java-Spacing "errors"
" let python_highlight_space_errors=1 " Highlight Python-Spacing "errors"
"
"endif
""
"" Custom commands
""
"command Cfd :cd %:h " Change to the current file's directory
"
""
"" Source additional .vimrc files
""
"if filereadable(expand("$HOME/.vimrc_local"))
" source $HOME/.vimrc_local
"endif
"
"if platform == "win" && filereadable(expand("$APPDATA/_vimrc_local"))
" source $APPDATA/_vimrc_local
"endif
"
"if filereadable(expand("./.vimrc_local"))
" source ./.vimrc_local
"endif
"
"let g:miniBufExplSplitBelow=0
command SpellEn :setlocal spell spelllang=en_us
"command SpellFr :setlocal spell spelllang=fr_fr
" vim:expandtab:softtabstop=2 shiftwidth=2