mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 03:53:52 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
739102e06d | ||
|
|
f52f6b9519 | ||
|
|
b6654c85b2 | ||
|
|
e3609fed6b | ||
|
|
7324528984 | ||
|
|
0a2f2cc04d | ||
|
|
6422a5a479 | ||
|
|
113f9b8949 | ||
|
|
f828912a7f | ||
|
|
2522ad2029 | ||
|
|
50a9a7345f |
@@ -7,7 +7,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') ==
|
|||||||
" http://www.vim.org/scripts/script.php?script_id=3064
|
" http://www.vim.org/scripts/script.php?script_id=3064
|
||||||
" Maintainer: bfrg <bfrg@users.noreply.github.com>
|
" Maintainer: bfrg <bfrg@users.noreply.github.com>
|
||||||
" Website: https://github.com/bfrg/vim-cpp-modern
|
" Website: https://github.com/bfrg/vim-cpp-modern
|
||||||
" Last Change: Oct 17, 2020
|
" Last Change: Oct 23, 2020
|
||||||
"
|
"
|
||||||
" Extended C syntax highlighting including highlighting of user-defined
|
" Extended C syntax highlighting including highlighting of user-defined
|
||||||
" functions.
|
" functions.
|
||||||
@@ -34,6 +34,7 @@ if get(g:, 'cpp_member_highlight', 0)
|
|||||||
syn match cStructMember "\<\h\w*\>\%((\|<\)\@!" contained
|
syn match cStructMember "\<\h\w*\>\%((\|<\)\@!" contained
|
||||||
syn cluster cParenGroup add=cStructMember
|
syn cluster cParenGroup add=cStructMember
|
||||||
syn cluster cPreProcGroup add=cStructMember
|
syn cluster cPreProcGroup add=cStructMember
|
||||||
|
syn cluster cMultiGroup add=cStructMember
|
||||||
hi def link cStructMember Identifier
|
hi def link cStructMember Identifier
|
||||||
|
|
||||||
if &filetype ==# 'cpp'
|
if &filetype ==# 'cpp'
|
||||||
@@ -62,6 +63,7 @@ hi def link cAnsiName Identifier
|
|||||||
if get(g:, 'cpp_simple_highlight', 0)
|
if get(g:, 'cpp_simple_highlight', 0)
|
||||||
hi link cStorageClass Statement
|
hi link cStorageClass Statement
|
||||||
hi link cStructure Statement
|
hi link cStructure Statement
|
||||||
|
hi link cTypedef Statement
|
||||||
hi link cLabel Statement
|
hi link cLabel Statement
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ endfunc
|
|||||||
au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
|
au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
|
||||||
|
|
||||||
" Abaqus or Trasys
|
" Abaqus or Trasys
|
||||||
au BufNewFile,BufRead *.inp call dist#ft#Check_inp()
|
au BufNewFile,BufRead *.inp call polyglot#ft#Check_inp()
|
||||||
|
|
||||||
" 8th (Firth-derivative)
|
" 8th (Firth-derivative)
|
||||||
au BufNewFile,BufRead *.8th setf 8th
|
au BufNewFile,BufRead *.8th setf 8th
|
||||||
@@ -160,7 +160,7 @@ au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf
|
|||||||
|
|
||||||
" Assembly (all kinds)
|
" Assembly (all kinds)
|
||||||
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
|
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
|
||||||
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
|
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call polyglot#ft#FTasm()
|
||||||
|
|
||||||
" Macro (VAX)
|
" Macro (VAX)
|
||||||
au BufNewFile,BufRead *.mar setf vmasm
|
au BufNewFile,BufRead *.mar setf vmasm
|
||||||
@@ -190,7 +190,7 @@ au BufNewFile,BufRead *.awk,*.gawk setf awk
|
|||||||
au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
|
au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
|
||||||
|
|
||||||
" BASIC or Visual Basic
|
" BASIC or Visual Basic
|
||||||
au BufNewFile,BufRead *.bas call dist#ft#FTVB("basic")
|
au BufNewFile,BufRead *.bas call polyglot#ft#FTVB("basic")
|
||||||
|
|
||||||
" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
|
" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
|
||||||
au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
|
au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
|
||||||
@@ -208,7 +208,7 @@ au BufNewFile,BufRead *.cmd
|
|||||||
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
|
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
|
||||||
|
|
||||||
" Batch file for 4DOS
|
" Batch file for 4DOS
|
||||||
au BufNewFile,BufRead *.btm call dist#ft#FTbtm()
|
au BufNewFile,BufRead *.btm call polyglot#ft#FTbtm()
|
||||||
|
|
||||||
" BC calculator
|
" BC calculator
|
||||||
au BufNewFile,BufRead *.bc setf bc
|
au BufNewFile,BufRead *.bc setf bc
|
||||||
@@ -228,7 +228,7 @@ au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
|
|||||||
|
|
||||||
" BIND zone
|
" BIND zone
|
||||||
au BufNewFile,BufRead named.root setf bindzone
|
au BufNewFile,BufRead named.root setf bindzone
|
||||||
au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
|
au BufNewFile,BufRead *.db call polyglot#ft#BindzoneCheck('')
|
||||||
|
|
||||||
" Blank
|
" Blank
|
||||||
au BufNewFile,BufRead *.bl setf blank
|
au BufNewFile,BufRead *.bl setf blank
|
||||||
@@ -247,7 +247,7 @@ if has("fname_case")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" C or lpc
|
" C or lpc
|
||||||
au BufNewFile,BufRead *.c call dist#ft#FTlpc()
|
au BufNewFile,BufRead *.c call polyglot#ft#FTlpc()
|
||||||
au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
|
au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
|
||||||
|
|
||||||
" Calendar
|
" Calendar
|
||||||
@@ -302,7 +302,7 @@ endif
|
|||||||
" .h files can be C, Ch C++, ObjC or ObjC++.
|
" .h files can be C, Ch C++, ObjC or ObjC++.
|
||||||
" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
|
" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
|
||||||
" detected automatically.
|
" detected automatically.
|
||||||
au BufNewFile,BufRead *.h call dist#ft#FTheader()
|
au BufNewFile,BufRead *.h call polyglot#ft#FTheader()
|
||||||
|
|
||||||
" Ch (CHscript)
|
" Ch (CHscript)
|
||||||
au BufNewFile,BufRead *.chf setf ch
|
au BufNewFile,BufRead *.chf setf ch
|
||||||
@@ -336,7 +336,7 @@ au BufNewFile,BufRead NEWS
|
|||||||
au BufNewFile,BufRead *..ch setf chill
|
au BufNewFile,BufRead *..ch setf chill
|
||||||
|
|
||||||
" Changes for WEB and CWEB or CHILL
|
" Changes for WEB and CWEB or CHILL
|
||||||
au BufNewFile,BufRead *.ch call dist#ft#FTchange()
|
au BufNewFile,BufRead *.ch call polyglot#ft#FTchange()
|
||||||
|
|
||||||
" ChordPro
|
" ChordPro
|
||||||
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
|
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
|
||||||
@@ -348,7 +348,7 @@ au BufNewFile,BufRead *.dcl,*.icl setf clean
|
|||||||
au BufNewFile,BufRead *.eni setf cl
|
au BufNewFile,BufRead *.eni setf cl
|
||||||
|
|
||||||
" Clever or dtd
|
" Clever or dtd
|
||||||
au BufNewFile,BufRead *.ent call dist#ft#FTent()
|
au BufNewFile,BufRead *.ent call polyglot#ft#FTent()
|
||||||
|
|
||||||
" Clipper (or FoxPro; could also be eviews)
|
" Clipper (or FoxPro; could also be eviews)
|
||||||
au BufNewFile,BufRead *.prg
|
au BufNewFile,BufRead *.prg
|
||||||
@@ -403,9 +403,9 @@ au BufNewFile,BufRead *enlightenment/*.cfg setf c
|
|||||||
au BufNewFile,BufRead *Eterm/*.cfg setf eterm
|
au BufNewFile,BufRead *Eterm/*.cfg setf eterm
|
||||||
|
|
||||||
" Euphoria 3 or 4
|
" Euphoria 3 or 4
|
||||||
au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck()
|
au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call polyglot#ft#EuphoriaCheck()
|
||||||
if has("fname_case")
|
if has("fname_case")
|
||||||
au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck()
|
au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call polyglot#ft#EuphoriaCheck()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Lynx config files
|
" Lynx config files
|
||||||
@@ -462,7 +462,7 @@ au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
|
|||||||
au BufNewFile,BufRead *.desc setf desc
|
au BufNewFile,BufRead *.desc setf desc
|
||||||
|
|
||||||
" the D language or dtrace
|
" the D language or dtrace
|
||||||
au BufNewFile,BufRead *.d call dist#ft#DtraceCheck()
|
au BufNewFile,BufRead *.d call polyglot#ft#DtraceCheck()
|
||||||
|
|
||||||
" Desktop files
|
" Desktop files
|
||||||
au BufNewFile,BufRead *.desktop,*.directory setf desktop
|
au BufNewFile,BufRead *.desktop,*.directory setf desktop
|
||||||
@@ -494,7 +494,7 @@ au BufNewFile,BufRead *.rul
|
|||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
" DCL (Digital Command Language - vms) or DNS zone file
|
" DCL (Digital Command Language - vms) or DNS zone file
|
||||||
au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl')
|
au BufNewFile,BufRead *.com call polyglot#ft#BindzoneCheck('dcl')
|
||||||
|
|
||||||
" DOT
|
" DOT
|
||||||
au BufNewFile,BufRead *.dot,*.gv setf dot
|
au BufNewFile,BufRead *.dot,*.gv setf dot
|
||||||
@@ -542,7 +542,7 @@ au BufNewFile,BufRead .editorconfig setf dosini
|
|||||||
au BufNewFile,BufRead *.ecd setf ecd
|
au BufNewFile,BufRead *.ecd setf ecd
|
||||||
|
|
||||||
" Eiffel or Specman or Euphoria
|
" Eiffel or Specman or Euphoria
|
||||||
au BufNewFile,BufRead *.e,*.E call dist#ft#FTe()
|
au BufNewFile,BufRead *.e,*.E call polyglot#ft#FTe()
|
||||||
|
|
||||||
" Elinks configuration
|
" Elinks configuration
|
||||||
au BufNewFile,BufRead elinks.conf setf elinks
|
au BufNewFile,BufRead elinks.conf setf elinks
|
||||||
@@ -720,7 +720,7 @@ au BufRead,BufNewFile *.hws setf hollywood
|
|||||||
au BufNewFile,BufRead *.t.html setf tilde
|
au BufNewFile,BufRead *.t.html setf tilde
|
||||||
|
|
||||||
" HTML (.shtml and .stm for server side)
|
" HTML (.shtml and .stm for server side)
|
||||||
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
|
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call polyglot#ft#FThtml()
|
||||||
|
|
||||||
" HTML with Ruby - eRuby
|
" HTML with Ruby - eRuby
|
||||||
au BufNewFile,BufRead *.erb,*.rhtml setf eruby
|
au BufNewFile,BufRead *.erb,*.rhtml setf eruby
|
||||||
@@ -747,7 +747,7 @@ au BufNewFile,BufRead *.htt,*.htb setf httest
|
|||||||
au BufNewFile,BufRead *.icn setf icon
|
au BufNewFile,BufRead *.icn setf icon
|
||||||
|
|
||||||
" IDL (Interface Description Language)
|
" IDL (Interface Description Language)
|
||||||
au BufNewFile,BufRead *.idl call dist#ft#FTidl()
|
au BufNewFile,BufRead *.idl call polyglot#ft#FTidl()
|
||||||
|
|
||||||
" Microsoft IDL (Interface Description Language) Also *.idl
|
" Microsoft IDL (Interface Description Language) Also *.idl
|
||||||
" MOF = WMI (Windows Management Instrumentation) Managed Object Format
|
" MOF = WMI (Windows Management Instrumentation) Managed Object Format
|
||||||
@@ -758,10 +758,10 @@ au BufNewFile,BufRead */.icewm/menu setf icemenu
|
|||||||
|
|
||||||
" Indent profile (must come before IDL *.pro!)
|
" Indent profile (must come before IDL *.pro!)
|
||||||
au BufNewFile,BufRead .indent.pro setf indent
|
au BufNewFile,BufRead .indent.pro setf indent
|
||||||
au BufNewFile,BufRead indent.pro call dist#ft#ProtoCheck('indent')
|
au BufNewFile,BufRead indent.pro call polyglot#ft#ProtoCheck('indent')
|
||||||
|
|
||||||
" IDL (Interactive Data Language)
|
" IDL (Interactive Data Language)
|
||||||
au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang')
|
au BufNewFile,BufRead *.pro call polyglot#ft#ProtoCheck('idlang')
|
||||||
|
|
||||||
" Indent RC
|
" Indent RC
|
||||||
au BufNewFile,BufRead indentrc setf indent
|
au BufNewFile,BufRead indentrc setf indent
|
||||||
@@ -981,7 +981,7 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown
|
|||||||
au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
|
au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
|
||||||
|
|
||||||
" Mathematica, Matlab, Murphi or Objective C
|
" Mathematica, Matlab, Murphi or Objective C
|
||||||
au BufNewFile,BufRead *.m call dist#ft#FTm()
|
au BufNewFile,BufRead *.m call polyglot#ft#FTm()
|
||||||
|
|
||||||
" Mathematica notebook
|
" Mathematica notebook
|
||||||
au BufNewFile,BufRead *.nb setf mma
|
au BufNewFile,BufRead *.nb setf mma
|
||||||
@@ -1014,7 +1014,7 @@ au BufNewFile,BufRead *.mgl setf mgl
|
|||||||
au BufNewFile,BufRead *.mix,*.mixal setf mix
|
au BufNewFile,BufRead *.mix,*.mixal setf mix
|
||||||
|
|
||||||
" MMIX or VMS makefile
|
" MMIX or VMS makefile
|
||||||
au BufNewFile,BufRead *.mms call dist#ft#FTmms()
|
au BufNewFile,BufRead *.mms call polyglot#ft#FTmms()
|
||||||
|
|
||||||
" Symbian meta-makefile definition (MMP)
|
" Symbian meta-makefile definition (MMP)
|
||||||
au BufNewFile,BufRead *.mmp setf mmp
|
au BufNewFile,BufRead *.mmp setf mmp
|
||||||
@@ -1105,10 +1105,10 @@ au BufNewFile,BufRead *.me
|
|||||||
\ setf nroff |
|
\ setf nroff |
|
||||||
\ endif
|
\ endif
|
||||||
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
|
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
|
||||||
au BufNewFile,BufRead *.[1-9] call dist#ft#FTnroff()
|
au BufNewFile,BufRead *.[1-9] call polyglot#ft#FTnroff()
|
||||||
|
|
||||||
" Nroff or Objective C++
|
" Nroff or Objective C++
|
||||||
au BufNewFile,BufRead *.mm call dist#ft#FTmm()
|
au BufNewFile,BufRead *.mm call polyglot#ft#FTmm()
|
||||||
|
|
||||||
" Not Quite C
|
" Not Quite C
|
||||||
au BufNewFile,BufRead *.nqc setf nqc
|
au BufNewFile,BufRead *.nqc setf nqc
|
||||||
@@ -1175,9 +1175,9 @@ au BufNewFile,BufRead *.pcmk setf pcmk
|
|||||||
|
|
||||||
" Perl
|
" Perl
|
||||||
if has("fname_case")
|
if has("fname_case")
|
||||||
au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl()
|
au BufNewFile,BufRead *.pl,*.PL call polyglot#ft#FTpl()
|
||||||
else
|
else
|
||||||
au BufNewFile,BufRead *.pl call dist#ft#FTpl()
|
au BufNewFile,BufRead *.pl call polyglot#ft#FTpl()
|
||||||
endif
|
endif
|
||||||
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
|
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
|
||||||
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
|
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
|
||||||
@@ -1253,7 +1253,7 @@ au BufNewFile,BufRead *.pov setf pov
|
|||||||
au BufNewFile,BufRead .povrayrc setf povini
|
au BufNewFile,BufRead .povrayrc setf povini
|
||||||
|
|
||||||
" Povray, PHP or assembly
|
" Povray, PHP or assembly
|
||||||
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
|
au BufNewFile,BufRead *.inc call polyglot#ft#FTinc()
|
||||||
|
|
||||||
" Printcap and Termcap
|
" Printcap and Termcap
|
||||||
au BufNewFile,BufRead *printcap
|
au BufNewFile,BufRead *printcap
|
||||||
@@ -1282,13 +1282,13 @@ au BufNewFile,BufRead *.action setf privoxy
|
|||||||
au BufNewFile,BufRead .procmail,.procmailrc setf procmail
|
au BufNewFile,BufRead .procmail,.procmailrc setf procmail
|
||||||
|
|
||||||
" Progress or CWEB
|
" Progress or CWEB
|
||||||
au BufNewFile,BufRead *.w call dist#ft#FTprogress_cweb()
|
au BufNewFile,BufRead *.w call polyglot#ft#FTprogress_cweb()
|
||||||
|
|
||||||
" Progress or assembly
|
" Progress or assembly
|
||||||
au BufNewFile,BufRead *.i call dist#ft#FTprogress_asm()
|
au BufNewFile,BufRead *.i call polyglot#ft#FTprogress_asm()
|
||||||
|
|
||||||
" Progress or Pascal
|
" Progress or Pascal
|
||||||
au BufNewFile,BufRead *.p call dist#ft#FTprogress_pascal()
|
au BufNewFile,BufRead *.p call polyglot#ft#FTprogress_pascal()
|
||||||
|
|
||||||
" Software Distributor Product Specification File (POSIX 1387.2-1995)
|
" Software Distributor Product Specification File (POSIX 1387.2-1995)
|
||||||
au BufNewFile,BufRead *.psf setf psf
|
au BufNewFile,BufRead *.psf setf psf
|
||||||
@@ -1371,7 +1371,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Rexx, Rebol or R
|
" Rexx, Rebol or R
|
||||||
au BufNewFile,BufRead *.r,*.R call dist#ft#FTr()
|
au BufNewFile,BufRead *.r,*.R call polyglot#ft#FTr()
|
||||||
|
|
||||||
" Remind
|
" Remind
|
||||||
au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
|
au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
|
||||||
@@ -1467,7 +1467,7 @@ au BufNewFile,BufRead *.siv,*.sieve setf sieve
|
|||||||
au BufNewFile,BufRead sendmail.cf setf sm
|
au BufNewFile,BufRead sendmail.cf setf sm
|
||||||
|
|
||||||
" Sendmail .mc files are actually m4. Could also be MS Message text file.
|
" Sendmail .mc files are actually m4. Could also be MS Message text file.
|
||||||
au BufNewFile,BufRead *.mc call dist#ft#McSetf()
|
au BufNewFile,BufRead *.mc call polyglot#ft#McSetf()
|
||||||
|
|
||||||
" Services
|
" Services
|
||||||
au BufNewFile,BufRead */etc/services setf services
|
au BufNewFile,BufRead */etc/services setf services
|
||||||
@@ -1508,9 +1508,9 @@ au BufNewFile,BufRead catalog setf catalog
|
|||||||
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
|
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
|
||||||
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
|
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
|
||||||
" NOTE: Patterns ending in a star are further down, these have lower priority.
|
" NOTE: Patterns ending in a star are further down, these have lower priority.
|
||||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash")
|
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call polyglot#ft#SetFileTypeSH("bash")
|
||||||
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
|
au BufNewFile,BufRead .kshrc,*.ksh call polyglot#ft#SetFileTypeSH("ksh")
|
||||||
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
|
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call polyglot#ft#SetFileTypeSH(getline(1))
|
||||||
|
|
||||||
|
|
||||||
" Shell script (Arch Linux) or PHP file (Drupal)
|
" Shell script (Arch Linux) or PHP file (Drupal)
|
||||||
@@ -1518,15 +1518,15 @@ au BufNewFile,BufRead *.install
|
|||||||
\ if getline(1) =~ '<?php' |
|
\ if getline(1) =~ '<?php' |
|
||||||
\ setf php |
|
\ setf php |
|
||||||
\ else |
|
\ else |
|
||||||
\ call dist#ft#SetFileTypeSH("bash") |
|
\ call polyglot#ft#SetFileTypeSH("bash") |
|
||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
" tcsh scripts (patterns ending in a star further below)
|
" tcsh scripts (patterns ending in a star further below)
|
||||||
au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
|
au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call polyglot#ft#SetFileTypeShell("tcsh")
|
||||||
|
|
||||||
" csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
|
" csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
|
||||||
" (patterns ending in a start further below)
|
" (patterns ending in a start further below)
|
||||||
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
|
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call polyglot#ft#CSH()
|
||||||
|
|
||||||
" Z-Shell script (patterns ending in a star further below)
|
" Z-Shell script (patterns ending in a star further below)
|
||||||
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
|
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
|
||||||
@@ -1597,7 +1597,7 @@ au BufNewFile,BufRead *.mib,*.my setf mib
|
|||||||
|
|
||||||
" Snort Configuration
|
" Snort Configuration
|
||||||
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
|
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
|
||||||
au BufNewFile,BufRead *.rules call dist#ft#FTRules()
|
au BufNewFile,BufRead *.rules call polyglot#ft#FTRules()
|
||||||
|
|
||||||
" Spec (Linux RPM)
|
" Spec (Linux RPM)
|
||||||
au BufNewFile,BufRead *.spec setf spec
|
au BufNewFile,BufRead *.spec setf spec
|
||||||
@@ -1621,7 +1621,7 @@ au BufNewFile,BufRead squid.conf setf squid
|
|||||||
au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
|
au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
|
||||||
|
|
||||||
" SQL
|
" SQL
|
||||||
au BufNewFile,BufRead *.sql call dist#ft#SQL()
|
au BufNewFile,BufRead *.sql call polyglot#ft#SQL()
|
||||||
|
|
||||||
" SQLJ
|
" SQLJ
|
||||||
au BufNewFile,BufRead *.sqlj setf sqlj
|
au BufNewFile,BufRead *.sqlj setf sqlj
|
||||||
@@ -1688,7 +1688,7 @@ au BufNewFile,BufRead *.svg setf svg
|
|||||||
|
|
||||||
" Tads (or Nroff or Perl test file)
|
" Tads (or Nroff or Perl test file)
|
||||||
au BufNewFile,BufRead *.t
|
au BufNewFile,BufRead *.t
|
||||||
\ if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif
|
\ if !polyglot#ft#FTnroff() && !polyglot#ft#FTperl() | setf tads | endif
|
||||||
|
|
||||||
" Tags
|
" Tags
|
||||||
au BufNewFile,BufRead tags setf tags
|
au BufNewFile,BufRead tags setf tags
|
||||||
@@ -1717,7 +1717,7 @@ au BufNewFile,BufRead *.ti setf terminfo
|
|||||||
|
|
||||||
" TeX
|
" TeX
|
||||||
au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
|
au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
|
||||||
au BufNewFile,BufRead *.tex call dist#ft#FTtex()
|
au BufNewFile,BufRead *.tex call polyglot#ft#FTtex()
|
||||||
|
|
||||||
" ConTeXt
|
" ConTeXt
|
||||||
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
|
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
|
||||||
@@ -1820,7 +1820,7 @@ au BufRead,BufNewFile *.hw,*.module,*.pkg
|
|||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
" Visual Basic (also uses *.bas) or FORM
|
" Visual Basic (also uses *.bas) or FORM
|
||||||
au BufNewFile,BufRead *.frm call dist#ft#FTVB("form")
|
au BufNewFile,BufRead *.frm call polyglot#ft#FTVB("form")
|
||||||
|
|
||||||
" SaxBasic is close to Visual Basic
|
" SaxBasic is close to Visual Basic
|
||||||
au BufNewFile,BufRead *.sba setf vb
|
au BufNewFile,BufRead *.sba setf vb
|
||||||
@@ -1916,10 +1916,10 @@ au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xd
|
|||||||
" Xmath
|
" Xmath
|
||||||
au BufNewFile,BufRead *.msc,*.msf setf xmath
|
au BufNewFile,BufRead *.msc,*.msf setf xmath
|
||||||
au BufNewFile,BufRead *.ms
|
au BufNewFile,BufRead *.ms
|
||||||
\ if !dist#ft#FTnroff() | setf xmath | endif
|
\ if !polyglot#ft#FTnroff() | setf xmath | endif
|
||||||
|
|
||||||
" XML specific variants: docbk and xbl
|
" XML specific variants: docbk and xbl
|
||||||
au BufNewFile,BufRead *.xml call dist#ft#FTxml()
|
au BufNewFile,BufRead *.xml call polyglot#ft#FTxml()
|
||||||
|
|
||||||
" XMI (holding UML models) is also XML
|
" XMI (holding UML models) is also XML
|
||||||
au BufNewFile,BufRead *.xmi setf xml
|
au BufNewFile,BufRead *.xmi setf xml
|
||||||
@@ -1966,7 +1966,7 @@ au BufNewFile,BufRead *.xsl,*.xslt setf xslt
|
|||||||
au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
|
au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
|
||||||
|
|
||||||
" Yacc or racc
|
" Yacc or racc
|
||||||
au BufNewFile,BufRead *.y call dist#ft#FTy()
|
au BufNewFile,BufRead *.y call polyglot#ft#FTy()
|
||||||
|
|
||||||
" Yaml
|
" Yaml
|
||||||
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
||||||
@@ -1985,9 +1985,9 @@ au BufNewFile,BufRead *.zut setf zimbutempl
|
|||||||
" Zope
|
" Zope
|
||||||
" dtml (zope dynamic template markup language), pt (zope page template),
|
" dtml (zope dynamic template markup language), pt (zope page template),
|
||||||
" cpt (zope form controller page template)
|
" cpt (zope form controller page template)
|
||||||
au BufNewFile,BufRead *.dtml,*.pt,*.cpt call dist#ft#FThtml()
|
au BufNewFile,BufRead *.dtml,*.pt,*.cpt call polyglot#ft#FThtml()
|
||||||
" zsql (zope sql method)
|
" zsql (zope sql method)
|
||||||
au BufNewFile,BufRead *.zsql call dist#ft#SQL()
|
au BufNewFile,BufRead *.zsql call polyglot#ft#SQL()
|
||||||
|
|
||||||
" Z80 assembler asz80
|
" Z80 assembler asz80
|
||||||
au BufNewFile,BufRead *.z8a setf z8a
|
au BufNewFile,BufRead *.z8a setf z8a
|
||||||
@@ -2152,7 +2152,7 @@ au BufNewFile,BufRead *termcap*
|
|||||||
|
|
||||||
" ReDIF
|
" ReDIF
|
||||||
" Only used when the .rdf file was not detected to be XML.
|
" Only used when the .rdf file was not detected to be XML.
|
||||||
au BufRead,BufNewFile *.rdf call dist#ft#Redif()
|
au BufRead,BufNewFile *.rdf call polyglot#ft#Redif()
|
||||||
|
|
||||||
" Remind
|
" Remind
|
||||||
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||||
@@ -2161,15 +2161,15 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
|||||||
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
||||||
|
|
||||||
" Shell scripts ending in a star
|
" Shell scripts ending in a star
|
||||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
|
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call polyglot#ft#SetFileTypeSH("bash")
|
||||||
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
|
au BufNewFile,BufRead .kshrc* call polyglot#ft#SetFileTypeSH("ksh")
|
||||||
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
|
au BufNewFile,BufRead .profile* call polyglot#ft#SetFileTypeSH(getline(1))
|
||||||
|
|
||||||
" tcsh scripts ending in a star
|
" tcsh scripts ending in a star
|
||||||
au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")
|
au BufNewFile,BufRead .tcshrc* call polyglot#ft#SetFileTypeShell("tcsh")
|
||||||
|
|
||||||
" csh scripts ending in a star
|
" csh scripts ending in a star
|
||||||
au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
|
au BufNewFile,BufRead .login*,.cshrc* call polyglot#ft#CSH()
|
||||||
|
|
||||||
" VHDL
|
" VHDL
|
||||||
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
|
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
" You can also use this as a start for your own set of menus.
|
" You can also use this as a start for your own set of menus.
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2020 Mar 29
|
" Last Change: 2020 Sep 28
|
||||||
|
|
||||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||||
" in all modes and avoid side effects from mappings defined by the user.
|
" in all modes and avoid side effects from mappings defined by the user.
|
||||||
@@ -89,6 +89,21 @@ an 9999.75 &Help.-sep2- <Nop>
|
|||||||
an 9999.80 &Help.&Version :version<CR>
|
an 9999.80 &Help.&Version :version<CR>
|
||||||
an 9999.90 &Help.&About :intro<CR>
|
an 9999.90 &Help.&About :intro<CR>
|
||||||
|
|
||||||
|
if exists(':tlmenu')
|
||||||
|
tlnoremenu 9999.10 &Help.&Overview<Tab><F1> <C-W>:help<CR>
|
||||||
|
tlnoremenu 9999.20 &Help.&User\ Manual <C-W>:help usr_toc<CR>
|
||||||
|
tlnoremenu 9999.30 &Help.&How-To\ Links <C-W>:help how-to<CR>
|
||||||
|
tlnoremenu <silent> 9999.40 &Help.&Find\.\.\. <C-W>:call <SID>Helpfind()<CR>
|
||||||
|
tlnoremenu 9999.45 &Help.-sep1- <Nop>
|
||||||
|
tlnoremenu 9999.50 &Help.&Credits <C-W>:help credits<CR>
|
||||||
|
tlnoremenu 9999.60 &Help.Co&pying <C-W>:help copying<CR>
|
||||||
|
tlnoremenu 9999.70 &Help.&Sponsor/Register <C-W>:help sponsor<CR>
|
||||||
|
tlnoremenu 9999.70 &Help.O&rphans <C-W>:help kcc<CR>
|
||||||
|
tlnoremenu 9999.75 &Help.-sep2- <Nop>
|
||||||
|
tlnoremenu 9999.80 &Help.&Version <C-W>:version<CR>
|
||||||
|
tlnoremenu 9999.90 &Help.&About <C-W>:intro<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
fun! s:Helpfind()
|
fun! s:Helpfind()
|
||||||
if !exists("g:menutrans_help_dialog")
|
if !exists("g:menutrans_help_dialog")
|
||||||
let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_<Del>)\nPrepend ' for an option name (e.g.: 'shiftwidth')"
|
let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_<Del>)\nPrepend ' for an option name (e.g.: 'shiftwidth')"
|
||||||
@@ -1196,4 +1211,3 @@ let &cpo = s:cpo_save
|
|||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
" vim: set sw=2 :
|
" vim: set sw=2 :
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ if exists("did_load_polyglot")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
let did_load_polyglot = 1
|
let did_load_polyglot = 1
|
||||||
|
|
||||||
" Switch to compatible mode for the time being
|
" Switch to compatible mode for the time being
|
||||||
@@ -25,14 +26,6 @@ let did_load_filetypes = 1
|
|||||||
" Be consistent across different systems
|
" Be consistent across different systems
|
||||||
set nofileignorecase
|
set nofileignorecase
|
||||||
|
|
||||||
func! s:Observe(fn)
|
|
||||||
let b:PolyglotObserve = function("polyglot#" . a:fn)
|
|
||||||
augroup polyglot-observer
|
|
||||||
au! CursorHold,CursorHoldI,BufWritePost <buffer>
|
|
||||||
\ if b:PolyglotObserve() | au! polyglot-observer | endif
|
|
||||||
augroup END
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
let s:disabled_packages = {}
|
let s:disabled_packages = {}
|
||||||
let s:new_polyglot_disabled = []
|
let s:new_polyglot_disabled = []
|
||||||
|
|
||||||
@@ -112,6 +105,8 @@ func! s:StarSetf(ft)
|
|||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
augroup polyglot-observer | augroup END
|
||||||
|
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
|
|
||||||
" Load user-defined filetype.vim and oter plugins ftdetect first
|
" Load user-defined filetype.vim and oter plugins ftdetect first
|
||||||
@@ -2621,12 +2616,22 @@ endif
|
|||||||
|
|
||||||
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
||||||
|
|
||||||
au! BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
|
func! s:Observe(fn)
|
||||||
|
let b:PolyglotObserve = function("polyglot#" . a:fn)
|
||||||
|
augroup polyglot-observer
|
||||||
|
au!
|
||||||
|
au CursorHold,CursorHoldI,BufWritePost <buffer> call b:PolyglotObserve()
|
||||||
|
augroup END
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
au BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
|
||||||
\ call polyglot#shebang#Detect() | endif
|
\ call polyglot#shebang#Detect() | endif
|
||||||
|
|
||||||
au BufEnter * if &ft == "" && expand("<afile>:e") == "" |
|
au BufWinEnter * if &ft == "" && expand("<afile>:e") == "" |
|
||||||
\ call s:Observe('shebang#Detect') | endif
|
\ call s:Observe('shebang#Detect') | endif
|
||||||
|
|
||||||
|
au FileType * au! polyglot-observer
|
||||||
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
|
||||||
@@ -2638,13 +2643,25 @@ if !has_key(s:disabled_packages, 'autoindent')
|
|||||||
let &tabstop = 2
|
let &tabstop = 2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let s:default_shiftwidth = &shiftwidth
|
||||||
|
|
||||||
func! s:get_shiftwidth(indents) abort
|
func! s:get_shiftwidth(indents) abort
|
||||||
let shiftwidth = 0
|
let shiftwidth = 0
|
||||||
let max_count = 0
|
let max_count = 0
|
||||||
|
let final_counts = {}
|
||||||
for [indent, indent_count] in items(a:indents)
|
for [indent, indent_count] in items(a:indents)
|
||||||
if indent_count > max_count
|
let indent_count = indent_count * 1.5
|
||||||
|
for [indent2, indent2_count] in items(a:indents)
|
||||||
|
if indent2 > indent && indent2 % indent == 0
|
||||||
|
let indent_count = indent_count + indent2_count
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
let final_counts[indent] = indent_count
|
||||||
|
endfor
|
||||||
|
for [indent, final_count] in items(final_counts)
|
||||||
|
if final_count > max_count
|
||||||
let shiftwidth = indent
|
let shiftwidth = indent
|
||||||
let max_count = indent_count
|
let max_count = final_count
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
return shiftwidth
|
return shiftwidth
|
||||||
@@ -2770,7 +2787,13 @@ if !has_key(s:disabled_packages, 'autoindent')
|
|||||||
if shiftwidth > 0
|
if shiftwidth > 0
|
||||||
setlocal expandtab
|
setlocal expandtab
|
||||||
let &l:shiftwidth=shiftwidth
|
let &l:shiftwidth=shiftwidth
|
||||||
let &l:softtabstop=shiftwidth
|
try
|
||||||
|
" Sunchronize tabstop with shiftwidth
|
||||||
|
let &l:softtabstop = -1
|
||||||
|
catch /^Vim\%((\a\+)\)\=:E487/
|
||||||
|
" -1 was not supported before Vim 7.4
|
||||||
|
let &l:softtabstop = a:num_spaces
|
||||||
|
endtry
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -2782,8 +2805,8 @@ if !has_key(s:disabled_packages, 'autoindent')
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Do not autodetect indent if language sets it
|
" Do not autodetect indent if language or user sets it
|
||||||
if &l:shiftwidth != &g:shiftwidth
|
if &l:shiftwidth != s:default_shiftwidth
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -3469,6 +3492,30 @@ if exists("did_load_filetypes") && exists("g:polyglot_disabled")
|
|||||||
runtime! extras/filetype.vim
|
runtime! extras/filetype.vim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if !has_key(s:disabled_packages, 'sensible')
|
||||||
|
" Reload unchanged files automatically.
|
||||||
|
set autoread
|
||||||
|
|
||||||
|
" Disable swap, it doesn't play well with autoread
|
||||||
|
set noswapfile
|
||||||
|
|
||||||
|
" Auto reload if file was changed somewhere else (for autoread)
|
||||||
|
augroup polyglot-sensible
|
||||||
|
au!
|
||||||
|
au CursorHold * checktime
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" Enable highlighted case-insensitive incremential search.
|
||||||
|
set incsearch
|
||||||
|
|
||||||
|
" Use utf-8 encoding by default
|
||||||
|
set encoding=utf-8
|
||||||
|
|
||||||
|
" Autoindent when starting new line, or using `o` or `O`.
|
||||||
|
set autoindent
|
||||||
|
endif
|
||||||
|
|
||||||
" Restore 'cpoptions'
|
" Restore 'cpoptions'
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|||||||
@@ -17,12 +17,11 @@ endif
|
|||||||
" and (mostly comments) from https://github.com/sheerun/vimrc
|
" and (mostly comments) from https://github.com/sheerun/vimrc
|
||||||
"
|
"
|
||||||
" Only settings that matter for proper editing are left
|
" Only settings that matter for proper editing are left
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible')
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -1
|
||||||
" Autoindent when starting new line, or using `o` or `O`.
|
|
||||||
set autoindent
|
|
||||||
|
|
||||||
" Allow backspace in insert mode.
|
" Allow backspace in insert mode.
|
||||||
set backspace=indent,eol,start
|
if &backspace == ""
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
endif
|
||||||
|
|
||||||
" Allow for mappings including `Esc`, while preserving
|
" Allow for mappings including `Esc`, while preserving
|
||||||
" zero timeout after pressing it manually.
|
" zero timeout after pressing it manually.
|
||||||
@@ -32,12 +31,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible')
|
|||||||
set ttimeoutlen=100
|
set ttimeoutlen=100
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Enable highlighted case-insensitive incremential search.
|
|
||||||
set incsearch
|
|
||||||
|
|
||||||
" Use utf-8 encoding by default
|
|
||||||
set encoding=utf-8
|
|
||||||
|
|
||||||
" Set default whitespace characters when using `:set list`
|
" Set default whitespace characters when using `:set list`
|
||||||
if &listchars ==# 'eol:$'
|
if &listchars ==# 'eol:$'
|
||||||
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||||
@@ -59,9 +52,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible')
|
|||||||
set shell=/usr/bin/env\ bash
|
set shell=/usr/bin/env\ bash
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Reload unchanged files automatically.
|
|
||||||
set autoread
|
|
||||||
|
|
||||||
" Increase history size to 1000 items.
|
" Increase history size to 1000 items.
|
||||||
if &history < 1000
|
if &history < 1000
|
||||||
set history=1000
|
set history=1000
|
||||||
@@ -72,6 +62,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible')
|
|||||||
set tabpagemax=50
|
set tabpagemax=50
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Reduce updatetime from 4000 to 300 to avoid issues with coc.nvim
|
||||||
|
if &updatetime == 4000
|
||||||
|
set updatetime=300
|
||||||
|
endif
|
||||||
|
|
||||||
" Always save upper case variables to viminfo file.
|
" Always save upper case variables to viminfo file.
|
||||||
if !empty(&viminfo)
|
if !empty(&viminfo)
|
||||||
set viminfo^=!
|
set viminfo^=!
|
||||||
|
|||||||
@@ -890,7 +890,9 @@ def generate_fallback
|
|||||||
filetype_content.gsub!(/^au BufNewFile,BufRead \*\n.+?runtime!.+?endif/m) {}
|
filetype_content.gsub!(/^au BufNewFile,BufRead \*\n.+?runtime!.+?endif/m) {}
|
||||||
filetype_content.gsub!(/^au StdinReadPost \* .+?runtime!.+?endif/m) {}
|
filetype_content.gsub!(/^au StdinReadPost \* .+?runtime!.+?endif/m) {}
|
||||||
filetype_content.gsub!(/^au filetypedetect BufNewFile,BufRead,StdinReadPost \*\n.+?endif/m) {}
|
filetype_content.gsub!(/^au filetypedetect BufNewFile,BufRead,StdinReadPost \*\n.+?endif/m) {}
|
||||||
|
filetype_content.gsub!("dist#ft#", "polyglot#ft#")
|
||||||
File.write('extras/filetype.vim', filetype_content)
|
File.write('extras/filetype.vim', filetype_content)
|
||||||
|
File.write('extras/menu.vim', File.read('tmp/vim/vim/runtime/menu.vim'))
|
||||||
|
|
||||||
autoload_content = File.read('tmp/vim/vim/runtime/autoload/dist/ft.vim')
|
autoload_content = File.read('tmp/vim/vim/runtime/autoload/dist/ft.vim')
|
||||||
autoload_content.gsub!('dist#ft#', 'polyglot#ft#')
|
autoload_content.gsub!('dist#ft#', 'polyglot#ft#')
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ syn keyword qmlRepeat while for do in
|
|||||||
syn keyword qmlBranch break continue
|
syn keyword qmlBranch break continue
|
||||||
syn keyword qmlOperator new delete instanceof typeof
|
syn keyword qmlOperator new delete instanceof typeof
|
||||||
syn keyword qmlJsType Array Boolean Date Function Number Object String RegExp
|
syn keyword qmlJsType Array Boolean Date Function Number Object String RegExp
|
||||||
syn keyword qmlType action alias bool color date double enumeration font int list point real rect size string time url variant vector3d
|
syn keyword qmlType action alias bool color date double enumeration font int list point real rect size string time url variant vector2d vector3d vector4d
|
||||||
syn keyword qmlStatement return with
|
syn keyword qmlStatement return with
|
||||||
syn keyword qmlBoolean true false
|
syn keyword qmlBoolean true false
|
||||||
syn keyword qmlNull null undefined
|
syn keyword qmlNull null undefined
|
||||||
|
|||||||
Reference in New Issue
Block a user