Mercurial > dotfiles
comparison .chezmoitemplates/config.vim @ 572:21745760a5dc
Use ftplugin and syntax files for language specific settings
author | zegervdv <zegervdv@me.com> |
---|---|
date | Thu, 03 Mar 2022 10:54:39 +0100 |
parents | f845e2eba7e3 |
children | 8b04d5ffd210 |
comparison
equal
deleted
inserted
replaced
571:b2a13ac793ec | 572:21745760a5dc |
---|---|
422 | 422 |
423 " Color errors | 423 " Color errors |
424 syn match Error "\v^ERROR:.*$" | 424 syn match Error "\v^ERROR:.*$" |
425 endfunction | 425 endfunction |
426 " | 426 " |
427 " Git commit messages | |
428 augroup ft_git | |
429 au! | |
430 au FileType gitcommit setlocal spell spelllang=en_gb | |
431 autocmd FileType gitcommit,gitrebase,gitconfig set bufhidden=delete | |
432 augroup END | |
433 " | |
434 " Ruby | |
435 augroup ft_ruby | |
436 au! | |
437 autocmd BufRead *_spec.rb set filetype=rspec | |
438 augroup END | |
439 " | |
440 " Matlab | |
441 augroup ft_matlab | |
442 au! | |
443 autocmd FileType matlab setlocal commentstring=\%\ %s | |
444 augroup END | |
445 " | |
446 " C | |
447 augroup ft_c | |
448 au! | |
449 au FileType c setlocal foldmethod=syntax | |
450 augroup END | |
451 " | |
452 " TCL | |
453 | |
454 augroup ft_tcl | |
455 au! | |
456 autocmd FileType tcl setlocal commentstring=#\ %s | |
457 " autocmd FileType tcl compiler nagelfar | |
458 autocmd BufRead *.do set filetype=tcl | |
459 autocmd BufRead *.hal set filetype=tcl | |
460 autocmd FileType tcl setlocal iskeyword+=: | |
461 autocmd FileType tcl setlocal breakat-=: | |
462 autocmd FileType tcl setlocal suffixesadd+=.tcl,.do | |
463 augroup END | |
464 " shortcuts | |
465 iabbrev procargs array set arg [::argument_processing::proces_arguments $args]; | |
466 " | |
467 " GPG | |
468 " Don't save backups of gpg asc files | |
469 set backupskip+=*.asc | |
470 | |
471 " Convenient editing of ascii-armoured encrypted files | |
472 augroup GPGASCII | |
473 au! | |
474 au BufReadPost *.asc :%!gpg -q -d | |
475 au BufReadPost *.asc |redraw | |
476 au BufWritePre *.asc :%!gpg -q -e -a | |
477 au BufWritePost *.asc u | |
478 au VimLeave *.asc :!clear | |
479 augroup END | |
480 " | |
481 " System Verilog | |
482 augroup ft_systemverilog | |
483 au! | |
484 au FileType systemverilog setlocal suffixesadd+=.sv,.v | |
485 au FileType systemverilog,verilog setlocal iskeyword+=' | |
486 augroup END | |
487 | |
488 " | |
489 " Make | |
490 augroup ft_make | |
491 autocmd! | |
492 autocmd BufEnter *.make setlocal filetype=make | |
493 autocmd FileType make setlocal noexpandtab | |
494 augroup END | |
495 " JSON | |
496 augroup ft_json | |
497 autocmd! | |
498 autocmd FileType json setlocal equalprg=jq | |
499 augroup END | |
500 " | |
501 " | |
502 " Python | |
503 augroup f_python | |
504 autocmd! | |
505 autocmd FileType python setlocal shiftwidth=4 | |
506 au FileType python setlocal formatprg=autopep8\ - | |
507 autocmd FileType python setlocal path-=** | |
508 autocmd Filetype python let b:delimitMate_nesting_quotes = ['"', "'"] | |
509 augroup END | |
510 | |
511 let g:python_highlight_all=1 | |
512 " | |
513 " | |
514 | 427 |
515 " Plugin settings | 428 " Plugin settings |
516 " Gundo tree | 429 " Gundo tree |
517 nnoremap <leader>u :GundoToggle<CR> | 430 nnoremap <leader>u :GundoToggle<CR> |
518 | 431 |