Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SCRIPT /data/roxma/test/starttime/min.vim
- Sourced 1 time
- Total time: 0.021527
- Self time: 0.000375
- count total (s) self (s)
- 1 0.000012 set nocompatible
- 1 0.000052 syntax on
- 1 0.000057 filetype plugin indent on
- 1 0.000013 set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8
- 1 0.000009 set rtp+=.
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/syntax/syntax.vim
- Sourced 1 time
- Total time: 0.020956
- Self time: 0.000379
- count total (s) self (s)
- " Vim syntax support file
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last Change: 2001 Sep 04
- " This file is used for ":syntax on".
- " It installs the autocommands and starts highlighting for all buffers.
- 1 0.000032 if !has("syntax")
- finish
- endif
- " If Syntax highlighting appears to be on already, turn it off first, so that
- " any leftovers are cleared.
- 1 0.000010 if exists("syntax_on") || exists("syntax_manual")
- so <sfile>:p:h/nosyntax.vim
- endif
- " Load the Syntax autocommands and set the default methods for highlighting.
- 1 0.000094 runtime syntax/synload.vim
- " Load the FileType autocommands if not done yet.
- 1 0.000007 if exists("did_load_filetypes")
- let s:did_ft = 1
- else
- 1 0.000079 filetype on
- 1 0.000006 let s:did_ft = 0
- 1 0.000001 endif
- " Set up the connection between FileType and Syntax autocommands.
- " This makes the syntax automatically set when the file type is detected.
- 1 0.000002 augroup syntaxset
- 1 0.000006 au! FileType * exe "set syntax=" . expand("<amatch>")
- 1 0.000001 augroup END
- " Execute the syntax autocommands for the each buffer.
- " If the filetype wasn't detected yet, do that now.
- " Always do the syntaxset autocommands, for buffers where the 'filetype'
- " already was set manually (e.g., help buffers).
- 1 0.000002 doautoall syntaxset FileType
- 1 0.000002 if !s:did_ft
- 1 0.000002 doautoall filetypedetect BufRead
- 1 0.000002 endif
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/syntax/synload.vim
- Sourced 1 time
- Total time: 0.000940
- Self time: 0.000417
- count total (s) self (s)
- " Vim syntax support file
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last Change: 2012 Sep 25
- " This file sets up for syntax highlighting.
- " It is loaded from "syntax.vim" and "manual.vim".
- " 1. Set the default highlight groups.
- " 2. Install Syntax autocommands for all the available syntax files.
- 1 0.000009 if !has("syntax")
- finish
- endif
- " let others know that syntax has been switched on
- 1 0.000015 let syntax_on = 1
- " Set the default highlighting colors. Use a color scheme if specified.
- 1 0.000004 if exists("colors_name")
- exe "colors " . colors_name
- else
- 1 0.000087 runtime! syntax/syncolor.vim
- 1 0.000005 endif
- " Line continuation is used here, remove 'C' from 'cpoptions'
- 1 0.000019 let s:cpo_save = &cpo
- 1 0.000016 set cpo&vim
- " First remove all old syntax autocommands.
- 1 0.000005 au! Syntax
- 1 0.000010 au Syntax * call s:SynSet()
- 1 0.000010 fun! s:SynSet()
- " clear syntax for :set syntax=OFF and any syntax name that doesn't exist
- syn clear
- if exists("b:current_syntax")
- unlet b:current_syntax
- endif
- let s = expand("<amatch>")
- if s == "ON"
- " :set syntax=ON
- if &filetype == ""
- echohl ErrorMsg
- echo "filetype unknown"
- echohl None
- endif
- let s = &filetype
- elseif s == "OFF"
- let s = ""
- endif
- if s != ""
- " Load the syntax file(s). When there are several, separated by dots,
- " load each in sequence.
- for name in split(s, '\.')
- exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
- endfor
- endif
- endfun
- " Handle adding doxygen to other languages (C, C++, C#, IDL, java, php, DataScript)
- 1 0.000031 au Syntax c,cpp,cs,idl,java,php,datascript
- \ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax)
- \ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax)
- \ | runtime! syntax/doxygen.vim
- \ | endif
- " Source the user-specified syntax highlighting file
- 1 0.000009 if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
- execute "source " . mysyntaxfile
- endif
- " Restore 'cpoptions'
- 1 0.000013 let &cpo = s:cpo_save
- 1 0.000006 unlet s:cpo_save
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/syntax/syncolor.vim
- Sourced 1 time
- Total time: 0.000490
- Self time: 0.000490
- count total (s) self (s)
- " Vim syntax support file
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last Change: 2001 Sep 12
- " This file sets up the default methods for highlighting.
- " It is loaded from "synload.vim" and from Vim for ":syntax reset".
- " Also used from init_highlight().
- 1 0.000009 if !exists("syntax_cmd") || syntax_cmd == "on"
- " ":syntax on" works like in Vim 5.7: set colors but keep links
- 1 0.000017 command -nargs=* SynColor hi <args>
- 1 0.000006 command -nargs=* SynLink hi link <args>
- 1 0.000002 else
- if syntax_cmd == "enable"
- " ":syntax enable" keeps any existing colors
- command -nargs=* SynColor hi def <args>
- command -nargs=* SynLink hi def link <args>
- elseif syntax_cmd == "reset"
- " ":syntax reset" resets all colors to the default
- command -nargs=* SynColor hi <args>
- command -nargs=* SynLink hi! link <args>
- else
- " User defined syncolor file has already set the colors.
- finish
- endif
- endif
- " Many terminals can only use six different colors (plus black and white).
- " Therefore the number of colors used is kept low. It doesn't look nice with
- " too many colors anyway.
- " Careful with "cterm=bold", it changes the color to bright for some terminals.
- " There are two sets of defaults: for a dark and a light background.
- 1 0.000007 if &background == "dark"
- SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE
- SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE
- SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE
- SynColor Identifier term=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE
- SynColor Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE
- SynColor PreProc term=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE
- SynColor Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE
- SynColor Underlined term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff
- SynColor Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE
- else
- 1 0.000018 SynColor Comment term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE
- 1 0.000021 SynColor Constant term=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE
- 1 0.000045 SynColor Special term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=SlateBlue guibg=NONE
- 1 0.000012 SynColor Identifier term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE
- 1 0.000010 SynColor Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE
- 1 0.000019 SynColor PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE
- 1 0.000019 SynColor Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE
- 1 0.000018 SynColor Underlined term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue
- 1 0.000017 SynColor Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE
- 1 0.000002 endif
- 1 0.000030 SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red
- 1 0.000023 SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow
- " Common groups that link to default highlighting.
- " You can specify other highlighting easily.
- 1 0.000007 SynLink String Constant
- 1 0.000005 SynLink Character Constant
- 1 0.000005 SynLink Number Constant
- 1 0.000007 SynLink Boolean Constant
- 1 0.000004 SynLink Float Number
- 1 0.000004 SynLink Function Identifier
- 1 0.000005 SynLink Conditional Statement
- 1 0.000005 SynLink Repeat Statement
- 1 0.000005 SynLink Label Statement
- 1 0.000005 SynLink Operator Statement
- 1 0.000005 SynLink Keyword Statement
- 1 0.000004 SynLink Exception Statement
- 1 0.000005 SynLink Include PreProc
- 1 0.000005 SynLink Define PreProc
- 1 0.000005 SynLink Macro PreProc
- 1 0.000005 SynLink PreCondit PreProc
- 1 0.000005 SynLink StorageClass Type
- 1 0.000015 SynLink Structure Type
- 1 0.000005 SynLink Typedef Type
- 1 0.000005 SynLink Tag Special
- 1 0.000006 SynLink SpecialChar Special
- 1 0.000005 SynLink Delimiter Special
- 1 0.000006 SynLink SpecialComment Special
- 1 0.000006 SynLink Debug Special
- 1 0.000003 delcommand SynColor
- 1 0.000004 delcommand SynLink
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/filetype.vim
- Sourced 2 times
- Total time: 0.019585
- Self time: 0.019585
- count total (s) self (s)
- " Vim support file to detect file types
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last Change: 2016 Jul 21
- " Listen very carefully, I will say this only once
- 2 0.000013 if exists("did_load_filetypes")
- 1 0.000002 finish
- endif
- 1 0.000005 let did_load_filetypes = 1
- " Line continuation is used here, remove 'C' from 'cpoptions'
- 1 0.000047 let s:cpo_save = &cpo
- 1 0.000012 set cpo&vim
- 1 0.000003 augroup filetypedetect
- " Ignored extensions
- 1 0.000009 if exists("*fnameescape")
- 1 0.000086 au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew,?\+.pacsave,?\+.pacnew
- \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r"))
- 1 0.000013 au BufNewFile,BufRead *~
- \ let s:name = expand("<afile>") |
- \ let s:short = substitute(s:name, '\~$', '', '') |
- \ if s:name != s:short && s:short != "" |
- \ exe "doau filetypedetect BufRead " . fnameescape(s:short) |
- \ endif |
- \ unlet! s:name s:short
- 1 0.000010 au BufNewFile,BufRead ?\+.in
- \ if expand("<afile>:t") != "configure.in" |
- \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) |
- \ endif
- 1 0.000003 elseif &verbose > 0
- echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()"
- endif
- " Pattern used to match file names which should not be inspected.
- " Currently finds compressed files.
- 1 0.000004 if !exists("g:ft_ignore_pat")
- 1 0.000020 let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
- 1 0.000002 endif
- " Function used for patterns that end in a star: don't set the filetype if the
- " file name matches ft_ignore_pat.
- 1 0.000005 func! s:StarSetf(ft)
- if expand("<amatch>") !~ g:ft_ignore_pat
- exe 'setf ' . a:ft
- endif
- endfunc
- " Abaqus or Trasys
- 1 0.000006 au BufNewFile,BufRead *.inp call s:Check_inp()
- 1 0.000002 func! s:Check_inp()
- if getline(1) =~ '^\*'
- setf abaqus
- else
- let n = 1
- if line("$") > 500
- let nmax = 500
- else
- let nmax = line("$")
- endif
- while n <= nmax
- if getline(n) =~? "^header surface data"
- setf trasys
- break
- endif
- let n = n + 1
- endwhile
- endif
- endfunc
- " A-A-P recipe
- 1 0.000008 au BufNewFile,BufRead *.aap setf aap
- " A2ps printing utility
- 1 0.000033 au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps
- " ABAB/4
- 1 0.000046 au BufNewFile,BufRead *.abap setf abap
- " ABC music notation
- 1 0.000005 au BufNewFile,BufRead *.abc setf abc
- " ABEL
- 1 0.000004 au BufNewFile,BufRead *.abl setf abel
- " AceDB
- 1 0.000005 au BufNewFile,BufRead *.wrm setf acedb
- " Ada (83, 9X, 95)
- 1 0.000017 au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada
- 1 0.000006 au BufNewFile,BufRead *.gpr setf ada
- " AHDL
- 1 0.000008 au BufNewFile,BufRead *.tdf setf ahdl
- " AMPL
- 1 0.000010 au BufNewFile,BufRead *.run setf ampl
- " Ant
- 1 0.000009 au BufNewFile,BufRead build.xml setf ant
- " Arduino
- 1 0.000008 au BufNewFile,BufRead *.ino,*.pde setf arduino
- " Apache style config file
- 1 0.000006 au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
- " Apache config file
- 1 0.000012 au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache
- " XA65 MOS6510 cross assembler
- 1 0.000006 au BufNewFile,BufRead *.a65 setf a65
- " Applescript
- 1 0.000009 au BufNewFile,BufRead *.scpt setf applescript
- " Applix ELF
- 1 0.000009 au BufNewFile,BufRead *.am
- \ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
- " ALSA configuration
- 1 0.000023 au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
- " Arc Macro Language
- 1 0.000010 au BufNewFile,BufRead *.aml setf aml
- " APT config file
- 1 0.000014 au BufNewFile,BufRead apt.conf setf aptconf
- 1 0.000030 au BufNewFile,BufRead */.aptitude/config setf aptconf
- 1 0.000023 au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf
- " Arch Inventory file
- 1 0.000117 au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch
- " ART*Enterprise (formerly ART-IM)
- 1 0.000021 au BufNewFile,BufRead *.art setf art
- " AsciiDoc
- 1 0.000166 au BufNewFile,BufRead *.asciidoc,*.adoc setf asciidoc
- " ASN.1
- 1 0.000012 au BufNewFile,BufRead *.asn,*.asn1 setf asn
- " Active Server Pages (with Visual Basic Script)
- 1 0.000007 au BufNewFile,BufRead *.asa
- \ if exists("g:filetype_asa") |
- \ exe "setf " . g:filetype_asa |
- \ else |
- \ setf aspvbs |
- \ endif
- " Active Server Pages (with Perl or Visual Basic Script)
- 1 0.000014 au BufNewFile,BufRead *.asp
- \ if exists("g:filetype_asp") |
- \ exe "setf " . g:filetype_asp |
- \ elseif getline(1) . getline(2) . getline(3) =~? "perlscript" |
- \ setf aspperl |
- \ else |
- \ setf aspvbs |
- \ endif
- " Grub (must be before catch *.lst)
- 1 0.000020 au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
- " Assembly (all kinds)
- " *.lst is not pure assembly, it has two extra columns (address, byte codes)
- 1 0.000026 au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call s:FTasm()
- " This function checks for the kind of assembly that is wanted by the user, or
- " can be detected from the first five lines of the file.
- 1 0.000007 func! s:FTasm()
- " make sure b:asmsyntax exists
- if !exists("b:asmsyntax")
- let b:asmsyntax = ""
- endif
- if b:asmsyntax == ""
- call s:FTasmsyntax()
- endif
- " if b:asmsyntax still isn't set, default to asmsyntax or GNU
- if b:asmsyntax == ""
- if exists("g:asmsyntax")
- let b:asmsyntax = g:asmsyntax
- else
- let b:asmsyntax = "asm"
- endif
- endif
- exe "setf " . fnameescape(b:asmsyntax)
- endfunc
- 1 0.000002 func! s:FTasmsyntax()
- " see if file contains any asmsyntax=foo overrides. If so, change
- " b:asmsyntax appropriately
- let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4).
- \" ".getline(5)." "
- let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s')
- if match != ''
- let b:asmsyntax = match
- elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library'))
- let b:asmsyntax = "vmasm"
- endif
- endfunc
- " Macro (VAX)
- 1 0.000006 au BufNewFile,BufRead *.mar setf vmasm
- " Atlas
- 1 0.000024 au BufNewFile,BufRead *.atl,*.as setf atlas
- " Autoit v3
- 1 0.000010 au BufNewFile,BufRead *.au3 setf autoit
- " Autohotkey
- 1 0.000007 au BufNewFile,BufRead *.ahk setf autohotkey
- " Automake
- 1 0.000049 au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
- " Autotest .at files are actually m4
- 1 0.000006 au BufNewFile,BufRead *.at setf m4
- " Avenue
- 1 0.000004 au BufNewFile,BufRead *.ave setf ave
- " Awk
- 1 0.000004 au BufNewFile,BufRead *.awk setf awk
- " B
- 1 0.000044 au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
- " BASIC or Visual Basic
- 1 0.000008 au BufNewFile,BufRead *.bas call s:FTVB("basic")
- " Check if one of the first five lines contains "VB_Name". In that case it is
- " probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype.
- 1 0.000005 func! s:FTVB(alt)
- if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
- setf vb
- else
- exe "setf " . a:alt
- endif
- endfunc
- " Visual Basic Script (close to Visual Basic) or Visual Basic .NET
- 1 0.000027 au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
- " IBasic file (similar to QBasic)
- 1 0.000008 au BufNewFile,BufRead *.iba,*.ibi setf ibasic
- " FreeBasic file (similar to QBasic)
- 1 0.000010 au BufNewFile,BufRead *.fb,*.bi setf freebasic
- " Batch file for MSDOS.
- 1 0.000009 au BufNewFile,BufRead *.bat,*.sys setf dosbatch
- " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
- 1 0.000006 au BufNewFile,BufRead *.cmd
- \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
- " Batch file for 4DOS
- 1 0.000004 au BufNewFile,BufRead *.btm call s:FTbtm()
- 1 0.000003 func! s:FTbtm()
- if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm
- setf dosbatch
- else
- setf btm
- endif
- endfunc
- " BC calculator
- 1 0.000004 au BufNewFile,BufRead *.bc setf bc
- " BDF font
- 1 0.000006 au BufNewFile,BufRead *.bdf setf bdf
- " BibTeX bibliography database file
- 1 0.000004 au BufNewFile,BufRead *.bib setf bib
- " BibTeX Bibliography Style
- 1 0.000004 au BufNewFile,BufRead *.bst setf bst
- " BIND configuration
- 1 0.000010 au BufNewFile,BufRead named.conf,rndc.conf setf named
- " BIND zone
- 1 0.000007 au BufNewFile,BufRead named.root setf bindzone
- 1 0.000004 au BufNewFile,BufRead *.db call s:BindzoneCheck('')
- 1 0.000002 func! s:BindzoneCheck(default)
- if getline(1).getline(2).getline(3).getline(4) =~ '^; <<>> DiG [0-9.]\+ <<>>\|BIND.*named\|$ORIGIN\|$TTL\|IN\s\+SOA'
- setf bindzone
- elseif a:default != ''
- exe 'setf ' . a:default
- endif
- endfunc
- " Blank
- 1 0.000005 au BufNewFile,BufRead *.bl setf blank
- " Blkid cache file
- 1 0.000014 au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
- " Bazel (http://bazel.io)
- 1 0.000019 autocmd BufRead,BufNewFile *.bzl,BUILD,WORKSPACE setfiletype bzl
- " C or lpc
- 1 0.000007 au BufNewFile,BufRead *.c call s:FTlpc()
- 1 0.000002 func! s:FTlpc()
- if exists("g:lpc_syntax_for_c")
- let lnum = 1
- while lnum <= 12
- if getline(lnum) =~# '^\(//\|inherit\|private\|protected\|nosave\|string\|object\|mapping\|mixed\)'
- setf lpc
- return
- endif
- let lnum = lnum + 1
- endwhile
- endif
- setf c
- endfunc
- " Calendar
- 1 0.000005 au BufNewFile,BufRead calendar setf calendar
- " C#
- 1 0.000012 au BufNewFile,BufRead *.cs setf cs
- " CSDL
- 1 0.000008 au BufNewFile,BufRead *.csdl setf csdl
- " Cabal
- 1 0.000008 au BufNewFile,BufRead *.cabal setf cabal
- " Cdrdao TOC
- 1 0.000011 au BufNewFile,BufRead *.toc setf cdrtoc
- " Cdrdao config
- 1 0.000038 au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf
- " Cfengine
- 1 0.000012 au BufNewFile,BufRead cfengine.conf setf cfengine
- " ChaiScript
- 1 0.000006 au BufRead,BufNewFile *.chai setf chaiscript
- " Comshare Dimension Definition Language
- 1 0.000005 au BufNewFile,BufRead *.cdl setf cdl
- " Conary Recipe
- 1 0.000005 au BufNewFile,BufRead *.recipe setf conaryrecipe
- " Controllable Regex Mutilator
- 1 0.000004 au BufNewFile,BufRead *.crm setf crm
- " Cyn++
- 1 0.000008 au BufNewFile,BufRead *.cyn setf cynpp
- " Cynlib
- " .cc and .cpp files can be C++ or Cynlib.
- 1 0.000006 au BufNewFile,BufRead *.cc
- \ if exists("cynlib_syntax_for_cc")|setf cynlib|else|setf cpp|endif
- 1 0.000007 au BufNewFile,BufRead *.cpp
- \ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif
- " C++
- 1 0.000049 au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp
- 1 0.000006 if has("fname_case")
- 1 0.000016 au BufNewFile,BufRead *.C,*.H setf cpp
- 1 0.000002 endif
- " .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
- " detected automatically.
- 1 0.000007 au BufNewFile,BufRead *.h call s:FTheader()
- 1 0.000005 func! s:FTheader()
- if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
- if exists("g:c_syntax_for_h")
- setf objc
- else
- setf objcpp
- endif
- elseif exists("g:c_syntax_for_h")
- setf c
- elseif exists("g:ch_syntax_for_h")
- setf ch
- else
- setf cpp
- endif
- endfunc
- " Ch (CHscript)
- 1 0.000015 au BufNewFile,BufRead *.chf setf ch
- " TLH files are C++ headers generated by Visual C++'s #import from typelibs
- 1 0.000005 au BufNewFile,BufRead *.tlh setf cpp
- " Cascading Style Sheets
- 1 0.000005 au BufNewFile,BufRead *.css setf css
- " Century Term Command Scripts (*.cmd too)
- 1 0.000007 au BufNewFile,BufRead *.con setf cterm
- " Changelog
- 1 0.000023 au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch
- \ setf debchangelog
- 1 0.000011 au BufNewFile,BufRead [cC]hange[lL]og
- \ if getline(1) =~ '; urgency='
- \| setf debchangelog
- \| else
- \| setf changelog
- \| endif
- 1 0.000012 au BufNewFile,BufRead NEWS
- \ if getline(1) =~ '; urgency='
- \| setf debchangelog
- \| endif
- " CHILL
- 1 0.000007 au BufNewFile,BufRead *..ch setf chill
- " Changes for WEB and CWEB or CHILL
- 1 0.000005 au BufNewFile,BufRead *.ch call s:FTchange()
- " This function checks if one of the first ten lines start with a '@'. In
- " that case it is probably a change file.
- " If the first line starts with # or ! it's probably a ch file.
- " If a line has "main", "include", "//" ir "/*" it's probably ch.
- " Otherwise CHILL is assumed.
- 1 0.000003 func! s:FTchange()
- let lnum = 1
- while lnum <= 10
- if getline(lnum)[0] == '@'
- setf change
- return
- endif
- if lnum == 1 && (getline(1)[0] == '#' || getline(1)[0] == '!')
- setf ch
- return
- endif
- if getline(lnum) =~ "MODULE"
- setf chill
- return
- endif
- if getline(lnum) =~ 'main\s*(\|#\s*include\|//'
- setf ch
- return
- endif
- let lnum = lnum + 1
- endwhile
- setf chill
- endfunc
- " ChordPro
- 1 0.000029 au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
- " Clean
- 1 0.000012 au BufNewFile,BufRead *.dcl,*.icl setf clean
- " Clever
- 1 0.000005 au BufNewFile,BufRead *.eni setf cl
- " Clever or dtd
- 1 0.000005 au BufNewFile,BufRead *.ent call s:FTent()
- 1 0.000002 func! s:FTent()
- " This function checks for valid cl syntax in the first five lines.
- " Look for either an opening comment, '#', or a block start, '{".
- " If not found, assume SGML.
- let lnum = 1
- while lnum < 6
- let line = getline(lnum)
- if line =~ '^\s*[#{]'
- setf cl
- return
- elseif line !~ '^\s*$'
- " Not a blank line, not a comment, and not a block start,
- " so doesn't look like valid cl code.
- break
- endif
- let lnum = lnum + 1
- endw
- setf dtd
- endfunc
- " Clipper (or FoxPro; could also be eviews)
- 1 0.000009 au BufNewFile,BufRead *.prg
- \ if exists("g:filetype_prg") |
- \ exe "setf " . g:filetype_prg |
- \ else |
- \ setf clipper |
- \ endif
- " Clojure
- 1 0.000031 au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
- " Cmake
- 1 0.000027 au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake
- " Cmusrc
- 1 0.000019 au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc
- 1 0.000008 au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc
- " Cobol
- 1 0.000016 au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol
- " cobol or zope form controller python script? (heuristic)
- 1 0.000019 au BufNewFile,BufRead *.cpy
- \ if getline(1) =~ '^##' |
- \ setf python |
- \ else |
- \ setf cobol |
- \ endif
- " Coco/R
- 1 0.000009 au BufNewFile,BufRead *.atg setf coco
- " Cold Fusion
- 1 0.000060 au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
- " Configure scripts
- 1 0.000016 au BufNewFile,BufRead configure.in,configure.ac setf config
- " CUDA Cumpute Unified Device Architecture
- 1 0.000007 au BufNewFile,BufRead *.cu setf cuda
- " Dockerfile
- 1 0.000013 au BufNewFile,BufRead Dockerfile,*.Dockerfile setf dockerfile
- " WildPackets EtherPeek Decoder
- 1 0.000007 au BufNewFile,BufRead *.dcd setf dcd
- " Enlightenment configuration files
- 1 0.000008 au BufNewFile,BufRead *enlightenment/*.cfg setf c
- " Eterm
- 1 0.000006 au BufNewFile,BufRead *Eterm/*.cfg setf eterm
- " Euphoria 3 or 4
- 1 0.000038 au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call s:EuphoriaCheck()
- 1 0.000006 if has("fname_case")
- 1 0.000033 au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call s:EuphoriaCheck()
- 1 0.000002 endif
- 1 0.000006 func! s:EuphoriaCheck()
- if exists('g:filetype_euphoria')
- exe 'setf ' . g:filetype_euphoria
- else
- setf euphoria3
- endif
- endfunc
- " Lynx config files
- 1 0.000010 au BufNewFile,BufRead lynx.cfg setf lynx
- " Quake
- 1 0.000019 au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake
- 1 0.000013 au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
- " Quake C
- 1 0.000011 au BufNewFile,BufRead *.qc setf c
- " Configure files
- 1 0.000006 au BufNewFile,BufRead *.cfg setf cfg
- " Cucumber
- 1 0.000006 au BufNewFile,BufRead *.feature setf cucumber
- " Communicating Sequential Processes
- 1 0.000014 au BufNewFile,BufRead *.csp,*.fdr setf csp
- " CUPL logic description and simulation
- 1 0.000006 au BufNewFile,BufRead *.pld setf cupl
- 1 0.000007 au BufNewFile,BufRead *.si setf cuplsim
- " Debian Control
- 1 0.000016 au BufNewFile,BufRead */debian/control setf debcontrol
- 1 0.000013 au BufNewFile,BufRead control
- \ if getline(1) =~ '^Source:'
- \| setf debcontrol
- \| endif
- " Debian Sources.list
- 1 0.000016 au BufNewFile,BufRead */etc/apt/sources.list setf debsources
- 1 0.000025 au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
- " Deny hosts
- 1 0.000012 au BufNewFile,BufRead denyhosts.conf setf denyhosts
- " dnsmasq(8) configuration files
- 1 0.000011 au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
- " ROCKLinux package description
- 1 0.000009 au BufNewFile,BufRead *.desc setf desc
- " the D language or dtrace
- 1 0.000010 au BufNewFile,BufRead *.d call s:DtraceCheck()
- 1 0.000006 func! s:DtraceCheck()
- let lines = getline(1, min([line("$"), 100]))
- if match(lines, '^module\>\|^import\>') > -1
- " D files often start with a module and/or import statement.
- setf d
- elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1
- setf dtrace
- else
- setf d
- endif
- endfunc
- " Desktop files
- 1 0.000020 au BufNewFile,BufRead *.desktop,.directory setf desktop
- " Dict config
- 1 0.000019 au BufNewFile,BufRead dict.conf,.dictrc setf dictconf
- " Dictd config
- 1 0.000007 au BufNewFile,BufRead dictd.conf setf dictdconf
- " Diff files
- 1 0.000020 au BufNewFile,BufRead *.diff,*.rej,*.patch setf diff
- " Dircolors
- 1 0.000253 au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS setf dircolors
- " Diva (with Skill) or InstallShield
- 1 0.000017 au BufNewFile,BufRead *.rul
- \ if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' |
- \ setf ishd |
- \ else |
- \ setf diva |
- \ endif
- " DCL (Digital Command Language - vms) or DNS zone file
- 1 0.000009 au BufNewFile,BufRead *.com call s:BindzoneCheck('dcl')
- " DOT
- 1 0.000006 au BufNewFile,BufRead *.dot setf dot
- " Dylan - lid files
- 1 0.000006 au BufNewFile,BufRead *.lid setf dylanlid
- " Dylan - intr files (melange)
- 1 0.000015 au BufNewFile,BufRead *.intr setf dylanintr
- " Dylan
- 1 0.000011 au BufNewFile,BufRead *.dylan setf dylan
- " Microsoft Module Definition
- 1 0.000010 au BufNewFile,BufRead *.def setf def
- " Dracula
- 1 0.000018 au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula
- " Datascript
- 1 0.000006 au BufNewFile,BufRead *.ds setf datascript
- " dsl
- 1 0.000009 au BufNewFile,BufRead *.dsl setf dsl
- " DTD (Document Type Definition for XML)
- 1 0.000010 au BufNewFile,BufRead *.dtd setf dtd
- " DTS/DSTI (device tree files)
- 1 0.000016 au BufNewFile,BufRead *.dts,*.dtsi setf dts
- " EDIF (*.edf,*.edif,*.edn,*.edo)
- 1 0.000014 au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
- " Embedix Component Description
- 1 0.000010 au BufNewFile,BufRead *.ecd setf ecd
- " Eiffel or Specman or Euphoria
- 1 0.000016 au BufNewFile,BufRead *.e,*.E call s:FTe()
- " Elinks configuration
- 1 0.000014 au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks
- 1 0.000005 func! s:FTe()
- if exists('g:filetype_euphoria')
- exe 'setf ' . g:filetype_euphoria
- else
- let n = 1
- while n < 100 && n < line("$")
- if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
- setf specman
- return
- endif
- let n = n + 1
- endwhile
- setf eiffel
- endif
- endfunc
- " ERicsson LANGuage; Yaws is erlang too
- 1 0.000019 au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang
- " Elm Filter Rules file
- 1 0.000009 au BufNewFile,BufRead filter-rules setf elmfilt
- " ESMTP rc file
- 1 0.000010 au BufNewFile,BufRead *esmtprc setf esmtprc
- " ESQL-C
- 1 0.000015 au BufNewFile,BufRead *.ec,*.EC setf esqlc
- " Esterel
- 1 0.000011 au BufNewFile,BufRead *.strl setf esterel
- " Essbase script
- 1 0.000013 au BufNewFile,BufRead *.csc setf csc
- " Exim
- 1 0.000008 au BufNewFile,BufRead exim.conf setf exim
- " Expect
- 1 0.000008 au BufNewFile,BufRead *.exp setf expect
- " Exports
- 1 0.000006 au BufNewFile,BufRead exports setf exports
- " Falcon
- 1 0.000006 au BufNewFile,BufRead *.fal setf falcon
- " Fantom
- 1 0.000011 au BufNewFile,BufRead *.fan,*.fwt setf fan
- " Factor
- 1 0.000006 au BufNewFile,BufRead *.factor setf factor
- " Fetchmail RC file
- 1 0.000011 au BufNewFile,BufRead .fetchmailrc setf fetchmail
- " FlexWiki - disabled, because it has side effects when a .wiki file
- " is not actually FlexWiki
- "au BufNewFile,BufRead *.wiki setf flexwiki
- " Focus Executable
- 1 0.000029 au BufNewFile,BufRead *.fex,*.focexec setf focexec
- " Focus Master file (but not for auto.master)
- 1 0.000008 au BufNewFile,BufRead auto.master setf conf
- 1 0.000012 au BufNewFile,BufRead *.mas,*.master setf master
- " Forth
- 1 0.000010 au BufNewFile,BufRead *.fs,*.ft setf forth
- " Reva Forth
- 1 0.000007 au BufNewFile,BufRead *.frt setf reva
- " Fortran
- 1 0.000007 if has("fname_case")
- 1 0.000067 au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran
- 1 0.000002 endif
- 1 0.000098 au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran
- " Framescript
- 1 0.000009 au BufNewFile,BufRead *.fsl setf framescript
- " FStab
- 1 0.000017 au BufNewFile,BufRead fstab,mtab setf fstab
- " GDB command files
- 1 0.000019 au BufNewFile,BufRead .gdbinit setf gdb
- " GDMO
- 1 0.000012 au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
- " Gedcom
- 1 0.000021 au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
- " Git
- 1 0.000013 au BufNewFile,BufRead COMMIT_EDITMSG setf gitcommit
- 1 0.000011 au BufNewFile,BufRead MERGE_MSG setf gitcommit
- 1 0.000026 au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
- 1 0.000021 au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
- 1 0.000016 au BufNewFile,BufRead */.config/git/config setf gitconfig
- 1 0.000015 if !empty($XDG_CONFIG_HOME)
- au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
- endif
- 1 0.000017 au BufNewFile,BufRead git-rebase-todo setf gitrebase
- 1 0.000020 au BufNewFile,BufRead .msg.[0-9]*
- \ if getline(1) =~ '^From.*# This line is ignored.$' |
- \ setf gitsendemail |
- \ endif
- 1 0.000011 au BufNewFile,BufRead *.git/*
- \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
- \ setf git |
- \ endif
- " Gkrellmrc
- 1 0.000019 au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc
- " GP scripts (2.0 and onward)
- 1 0.000026 au BufNewFile,BufRead *.gp,.gprc setf gp
- " GPG
- 1 0.000012 au BufNewFile,BufRead */.gnupg/options setf gpg
- 1 0.000014 au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg
- 1 0.000020 au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg
- " gnash(1) configuration files
- 1 0.000046 au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
- " Gitolite
- 1 0.000015 au BufNewFile,BufRead gitolite.conf setf gitolite
- 1 0.000015 au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
- 1 0.000028 au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
- " Gnuplot scripts
- 1 0.000018 au BufNewFile,BufRead *.gpi setf gnuplot
- " Go (Google)
- 1 0.000011 au BufNewFile,BufRead *.go setf go
- " GrADS scripts
- 1 0.000010 au BufNewFile,BufRead *.gs setf grads
- " Gretl
- 1 0.000010 au BufNewFile,BufRead *.gretl setf gretl
- " Groovy
- 1 0.000109 au BufNewFile,BufRead *.gradle,*.groovy setf groovy
- " GNU Server Pages
- 1 0.000019 au BufNewFile,BufRead *.gsp setf gsp
- " Group file
- 1 0.000199 au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group
- " GTK RC
- 1 0.000026 au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
- " Haml
- 1 0.000011 au BufNewFile,BufRead *.haml setf haml
- " Hamster Classic | Playground files
- 1 0.000025 au BufNewFile,BufRead *.hsc,*.hsm setf hamster
- " Haskell
- 1 0.000025 au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
- 1 0.000011 au BufNewFile,BufRead *.lhs setf lhaskell
- 1 0.000011 au BufNewFile,BufRead *.chs setf chaskell
- " Haste
- 1 0.000010 au BufNewFile,BufRead *.ht setf haste
- 1 0.000013 au BufNewFile,BufRead *.htpp setf hastepreproc
- " Hercules
- 1 0.000056 au BufNewFile,BufRead *.vc,*.ev,*.rs,*.sum,*.errsum setf hercules
- " HEX (Intel)
- 1 0.000024 au BufNewFile,BufRead *.hex,*.h32 setf hex
- " Tilde (must be before HTML)
- 1 0.000011 au BufNewFile,BufRead *.t.html setf tilde
- " HTML (.shtml and .stm for server side)
- 1 0.000051 au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml()
- " Distinguish between HTML, XHTML and Django
- 1 0.000008 func! s:FThtml()
- let n = 1
- while n < 10 && n < line("$")
- if getline(n) =~ '\<DTD\s\+XHTML\s'
- setf xhtml
- return
- endif
- if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+'
- setf htmldjango
- return
- endif
- let n = n + 1
- endwhile
- setf html
- endfunc
- " HTML with Ruby - eRuby
- 1 0.000024 au BufNewFile,BufRead *.erb,*.rhtml setf eruby
- " HTML with M4
- 1 0.000013 au BufNewFile,BufRead *.html.m4 setf htmlm4
- " HTML Cheetah template
- 1 0.000010 au BufNewFile,BufRead *.tmpl setf htmlcheetah
- " Host config
- 1 0.000012 au BufNewFile,BufRead */etc/host.conf setf hostconf
- " Hosts access
- 1 0.000024 au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess
- " Hyper Builder
- 1 0.000011 au BufNewFile,BufRead *.hb setf hb
- " Httest
- 1 0.000025 au BufNewFile,BufRead *.htt,*.htb setf httest
- " Icon
- 1 0.000011 au BufNewFile,BufRead *.icn setf icon
- " IDL (Interface Description Language)
- 1 0.000014 au BufNewFile,BufRead *.idl call s:FTidl()
- " Distinguish between standard IDL and MS-IDL
- 1 0.000005 func! s:FTidl()
- let n = 1
- while n < 50 && n < line("$")
- if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
- setf msidl
- return
- endif
- let n = n + 1
- endwhile
- setf idl
- endfunc
- " Microsoft IDL (Interface Description Language) Also *.idl
- " MOF = WMI (Windows Management Instrumentation) Managed Object Format
- 1 0.000023 au BufNewFile,BufRead *.odl,*.mof setf msidl
- " Icewm menu
- 1 0.000021 au BufNewFile,BufRead */.icewm/menu setf icemenu
- " Indent profile (must come before IDL *.pro!)
- 1 0.000013 au BufNewFile,BufRead .indent.pro setf indent
- 1 0.000011 au BufNewFile,BufRead indent.pro call s:ProtoCheck('indent')
- " IDL (Interactive Data Language)
- 1 0.000020 au BufNewFile,BufRead *.pro call s:ProtoCheck('idlang')
- " Distinguish between "default" and Cproto prototype file. */
- 1 0.000007 func! s:ProtoCheck(default)
- " Cproto files have a comment in the first line and a function prototype in
- " the second line, it always ends in ";". Indent files may also have
- " comments, thus we can't match comments to see the difference.
- " IDL files can have a single ';' in the second line, require at least one
- " chacter before the ';'.
- if getline(2) =~ '.;$'
- setf cpp
- else
- exe 'setf ' . a:default
- endif
- endfunc
- " Indent RC
- 1 0.000014 au BufNewFile,BufRead indentrc setf indent
- " Inform
- 1 0.000020 au BufNewFile,BufRead *.inf,*.INF setf inform
- " Initng
- 1 0.000031 au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng
- " Innovation Data Processing
- 1 0.000070 au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat
- 1 0.000039 au BufRead,BufNewFile upstream.log\c,upstream.*.log\c,*.upstream.log\c setf upstreamlog
- 1 0.000067 au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog
- 1 0.000040 au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog
- 1 0.000036 au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog
- " Ipfilter
- 1 0.000035 au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter
- " Informix 4GL (source - canonical, include file, I4GL+M4 preproc.)
- 1 0.000035 au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl
- " .INI file for MSDOS
- 1 0.000013 au BufNewFile,BufRead *.ini setf dosini
- " SysV Inittab
- 1 0.000012 au BufNewFile,BufRead inittab setf inittab
- " Inno Setup
- 1 0.000012 au BufNewFile,BufRead *.iss setf iss
- " J
- 1 0.000015 au BufNewFile,BufRead *.ijs setf j
- " JAL
- 1 0.000026 au BufNewFile,BufRead *.jal,*.JAL setf jal
- " Jam
- 1 0.000021 au BufNewFile,BufRead *.jpl,*.jpr setf jam
- " Java
- 1 0.000030 au BufNewFile,BufRead *.java,*.jav setf java
- " JavaCC
- 1 0.000025 au BufNewFile,BufRead *.jj,*.jjt setf javacc
- " JavaScript, ECMAScript
- 1 0.000044 au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
- " Java Server Pages
- 1 0.000011 au BufNewFile,BufRead *.jsp setf jsp
- " Java Properties resource file (note: doesn't catch font.properties.pl)
- 1 0.000031 au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
- 1 0.000019 au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')
- " Jess
- 1 0.000018 au BufNewFile,BufRead *.clp setf jess
- " Jgraph
- 1 0.000011 au BufNewFile,BufRead *.jgr setf jgraph
- " Jovial
- 1 0.000023 au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
- " JSON
- 1 0.000024 au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
- " Kixtart
- 1 0.000011 au BufNewFile,BufRead *.kix setf kix
- " Kimwitu[++]
- 1 0.000009 au BufNewFile,BufRead *.k setf kwt
- " Kivy
- 1 0.000009 au BufNewFile,BufRead *.kv setf kivy
- " KDE script
- 1 0.000010 au BufNewFile,BufRead *.ks setf kscript
- " Kconfig
- 1 0.000274 au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig
- " Lace (ISE)
- 1 0.000025 au BufNewFile,BufRead *.ace,*.ACE setf lace
- " Latte
- 1 0.000024 au BufNewFile,BufRead *.latte,*.lte setf latte
- " Limits
- 1 0.000048 au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits
- " LambdaProlog (*.mod too, see Modsim)
- 1 0.000020 au BufNewFile,BufRead *.sig setf lprolog
- " LDAP LDIF
- 1 0.000011 au BufNewFile,BufRead *.ldif setf ldif
- " Ld loader
- 1 0.000012 au BufNewFile,BufRead *.ld setf ld
- " Less
- 1 0.000012 au BufNewFile,BufRead *.less setf less
- " Lex
- 1 0.000052 au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex
- " Libao
- 1 0.000026 au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao
- " Libsensors
- 1 0.000023 au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors
- " LFTP
- 1 0.000029 au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp
- " Lifelines (or Lex for C++!)
- 1 0.000013 au BufNewFile,BufRead *.ll setf lifelines
- " Lilo: Linux loader
- 1 0.000009 au BufNewFile,BufRead lilo.conf setf lilo
- " Lisp (*.el = ELisp, *.cl = Common Lisp, *.jl = librep Lisp)
- 1 0.000008 if has("fname_case")
- 1 0.000072 au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,*.L,.emacs,.sawfishrc setf lisp
- 1 0.000003 else
- au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,.emacs,.sawfishrc setf lisp
- endif
- " SBCL implementation of Common Lisp
- 1 0.000020 au BufNewFile,BufRead sbclrc,.sbclrc setf lisp
- " Liquid
- 1 0.000009 au BufNewFile,BufRead *.liquid setf liquid
- " Lite
- 1 0.000016 au BufNewFile,BufRead *.lite,*.lt setf lite
- " LiteStep RC files
- 1 0.000015 au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep
- " Login access
- 1 0.000022 au BufNewFile,BufRead */etc/login.access setf loginaccess
- " Login defs
- 1 0.000025 au BufNewFile,BufRead */etc/login.defs setf logindefs
- " Logtalk
- 1 0.000022 au BufNewFile,BufRead *.lgt setf logtalk
- " LOTOS
- 1 0.000027 au BufNewFile,BufRead *.lot,*.lotos setf lotos
- " Lout (also: *.lt)
- 1 0.000026 au BufNewFile,BufRead *.lou,*.lout setf lout
- " Lua
- 1 0.000016 au BufNewFile,BufRead *.lua setf lua
- " Luarocks
- 1 0.000015 au BufNewFile,BufRead *.rockspec setf lua
- " Linden Scripting Language (Second Life)
- 1 0.000017 au BufNewFile,BufRead *.lsl setf lsl
- " Lynx style file (or LotusScript!)
- 1 0.000013 au BufNewFile,BufRead *.lss setf lss
- " M4
- 1 0.000017 au BufNewFile,BufRead *.m4
- \ if expand("<afile>") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif
- " MaGic Point
- 1 0.000014 au BufNewFile,BufRead *.mgp setf mgp
- " Mail (for Elm, trn, mutt, muttng, rn, slrn)
- 1 0.000165 au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
- " Mail aliases
- 1 0.000026 au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases
- " Mailcap configuration file
- 1 0.000018 au BufNewFile,BufRead .mailcap,mailcap setf mailcap
- " Makefile
- 1 0.000066 au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make
- " MakeIndex
- 1 0.000029 au BufNewFile,BufRead *.ist,*.mst setf ist
- " Mallard
- 1 0.000121 au BufNewFile,BufRead *.page setf mallard
- " Manpage
- 1 0.000018 au BufNewFile,BufRead *.man setf nroff
- " Man config
- 1 0.000019 au BufNewFile,BufRead */etc/man.conf,man.config setf manconf
- " Maple V
- 1 0.000030 au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
- " Map (UMN mapserver config file)
- 1 0.000011 au BufNewFile,BufRead *.map setf map
- " Markdown
- 1 0.000064 au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown
- " Mason
- 1 0.000036 au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
- " Matlab or Objective C
- 1 0.000013 au BufNewFile,BufRead *.m call s:FTm()
- 1 0.000007 func! s:FTm()
- let n = 1
- while n < 10
- let line = getline(n)
- if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\|//\)'
- setf objc
- return
- endif
- if line =~ '^\s*%'
- setf matlab
- return
- endif
- if line =~ '^\s*(\*'
- setf mma
- return
- endif
- let n = n + 1
- endwhile
- if exists("g:filetype_m")
- exe "setf " . g:filetype_m
- else
- setf matlab
- endif
- endfunc
- " Mathematica notebook
- 1 0.000016 au BufNewFile,BufRead *.nb setf mma
- " Maya Extension Language
- 1 0.000013 au BufNewFile,BufRead *.mel setf mel
- " Mercurial (hg) commit file
- 1 0.000012 au BufNewFile,BufRead hg-editor-*.txt setf hgcommit
- " Mercurial config (looks like generic config file)
- 1 0.000028 au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
- " Messages (logs mostly)
- 1 0.000040 au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages
- " Metafont
- 1 0.000011 au BufNewFile,BufRead *.mf setf mf
- " MetaPost
- 1 0.000012 au BufNewFile,BufRead *.mp setf mp
- " MGL
- 1 0.000013 au BufNewFile,BufRead *.mgl setf mgl
- " MIX - Knuth assembly
- 1 0.000020 au BufNewFile,BufRead *.mix,*.mixal setf mix
- " MMIX or VMS makefile
- 1 0.000014 au BufNewFile,BufRead *.mms call s:FTmms()
- " Symbian meta-makefile definition (MMP)
- 1 0.000017 au BufNewFile,BufRead *.mmp setf mmp
- 1 0.000005 func! s:FTmms()
- let n = 1
- while n < 10
- let line = getline(n)
- if line =~ '^\s*\(%\|//\)' || line =~ '^\*'
- setf mmix
- return
- endif
- if line =~ '^\s*#'
- setf make
- return
- endif
- let n = n + 1
- endwhile
- setf mmix
- endfunc
- " Modsim III (or LambdaProlog)
- 1 0.000016 au BufNewFile,BufRead *.mod
- \ if getline(1) =~ '\<module\>' |
- \ setf lprolog |
- \ else |
- \ setf modsim3 |
- \ endif
- " Modula 2 (.md removed in favor of Markdown)
- 1 0.000039 au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
- " Modula 3 (.m3, .i3, .mg, .ig)
- 1 0.000013 au BufNewFile,BufRead *.[mi][3g] setf modula3
- " Monk
- 1 0.000056 au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
- " MOO
- 1 0.000015 au BufNewFile,BufRead *.moo setf moo
- " Modconf
- 1 0.000036 au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
- " Mplayer config
- 1 0.000026 au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
- " Motorola S record
- 1 0.000069 au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec
- " Mrxvtrc
- 1 0.000021 au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc
- " Msql
- 1 0.000012 au BufNewFile,BufRead *.msql setf msql
- " Mysql
- 1 0.000013 au BufNewFile,BufRead *.mysql setf mysql
- " Mutt setup files (must be before catch *.rc)
- 1 0.000037 au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc')
- " M$ Resource files
- 1 0.000029 au BufNewFile,BufRead *.rc,*.rch setf rc
- " MuPAD source
- 1 0.000018 au BufRead,BufNewFile *.mu setf mupad
- " Mush
- 1 0.000014 au BufNewFile,BufRead *.mush setf mush
- " Mutt setup file (also for Muttng)
- 1 0.000014 au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
- " Nano
- 1 0.000027 au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc
- " Nastran input/DMAP
- "au BufNewFile,BufRead *.dat setf nastran
- " Natural
- 1 0.000014 au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural
- " Netrc
- 1 0.000012 au BufNewFile,BufRead .netrc setf netrc
- " Ninja file
- 1 0.000011 au BufNewFile,BufRead *.ninja setf ninja
- " Novell netware batch files
- 1 0.000025 au BufNewFile,BufRead *.ncf setf ncf
- " Nroff/Troff (*.ms and *.t are checked below)
- 1 0.000022 au BufNewFile,BufRead *.me
- \ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" |
- \ setf nroff |
- \ endif
- 1 0.000064 au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
- 1 0.000015 au BufNewFile,BufRead *.[1-9] call s:FTnroff()
- " This function checks if one of the first five lines start with a dot. In
- " that case it is probably an nroff file: 'filetype' is set and 1 is returned.
- 1 0.000005 func! s:FTnroff()
- if getline(1)[0] . getline(2)[0] . getline(3)[0] . getline(4)[0] . getline(5)[0] =~ '\.'
- setf nroff
- return 1
- endif
- return 0
- endfunc
- " Nroff or Objective C++
- 1 0.000011 au BufNewFile,BufRead *.mm call s:FTmm()
- 1 0.000003 func! s:FTmm()
- let n = 1
- while n < 10
- let line = getline(n)
- if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
- setf objcpp
- return
- endif
- let n = n + 1
- endwhile
- setf nroff
- endfunc
- " Not Quite C
- 1 0.000013 au BufNewFile,BufRead *.nqc setf nqc
- " NSIS
- 1 0.000026 au BufNewFile,BufRead *.nsi,*.nsh setf nsis
- " OCAML
- 1 0.000065 au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml
- " Occam
- 1 0.000013 au BufNewFile,BufRead *.occ setf occam
- " Omnimark
- 1 0.000024 au BufNewFile,BufRead *.xom,*.xin setf omnimark
- " OpenROAD
- 1 0.000011 au BufNewFile,BufRead *.or setf openroad
- " OPL
- 1 0.000018 au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
- " Oracle config file
- 1 0.000013 au BufNewFile,BufRead *.ora setf ora
- " Packet filter conf
- 1 0.000014 au BufNewFile,BufRead pf.conf setf pf
- " Pam conf
- 1 0.000014 au BufNewFile,BufRead */etc/pam.conf setf pamconf
- " PApp
- 1 0.000032 au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
- " Password file
- 1 0.000086 au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
- " Pascal (also *.p)
- 1 0.000018 au BufNewFile,BufRead *.pas setf pascal
- " Delphi project file
- 1 0.000036 au BufNewFile,BufRead *.dpr setf pascal
- " PDF
- 1 0.000016 au BufNewFile,BufRead *.pdf setf pdf
- " Perl
- 1 0.000010 if has("fname_case")
- 1 0.000160 au BufNewFile,BufRead *.pl,*.PL call s:FTpl()
- 1 0.000004 else
- au BufNewFile,BufRead *.pl call s:FTpl()
- endif
- 1 0.000027 au BufNewFile,BufRead *.plx,*.al setf perl
- 1 0.000063 au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
- 1 0.000008 func! s:FTpl()
- if exists("g:filetype_pl")
- exe "setf " . g:filetype_pl
- else
- " recognize Prolog by specific text in the first non-empty line
- " require a blank after the '%' because Perl uses "%list" and "%translate"
- let l = getline(nextnonblank(1))
- if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
- setf prolog
- else
- setf perl
- endif
- endif
- endfunc
- " Perl, XPM or XPM2
- 1 0.000025 au BufNewFile,BufRead *.pm
- \ if getline(1) =~ "XPM2" |
- \ setf xpm2 |
- \ elseif getline(1) =~ "XPM" |
- \ setf xpm |
- \ else |
- \ setf perl |
- \ endif
- " Perl POD
- 1 0.000018 au BufNewFile,BufRead *.pod setf pod
- 1 0.000014 au BufNewFile,BufRead *.pod6 setf pod6
- " Php, php3, php4, etc.
- " Also Phtml (was used for PHP 2 in the past)
- " Also .ctp for Cake template file
- 1 0.000055 au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
- " Pike
- 1 0.000054 au BufNewFile,BufRead *.pike,*.lpc,*.ulpc,*.pmod setf pike
- " Pinfo config
- 1 0.000026 au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo
- " Palm Resource compiler
- 1 0.000019 au BufNewFile,BufRead *.rcp setf pilrc
- " Pine config
- 1 0.000055 au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
- " PL/1, PL/I
- 1 0.000029 au BufNewFile,BufRead *.pli,*.pl1 setf pli
- " PL/M (also: *.inp)
- 1 0.000049 au BufNewFile,BufRead *.plm,*.p36,*.pac setf plm
- " PL/SQL
- 1 0.000023 au BufNewFile,BufRead *.pls,*.plsql setf plsql
- " PLP
- 1 0.000012 au BufNewFile,BufRead *.plp setf plp
- " PO and PO template (GNU gettext)
- 1 0.000029 au BufNewFile,BufRead *.po,*.pot setf po
- " Postfix main config
- 1 0.000012 au BufNewFile,BufRead main.cf setf pfmain
- " PostScript (+ font files, encapsulated PostScript, Adobe Illustrator)
- 1 0.000089 au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr
- " PostScript Printer Description
- 1 0.000015 au BufNewFile,BufRead *.ppd setf ppd
- " Povray
- 1 0.000012 au BufNewFile,BufRead *.pov setf pov
- " Povray configuration
- 1 0.000014 au BufNewFile,BufRead .povrayrc setf povini
- " Povray, PHP or assembly
- 1 0.000012 au BufNewFile,BufRead *.inc call s:FTinc()
- 1 0.000005 func! s:FTinc()
- if exists("g:filetype_inc")
- exe "setf " . g:filetype_inc
- else
- let lines = getline(1).getline(2).getline(3)
- if lines =~? "perlscript"
- setf aspperl
- elseif lines =~ "<%"
- setf aspvbs
- elseif lines =~ "<?"
- setf php
- else
- call s:FTasmsyntax()
- if exists("b:asmsyntax")
- exe "setf " . fnameescape(b:asmsyntax)
- else
- setf pov
- endif
- endif
- endif
- endfunc
- " Printcap and Termcap
- 1 0.000018 au BufNewFile,BufRead *printcap
- \ let b:ptcap_type = "print" | setf ptcap
- 1 0.000015 au BufNewFile,BufRead *termcap
- \ let b:ptcap_type = "term" | setf ptcap
- " PCCTS / ANTRL
- "au BufNewFile,BufRead *.g setf antrl
- 1 0.000012 au BufNewFile,BufRead *.g setf pccts
- " PPWizard
- 1 0.000025 au BufNewFile,BufRead *.it,*.ih setf ppwiz
- " Obj 3D file format
- " TODO: is there a way to avoid MS-Windows Object files?
- 1 0.000019 au BufNewFile,BufRead *.obj setf obj
- " Oracle Pro*C/C++
- 1 0.000017 au BufNewFile,BufRead *.pc setf proc
- " Privoxy actions file
- 1 0.000016 au BufNewFile,BufRead *.action setf privoxy
- " Procmail
- 1 0.000023 au BufNewFile,BufRead .procmail,.procmailrc setf procmail
- " Progress or CWEB
- 1 0.000018 au BufNewFile,BufRead *.w call s:FTprogress_cweb()
- 1 0.000005 func! s:FTprogress_cweb()
- if exists("g:filetype_w")
- exe "setf " . g:filetype_w
- return
- endif
- if getline(1) =~ '&ANALYZE' || getline(3) =~ '&GLOBAL-DEFINE'
- setf progress
- else
- setf cweb
- endif
- endfunc
- " Progress or assembly
- 1 0.000015 au BufNewFile,BufRead *.i call s:FTprogress_asm()
- 1 0.000003 func! s:FTprogress_asm()
- if exists("g:filetype_i")
- exe "setf " . g:filetype_i
- return
- endif
- " This function checks for an assembly comment the first ten lines.
- " If not found, assume Progress.
- let lnum = 1
- while lnum <= 10 && lnum < line('$')
- let line = getline(lnum)
- if line =~ '^\s*;' || line =~ '^\*'
- call s:FTasm()
- return
- elseif line !~ '^\s*$' || line =~ '^/\*'
- " Not an empty line: Doesn't look like valid assembly code.
- " Or it looks like a Progress /* comment
- break
- endif
- let lnum = lnum + 1
- endw
- setf progress
- endfunc
- " Progress or Pascal
- 1 0.000011 au BufNewFile,BufRead *.p call s:FTprogress_pascal()
- 1 0.000002 func! s:FTprogress_pascal()
- if exists("g:filetype_p")
- exe "setf " . g:filetype_p
- return
- endif
- " This function checks for valid Pascal syntax in the first ten lines.
- " Look for either an opening comment or a program start.
- " If not found, assume Progress.
- let lnum = 1
- while lnum <= 10 && lnum < line('$')
- let line = getline(lnum)
- if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
- \ || line =~ '^\s*{' || line =~ '^\s*(\*'
- setf pascal
- return
- elseif line !~ '^\s*$' || line =~ '^/\*'
- " Not an empty line: Doesn't look like valid Pascal code.
- " Or it looks like a Progress /* comment
- break
- endif
- let lnum = lnum + 1
- endw
- setf progress
- endfunc
- " Software Distributor Product Specification File (POSIX 1387.2-1995)
- 1 0.000016 au BufNewFile,BufRead *.psf setf psf
- 1 0.000040 au BufNewFile,BufRead INDEX,INFO
- \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' |
- \ setf psf |
- \ endif
- " Prolog
- 1 0.000014 au BufNewFile,BufRead *.pdb setf prolog
- " Promela
- 1 0.000013 au BufNewFile,BufRead *.pml setf promela
- " Google protocol buffers
- 1 0.000059 au BufNewFile,BufRead *.proto setf proto
- " Protocols
- 1 0.000025 au BufNewFile,BufRead */etc/protocols setf protocols
- " Pyrex
- 1 0.000039 au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
- " Python, Python Shell Startup Files
- " Quixote (Python-based web framework)
- 1 0.000088 au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python
- " Radiance
- 1 0.000040 au BufNewFile,BufRead *.rad,*.mat setf radiance
- " Ratpoison config/command files
- 1 0.000027 au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison
- " RCS file
- 1 0.000013 au BufNewFile,BufRead *\,v setf rcs
- " Readline
- 1 0.000025 au BufNewFile,BufRead .inputrc,inputrc setf readline
- " Registry for MS-Windows
- 1 0.000021 au BufNewFile,BufRead *.reg
- \ if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif
- " Renderman Interface Bytestream
- 1 0.000016 au BufNewFile,BufRead *.rib setf rib
- " Rexx
- 1 0.000121 au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx
- " R (Splus)
- 1 0.000010 if has("fname_case")
- 1 0.000025 au BufNewFile,BufRead *.s,*.S setf r
- 1 0.000003 else
- au BufNewFile,BufRead *.s setf r
- endif
- " R Help file
- 1 0.000004 if has("fname_case")
- 1 0.000032 au BufNewFile,BufRead *.rd,*.Rd setf rhelp
- 1 0.000002 else
- au BufNewFile,BufRead *.rd setf rhelp
- endif
- " R noweb file
- 1 0.000004 if has("fname_case")
- 1 0.000077 au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw setf rnoweb
- 1 0.000002 else
- au BufNewFile,BufRead *.rnw,*.snw setf rnoweb
- endif
- " R Markdown file
- 1 0.000003 if has("fname_case")
- 1 0.000073 au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd
- 1 0.000002 else
- au BufNewFile,BufRead *.rmd,*.smd setf rmd
- endif
- " R reStructuredText file
- 1 0.000003 if has("fname_case")
- 1 0.000045 au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
- 1 0.000001 else
- au BufNewFile,BufRead *.rrst,*.srst setf rrst
- endif
- " Rexx, Rebol or R
- 1 0.000044 au BufNewFile,BufRead *.r,*.R call s:FTr()
- 1 0.000005 func! s:FTr()
- let max = line("$") > 50 ? 50 : line("$")
- for n in range(1, max)
- " Rebol is easy to recognize, check for that first
- if getline(n) =~? '\<REBOL\>'
- setf rebol
- return
- endif
- endfor
- for n in range(1, max)
- " R has # comments
- if getline(n) =~ '^\s*#'
- setf r
- return
- endif
- " Rexx has /* comments */
- if getline(n) =~ '^\s*/\*'
- setf rexx
- return
- endif
- endfor
- " Nothing recognized, use user default or assume Rexx
- if exists("g:filetype_r")
- exe "setf " . g:filetype_r
- else
- " Rexx used to be the default, but R appears to be much more popular.
- setf r
- endif
- endfunc
- " Remind
- 1 0.000041 au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
- " Resolv.conf
- 1 0.000014 au BufNewFile,BufRead resolv.conf setf resolv
- " Relax NG Compact
- 1 0.000016 au BufNewFile,BufRead *.rnc setf rnc
- " Relax NG XML
- 1 0.000015 au BufNewFile,BufRead *.rng setf rng
- " RPL/2
- 1 0.000017 au BufNewFile,BufRead *.rpl setf rpl
- " Robots.txt
- 1 0.000014 au BufNewFile,BufRead robots.txt setf robots
- " Rpcgen
- 1 0.000015 au BufNewFile,BufRead *.x setf rpcgen
- " reStructuredText Documentation Format
- 1 0.000014 au BufNewFile,BufRead *.rst setf rst
- " RTF
- 1 0.000013 au BufNewFile,BufRead *.rtf setf rtf
- " Interactive Ruby shell
- 1 0.000031 au BufNewFile,BufRead .irbrc,irbrc setf ruby
- " Ruby
- 1 0.000027 au BufNewFile,BufRead *.rb,*.rbw setf ruby
- " RubyGems
- 1 0.000012 au BufNewFile,BufRead *.gemspec setf ruby
- " Rackup
- 1 0.000012 au BufNewFile,BufRead *.ru setf ruby
- " Bundler
- 1 0.000015 au BufNewFile,BufRead Gemfile setf ruby
- " Ruby on Rails
- 1 0.000048 au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
- " Rantfile and Rakefile is like Ruby
- 1 0.000057 au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby
- " S-lang (or shader language, or SmallLisp)
- 1 0.000017 au BufNewFile,BufRead *.sl setf slang
- " Samba config
- 1 0.000017 au BufNewFile,BufRead smb.conf setf samba
- " SAS script
- 1 0.000031 au BufNewFile,BufRead *.sas setf sas
- " Sass
- 1 0.000017 au BufNewFile,BufRead *.sass setf sass
- " Sather
- 1 0.000013 au BufNewFile,BufRead *.sa setf sather
- " Scilab
- 1 0.000031 au BufNewFile,BufRead *.sci,*.sce setf scilab
- " SCSS
- 1 0.000013 au BufNewFile,BufRead *.scss setf scss
- " SD: Streaming Descriptors
- 1 0.000014 au BufNewFile,BufRead *.sd setf sd
- " SDL
- 1 0.000027 au BufNewFile,BufRead *.sdl,*.pr setf sdl
- " sed
- 1 0.000018 au BufNewFile,BufRead *.sed setf sed
- " Sieve (RFC 3028)
- 1 0.000017 au BufNewFile,BufRead *.siv setf sieve
- " Sendmail
- 1 0.000017 au BufNewFile,BufRead sendmail.cf setf sm
- " Sendmail .mc files are actually m4. Could also be MS Message text file.
- 1 0.000018 au BufNewFile,BufRead *.mc call s:McSetf()
- 1 0.000006 func! s:McSetf()
- " Rely on the file to start with a comment.
- " MS message text files use ';', Sendmail files use '#' or 'dnl'
- for lnum in range(1, min([line("$"), 20]))
- let line = getline(lnum)
- if line =~ '^\s*\(#\|dnl\)'
- setf m4 " Sendmail .mc file
- return
- elseif line =~ '^\s*;'
- setf msmessages " MS Message text file
- return
- endif
- endfor
- setf m4 " Default: Sendmail .mc file
- endfunc
- " Services
- 1 0.000024 au BufNewFile,BufRead */etc/services setf services
- " Service Location config
- 1 0.000018 au BufNewFile,BufRead */etc/slp.conf setf slpconf
- " Service Location registration
- 1 0.000014 au BufNewFile,BufRead */etc/slp.reg setf slpreg
- " Service Location SPI
- 1 0.000016 au BufNewFile,BufRead */etc/slp.spi setf slpspi
- " Setserial config
- 1 0.000021 au BufNewFile,BufRead */etc/serial.conf setf setserial
- " SGML
- 1 0.000040 au BufNewFile,BufRead *.sgm,*.sgml
- \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' |
- \ setf sgmllnx |
- \ elseif getline(1) =~ '<!DOCTYPE.*DocBook' || getline(2) =~ '<!DOCTYPE.*DocBook' |
- \ let b:docbk_type = "sgml" |
- \ let b:docbk_ver = 4 |
- \ setf docbk |
- \ else |
- \ setf sgml |
- \ endif
- " SGMLDECL
- 1 0.000046 au BufNewFile,BufRead *.decl,*.dcl,*.dec
- \ if getline(1).getline(2).getline(3) =~? '^<!SGML' |
- \ setf sgmldecl |
- \ endif
- " SGML catalog file
- 1 0.000036 au BufNewFile,BufRead catalog setf catalog
- 1 0.000015 au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
- " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
- " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
- 1 0.000145 au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call SetFileTypeSH("bash")
- 1 0.000038 au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
- 1 0.000068 au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
- " Shell script (Arch Linux) or PHP file (Drupal)
- 1 0.000017 au BufNewFile,BufRead *.install
- \ if getline(1) =~ '<?php' |
- \ setf php |
- \ else |
- \ call SetFileTypeSH("bash") |
- \ endif
- " Also called from scripts.vim.
- 1 0.000004 func! SetFileTypeSH(name)
- if expand("<amatch>") =~ g:ft_ignore_pat
- return
- endif
- if a:name =~ '\<csh\>'
- " Some .sh scripts contain #!/bin/csh.
- call SetFileTypeShell("csh")
- return
- elseif a:name =~ '\<tcsh\>'
- " Some .sh scripts contain #!/bin/tcsh.
- call SetFileTypeShell("tcsh")
- return
- elseif a:name =~ '\<zsh\>'
- " Some .sh scripts contain #!/bin/zsh.
- call SetFileTypeShell("zsh")
- return
- elseif a:name =~ '\<ksh\>'
- let b:is_kornshell = 1
- if exists("b:is_bash")
- unlet b:is_bash
- endif
- if exists("b:is_sh")
- unlet b:is_sh
- endif
- elseif exists("g:bash_is_sh") || a:name =~ '\<bash\>' || a:name =~ '\<bash2\>'
- let b:is_bash = 1
- if exists("b:is_kornshell")
- unlet b:is_kornshell
- endif
- if exists("b:is_sh")
- unlet b:is_sh
- endif
- elseif a:name =~ '\<sh\>'
- let b:is_sh = 1
- if exists("b:is_kornshell")
- unlet b:is_kornshell
- endif
- if exists("b:is_bash")
- unlet b:is_bash
- endif
- endif
- call SetFileTypeShell("sh")
- endfunc
- " For shell-like file types, check for an "exec" command hidden in a comment,
- " as used for Tcl.
- " Also called from scripts.vim, thus can't be local to this script.
- 1 0.000002 func! SetFileTypeShell(name)
- if expand("<amatch>") =~ g:ft_ignore_pat
- return
- endif
- let l = 2
- while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)'
- " Skip empty and comment lines.
- let l = l + 1
- endwhile
- if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$'
- " Found an "exec" line after a comment with continuation
- let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '')
- if n =~ '\<tclsh\|\<wish'
- setf tcl
- return
- endif
- endif
- exe "setf " . a:name
- endfunc
- " tcsh scripts
- 1 0.000065 au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login call SetFileTypeShell("tcsh")
- " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
- 1 0.000104 au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call s:CSH()
- 1 0.000005 func! s:CSH()
- if exists("g:filetype_csh")
- call SetFileTypeShell(g:filetype_csh)
- elseif &shell =~ "tcsh"
- call SetFileTypeShell("tcsh")
- else
- call SetFileTypeShell("csh")
- endif
- endfunc
- " Z-Shell script
- 1 0.000042 au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
- 1 0.000044 au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
- 1 0.000026 au BufNewFile,BufRead *.zsh setf zsh
- " Scheme
- 1 0.000090 au BufNewFile,BufRead *.scm,*.ss,*.rkt setf scheme
- " Screen RC
- 1 0.000033 au BufNewFile,BufRead .screenrc,screenrc setf screen
- " Simula
- 1 0.000222 au BufNewFile,BufRead *.sim setf simula
- " SINDA
- 1 0.000045 au BufNewFile,BufRead *.sin,*.s85 setf sinda
- " SiSU
- 1 0.000071 au BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst,*._sst setf sisu
- 1 0.000047 au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu
- " SKILL
- 1 0.000054 au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
- " SLRN
- 1 0.000016 au BufNewFile,BufRead .slrnrc setf slrnrc
- 1 0.000016 au BufNewFile,BufRead *.score setf slrnsc
- " Smalltalk (and TeX)
- 1 0.000015 au BufNewFile,BufRead *.st setf st
- 1 0.000026 au BufNewFile,BufRead *.cls
- \ if getline(1) =~ '^%' |
- \ setf tex |
- \ elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' |
- \ setf rexx |
- \ else |
- \ setf st |
- \ endif
- " Smarty templates
- 1 0.000015 au BufNewFile,BufRead *.tpl setf smarty
- " SMIL or XML
- 1 0.000016 au BufNewFile,BufRead *.smil
- \ if getline(1) =~ '<?\s*xml.*?>' |
- \ setf xml |
- \ else |
- \ setf smil |
- \ endif
- " SMIL or SNMP MIB file
- 1 0.000020 au BufNewFile,BufRead *.smi
- \ if getline(1) =~ '\<smil\>' |
- \ setf smil |
- \ else |
- \ setf mib |
- \ endif
- " SMITH
- 1 0.000027 au BufNewFile,BufRead *.smt,*.smith setf smith
- " Snobol4 and spitbol
- 1 0.000034 au BufNewFile,BufRead *.sno,*.spt setf snobol4
- " SNMP MIB files
- 1 0.000027 au BufNewFile,BufRead *.mib,*.my setf mib
- " Snort Configuration
- 1 0.000038 au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
- 1 0.000021 au BufNewFile,BufRead *.rules call s:FTRules()
- 1 0.000011 let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
- 1 0.000004 func! s:FTRules()
- let path = expand('<amatch>:p')
- if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
- setf udevrules
- return
- endif
- if path =~ '^/etc/ufw/'
- setf conf " Better than hog
- return
- endif
- if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d'
- setf javascript
- return
- endif
- try
- let config_lines = readfile('/etc/udev/udev.conf')
- catch /^Vim\%((\a\+)\)\=:E484/
- setf hog
- return
- endtry
- let dir = expand('<amatch>:p:h')
- for line in config_lines
- if line =~ s:ft_rules_udev_rules_pattern
- let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "")
- if dir == udev_rules
- setf udevrules
- endif
- break
- endif
- endfor
- setf hog
- endfunc
- " Spec (Linux RPM)
- 1 0.000018 au BufNewFile,BufRead *.spec setf spec
- " Speedup (AspenTech plant simulator)
- 1 0.000045 au BufNewFile,BufRead *.speedup,*.spdata,*.spd setf spup
- " Slice
- 1 0.000024 au BufNewFile,BufRead *.ice setf slice
- " Spice
- 1 0.000034 au BufNewFile,BufRead *.sp,*.spice setf spice
- " Spyce
- 1 0.000041 au BufNewFile,BufRead *.spy,*.spi setf spyce
- " Squid
- 1 0.000017 au BufNewFile,BufRead squid.conf setf squid
- " SQL for Oracle Designer
- 1 0.000090 au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
- " SQL
- 1 0.000021 au BufNewFile,BufRead *.sql call s:SQL()
- 1 0.000006 func! s:SQL()
- if exists("g:filetype_sql")
- exe "setf " . g:filetype_sql
- else
- setf sql
- endif
- endfunc
- " SQLJ
- 1 0.000018 au BufNewFile,BufRead *.sqlj setf sqlj
- " SQR
- 1 0.000034 au BufNewFile,BufRead *.sqr,*.sqi setf sqr
- " OpenSSH configuration
- 1 0.000029 au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig
- " OpenSSH server configuration
- 1 0.000053 au BufNewFile,BufRead sshd_config setf sshdconfig
- " Stata
- 1 0.000077 au BufNewFile,BufRead *.ado,*.class,*.do,*.imata,*.mata setf stata
- " SMCL
- 1 0.000055 au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl
- " Stored Procedures
- 1 0.000031 au BufNewFile,BufRead *.stp setf stp
- " Standard ML
- 1 0.000018 au BufNewFile,BufRead *.sml setf sml
- " Sratus VOS command macro
- 1 0.000016 au BufNewFile,BufRead *.cm setf voscm
- " Sysctl
- 1 0.000039 au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
- " Systemd unit files
- 1 0.000043 au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer} setf systemd
- " Synopsys Design Constraints
- 1 0.000018 au BufNewFile,BufRead *.sdc setf sdc
- " Sudoers
- 1 0.000028 au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
- " SVG (Scalable Vector Graphics)
- 1 0.000016 au BufNewFile,BufRead *.svg setf svg
- " If the file has an extension of 't' and is in a directory 't' or 'xt' then
- " it is almost certainly a Perl test file.
- " If the first line starts with '#' and contains 'perl' it's probably a Perl
- " file.
- " (Slow test) If a file contains a 'use' statement then it is almost certainly
- " a Perl file.
- 1 0.000005 func! s:FTperl()
- let dirname = expand("%:p:h:t")
- if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt')
- setf perl
- return 1
- endif
- if getline(1)[0] == '#' && getline(1) =~ 'perl'
- setf perl
- return 1
- endif
- if search('^use\s\s*\k', 'nc', 30)
- setf perl
- return 1
- endif
- return 0
- endfunc
- " Tads (or Nroff or Perl test file)
- 1 0.000016 au BufNewFile,BufRead *.t
- \ if !s:FTnroff() && !s:FTperl() | setf tads | endif
- " Tags
- 1 0.000017 au BufNewFile,BufRead tags setf tags
- " TAK
- 1 0.000017 au BufNewFile,BufRead *.tak setf tak
- " Task
- 1 0.000025 au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata
- 1 0.000015 au BufRead,BufNewFile *.task setf taskedit
- " Tcl (JACL too)
- 1 0.000106 au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl setf tcl
- " TealInfo
- 1 0.000018 au BufNewFile,BufRead *.tli setf tli
- " Telix Salt
- 1 0.000016 au BufNewFile,BufRead *.slt setf tsalt
- " Tera Term Language
- 1 0.000015 au BufRead,BufNewFile *.ttl setf teraterm
- " Terminfo
- 1 0.000015 au BufNewFile,BufRead *.ti setf terminfo
- " TeX
- 1 0.000091 au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
- 1 0.000022 au BufNewFile,BufRead *.tex call s:FTtex()
- " Choose context, plaintex, or tex (LaTeX) based on these rules:
- " 1. Check the first line of the file for "%&<format>".
- " 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
- " 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc.
- 1 0.000004 func! s:FTtex()
- let firstline = getline(1)
- if firstline =~ '^%&\s*\a\+'
- let format = tolower(matchstr(firstline, '\a\+'))
- let format = substitute(format, 'pdf', '', '')
- if format == 'tex'
- let format = 'plain'
- endif
- else
- " Default value, may be changed later:
- let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain'
- " Save position, go to the top of the file, find first non-comment line.
- let save_cursor = getpos('.')
- call cursor(1,1)
- let firstNC = search('^\s*[^[:space:]%]', 'c', 1000)
- if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword.
- let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>'
- let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>'
- let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)',
- \ 'cnp', firstNC + 1000)
- if kwline == 1 " lpat matched
- let format = 'latex'
- elseif kwline == 2 " cpat matched
- let format = 'context'
- endif " If neither matched, keep default set above.
- " let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000)
- " let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000)
- " if cline > 0
- " let format = 'context'
- " endif
- " if lline > 0 && (cline == 0 || cline > lline)
- " let format = 'tex'
- " endif
- endif " firstNC
- call setpos('.', save_cursor)
- endif " firstline =~ '^%&\s*\a\+'
- " Translation from formats to file types. TODO: add AMSTeX, RevTex, others?
- if format == 'plain'
- setf plaintex
- elseif format == 'context'
- setf context
- else " probably LaTeX
- setf tex
- endif
- return
- endfunc
- " ConTeXt
- 1 0.000055 au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv setf context
- " Texinfo
- 1 0.000047 au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
- " TeX configuration
- 1 0.000032 au BufNewFile,BufRead texmf.cnf setf texmf
- " Tidy config
- 1 0.000034 au BufNewFile,BufRead .tidyrc,tidyrc setf tidy
- " TF mud client
- 1 0.000065 au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
- " TPP - Text Presentation Program
- 1 0.000020 au BufNewFile,BufReadPost *.tpp setf tpp
- " Treetop
- 1 0.000016 au BufRead,BufNewFile *.treetop setf treetop
- " Trustees
- 1 0.000015 au BufNewFile,BufRead trustees.conf setf trustees
- " TSS - Geometry
- 1 0.000018 au BufNewFile,BufReadPost *.tssgm setf tssgm
- " TSS - Optics
- 1 0.000014 au BufNewFile,BufReadPost *.tssop setf tssop
- " TSS - Command Line (temporary)
- 1 0.000014 au BufNewFile,BufReadPost *.tsscl setf tsscl
- " Tutor mode
- 1 0.000013 au BufNewFile,BufReadPost *.tutor setf tutor
- " TWIG files
- 1 0.000015 au BufNewFile,BufReadPost *.twig setf twig
- " Motif UIT/UIL files
- 1 0.000042 au BufNewFile,BufRead *.uit,*.uil setf uil
- " Udev conf
- 1 0.000019 au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf
- " Udev permissions
- 1 0.000023 au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm
- "
- " Udev symlinks config
- 1 0.000018 au BufNewFile,BufRead */etc/udev/cdsymlinks.conf setf sh
- " UnrealScript
- 1 0.000015 au BufNewFile,BufRead *.uc setf uc
- " Updatedb
- 1 0.000015 au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
- " Upstart (init(8)) config files
- 1 0.000021 au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
- 1 0.000019 au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
- 1 0.000031 au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart
- 1 0.000041 au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
- 1 0.000018 au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
- 1 0.000020 au BufNewFile,BufRead */.config/upstart/*.override setf upstart
- " Vera
- 1 0.000052 au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
- " Verilog HDL
- 1 0.000013 au BufNewFile,BufRead *.v setf verilog
- " Verilog-AMS HDL
- 1 0.000034 au BufNewFile,BufRead *.va,*.vams setf verilogams
- " SystemVerilog
- 1 0.000036 au BufNewFile,BufRead *.sv,*.svh setf systemverilog
- " VHDL
- 1 0.000100 au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
- 1 0.000020 au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
- " Vim script
- 1 0.000085 au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim
- " Viminfo file
- 1 0.000034 au BufNewFile,BufRead .viminfo,_viminfo setf viminfo
- " Virata Config Script File or Drupal module
- 1 0.000052 au BufRead,BufNewFile *.hw,*.module,*.pkg
- \ if getline(1) =~ '<?php' |
- \ setf php |
- \ else |
- \ setf virata |
- \ endif
- " Visual Basic (also uses *.bas) or FORM
- 1 0.000020 au BufNewFile,BufRead *.frm call s:FTVB("form")
- " SaxBasic is close to Visual Basic
- 1 0.000023 au BufNewFile,BufRead *.sba setf vb
- " Vgrindefs file
- 1 0.000054 au BufNewFile,BufRead vgrindefs setf vgrindefs
- " VRML V1.0c
- 1 0.000019 au BufNewFile,BufRead *.wrl setf vrml
- " Vroom (vim testing and executable documentation)
- 1 0.000015 au BufNewFile,BufRead *.vroom setf vroom
- " Webmacro
- 1 0.000016 au BufNewFile,BufRead *.wm setf webmacro
- " Wget config
- 1 0.000029 au BufNewFile,BufRead .wgetrc,wgetrc setf wget
- " Website MetaLanguage
- 1 0.000019 au BufNewFile,BufRead *.wml setf wml
- " Winbatch
- 1 0.000017 au BufNewFile,BufRead *.wbt setf winbatch
- " WSML
- 1 0.000039 au BufNewFile,BufRead *.wsml setf wsml
- " WvDial
- 1 0.000030 au BufNewFile,BufRead wvdial.conf,.wvdialrc setf wvdial
- " CVS RC file
- 1 0.000015 au BufNewFile,BufRead .cvsrc setf cvsrc
- " CVS commit file
- 1 0.000021 au BufNewFile,BufRead cvs\d\+ setf cvs
- " WEB (*.web is also used for Winbatch: Guess, based on expecting "%" comment
- " lines in a WEB file).
- 1 0.000025 au BufNewFile,BufRead *.web
- \ if getline(1)[0].getline(2)[0].getline(3)[0].getline(4)[0].getline(5)[0] =~ "%" |
- \ setf web |
- \ else |
- \ setf winbatch |
- \ endif
- " Windows Scripting Host and Windows Script Component
- 1 0.000015 au BufNewFile,BufRead *.ws[fc] setf wsh
- " XHTML
- 1 0.000039 au BufNewFile,BufRead *.xhtml,*.xht setf xhtml
- " X Pixmap (dynamically sets colors, use BufEnter to make it work better)
- 1 0.000008 au BufEnter *.xpm
- \ if getline(1) =~ "XPM2" |
- \ setf xpm2 |
- \ else |
- \ setf xpm |
- \ endif
- 1 0.000004 au BufEnter *.xpm2 setf xpm2
- " XFree86 config
- 1 0.000019 au BufNewFile,BufRead XF86Config
- \ if getline(1) =~ '\<XConfigurator\>' |
- \ let b:xf86conf_xfree86_version = 3 |
- \ endif |
- \ setf xf86conf
- 1 0.000021 au BufNewFile,BufRead */xorg.conf.d/*.conf
- \ let b:xf86conf_xfree86_version = 4 |
- \ setf xf86conf
- " Xorg config
- 1 0.000044 au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf
- " Xinetd conf
- 1 0.000021 au BufNewFile,BufRead */etc/xinetd.conf setf xinetd
- " XS Perl extension interface language
- 1 0.000017 au BufNewFile,BufRead *.xs setf xs
- " X resources file
- 1 0.000096 au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults
- " Xmath
- 1 0.000057 au BufNewFile,BufRead *.msc,*.msf setf xmath
- 1 0.000019 au BufNewFile,BufRead *.ms
- \ if !s:FTnroff() | setf xmath | endif
- " XML specific variants: docbk and xbl
- 1 0.000021 au BufNewFile,BufRead *.xml call s:FTxml()
- 1 0.000006 func! s:FTxml()
- let n = 1
- while n < 100 && n < line("$")
- let line = getline(n)
- " DocBook 4 or DocBook 5.
- let is_docbook4 = line =~ '<!DOCTYPE.*DocBook'
- let is_docbook5 = line =~ ' xmlns="http://docbook.org/ns/docbook"'
- if is_docbook4 || is_docbook5
- let b:docbk_type = "xml"
- if is_docbook5
- let b:docbk_ver = 5
- else
- let b:docbk_ver = 4
- endif
- setf docbk
- return
- endif
- if line =~ 'xmlns:xbl="http://www.mozilla.org/xbl"'
- setf xbl
- return
- endif
- let n += 1
- endwhile
- setf xml
- endfunc
- " XMI (holding UML models) is also XML
- 1 0.000022 au BufNewFile,BufRead *.xmi setf xml
- " CSPROJ files are Visual Studio.NET's XML-based project config files
- 1 0.000035 au BufNewFile,BufRead *.csproj,*.csproj.user setf xml
- " Qt Linguist translation source and Qt User Interface Files are XML
- 1 0.000048 au BufNewFile,BufRead *.ts,*.ui setf xml
- " TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
- 1 0.000021 au BufNewFile,BufRead *.tpm setf xml
- " Xdg menus
- 1 0.000018 au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml
- " ATI graphics driver configuration
- 1 0.000016 au BufNewFile,BufRead fglrxrc setf xml
- " XLIFF (XML Localisation Interchange File Format) is also XML
- 1 0.000019 au BufNewFile,BufRead *.xlf setf xml
- 1 0.000015 au BufNewFile,BufRead *.xliff setf xml
- " XML User Interface Language
- 1 0.000021 au BufNewFile,BufRead *.xul setf xml
- " X11 xmodmap (also see below)
- 1 0.000015 au BufNewFile,BufRead *Xmodmap setf xmodmap
- " Xquery
- 1 0.000084 au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery
- " XSD
- 1 0.000021 au BufNewFile,BufRead *.xsd setf xsd
- " Xslt
- 1 0.000033 au BufNewFile,BufRead *.xsl,*.xslt setf xslt
- " Yacc
- 1 0.000053 au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
- " Yacc or racc
- 1 0.000015 au BufNewFile,BufRead *.y call s:FTy()
- 1 0.000004 func! s:FTy()
- let n = 1
- while n < 100 && n < line("$")
- let line = getline(n)
- if line =~ '^\s*%'
- setf yacc
- return
- endif
- if getline(n) =~ '^\s*\(#\|class\>\)' && getline(n) !~ '^\s*#\s*include'
- setf racc
- return
- endif
- let n = n + 1
- endwhile
- setf yacc
- endfunc
- " Yaml
- 1 0.000046 au BufNewFile,BufRead *.yaml,*.yml setf yaml
- " yum conf (close enough to dosini)
- 1 0.000017 au BufNewFile,BufRead */etc/yum.conf setf dosini
- " Zimbu
- 1 0.000017 au BufNewFile,BufRead *.zu setf zimbu
- " Zimbu Templates
- 1 0.000020 au BufNewFile,BufRead *.zut setf zimbutempl
- " Zope
- " dtml (zope dynamic template markup language), pt (zope page template),
- " cpt (zope form controller page template)
- 1 0.000070 au BufNewFile,BufRead *.dtml,*.pt,*.cpt call s:FThtml()
- " zsql (zope sql method)
- 1 0.000019 au BufNewFile,BufRead *.zsql call s:SQL()
- " Z80 assembler asz80
- 1 0.000020 au BufNewFile,BufRead *.z8a setf z8a
- 1 0.000003 augroup END
- " Source the user-specified filetype file, for backwards compatibility with
- " Vim 5.x.
- 1 0.000012 if exists("myfiletypefile") && filereadable(expand(myfiletypefile))
- execute "source " . myfiletypefile
- endif
- " Check for "*" after loading myfiletypefile, so that scripts.vim is only used
- " when there are no matching file name extensions.
- " Don't do this for compressed files.
- 1 0.000001 augroup filetypedetect
- 1 0.000020 au BufNewFile,BufRead *
- \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
- \ | runtime! scripts.vim | endif
- 1 0.000004 au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
- " Extra checks for when no filetype has been detected now. Mostly used for
- " patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim
- " script file.
- " Most of these should call s:StarSetf() to avoid names ending in .gz and the
- " like are used.
- " More Apache config files
- 1 0.000083 au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache')
- 1 0.000098 au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
- " Asterisk config file
- 1 0.000024 au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk')
- 1 0.000032 au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm')
- " Bazaar version control
- 1 0.000018 au BufNewFile,BufRead bzr_log.* setf bzr
- " BIND zone
- 1 0.000031 au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone')
- " Calendar
- 1 0.000072 au BufNewFile,BufRead */.calendar/*,
- \*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
- \ call s:StarSetf('calendar')
- " Changelog
- 1 0.000028 au BufNewFile,BufRead [cC]hange[lL]og*
- \ if getline(1) =~ '; urgency='
- \| call s:StarSetf('debchangelog')
- \|else
- \| call s:StarSetf('changelog')
- \|endif
- " Crontab
- 1 0.000049 au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab')
- " dnsmasq(8) configuration
- 1 0.000017 au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq')
- " Dracula
- 1 0.000017 au BufNewFile,BufRead drac.* call s:StarSetf('dracula')
- " Fvwm
- 1 0.000017 au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm')
- 1 0.000032 au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook
- \ let b:fvwm_version = 1 | call s:StarSetf('fvwm')
- 1 0.000020 au BufNewFile,BufRead *fvwm2rc*
- \ if expand("<afile>:e") == "m4"
- \| call s:StarSetf('fvwm2m4')
- \|else
- \| let b:fvwm_version = 2 | call s:StarSetf('fvwm')
- \|endif
- " Gedcom
- 1 0.000016 au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom')
- " GTK RC
- 1 0.000035 au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc')
- " Jam
- 1 0.000034 au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam')
- " Jargon
- 1 0.000021 au! BufNewFile,BufRead *jarg*
- \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE'
- \| call s:StarSetf('jargon')
- \|endif
- " Kconfig
- 1 0.000019 au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
- " Lilo: Linux loader
- 1 0.000017 au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
- " Logcheck
- 1 0.000017 au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck')
- " Makefile
- 1 0.000016 au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make')
- " Ruby Makefile
- 1 0.000016 au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
- " Mail (also matches muttrc.vim, so this is below the other checks)
- 1 0.000027 au BufNewFile,BufRead mutt[[:alnum:]._-]\\\{6\} setf mail
- 1 0.000017 au BufNewFile,BufRead reportbug-* call s:StarSetf('mail')
- " Modconf
- 1 0.000018 au BufNewFile,BufRead */etc/modutils/*
- \ if executable(expand("<afile>")) != 1
- \| call s:StarSetf('modconf')
- \|endif
- 1 0.000017 au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf')
- " Mutt setup file
- 1 0.000041 au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
- 1 0.000031 au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
- " Nroff macros
- 1 0.000018 au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
- " Pam conf
- 1 0.000020 au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')
- " Printcap and Termcap
- 1 0.000019 au BufNewFile,BufRead *printcap*
- \ if !did_filetype()
- \| let b:ptcap_type = "print" | call s:StarSetf('ptcap')
- \|endif
- 1 0.000019 au BufNewFile,BufRead *termcap*
- \ if !did_filetype()
- \| let b:ptcap_type = "term" | call s:StarSetf('ptcap')
- \|endif
- " ReDIF
- " Only used when the .rdf file was not detected to be XML.
- 1 0.000024 au BufRead,BufNewFile *.rdf call s:Redif()
- 1 0.000005 func! s:Redif()
- let lnum = 1
- while lnum <= 5 && lnum < line('$')
- if getline(lnum) =~ "^\ctemplate-type:"
- setf redif
- return
- endif
- let lnum = lnum + 1
- endwhile
- endfunc
- " Remind
- 1 0.000019 au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
- " Vim script
- 1 0.000019 au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
- " Subversion commit file
- 1 0.000021 au BufNewFile,BufRead svn-commit*.tmp setf svn
- " X resources file
- 1 0.000048 au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults')
- " XFree86 config
- 1 0.000021 au BufNewFile,BufRead XF86Config-4*
- \ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf')
- 1 0.000026 au BufNewFile,BufRead XF86Config*
- \ if getline(1) =~ '\<XConfigurator\>'
- \| let b:xf86conf_xfree86_version = 3
- \|endif
- \|call s:StarSetf('xf86conf')
- " X11 xmodmap
- 1 0.000017 au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
- " Xinetd conf
- 1 0.000022 au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd')
- " yum conf (close enough to dosini)
- 1 0.000022 au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
- " Z-Shell script
- 1 0.000056 au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
- " Plain text files, needs to be far down to not override others. This avoids
- " the "conf" type being used if there is a line starting with '#'.
- 1 0.000057 au BufNewFile,BufRead *.txt,*.text,README setf text
- " Use the filetype detect plugins. They may overrule any of the previously
- " detected filetypes.
- 1 0.000130 runtime! ftdetect/*.vim
- " NOTE: The above command could have ended the filetypedetect autocmd group
- " and started another one. Let's make sure it has ended to get to a consistent
- " state.
- 1 0.000002 augroup END
- " Generic configuration file (check this last, it's just guessing!)
- 1 0.000025 au filetypedetect BufNewFile,BufRead,StdinReadPost *
- \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
- \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'
- \ || getline(4) =~ '^#' || getline(5) =~ '^#') |
- \ setf conf |
- \ endif
- " If the GUI is already running, may still need to install the Syntax menu.
- " Don't do it when the 'M' flag is included in 'guioptions'.
- 1 0.000017 if has("menu") && has("gui_running")
- \ && !exists("did_install_syntax_menu") && &guioptions !~# "M"
- source <sfile>:p:h/menu.vim
- endif
- " Function called for testing all functions defined here. These are
- " script-local, thus need to be executed here.
- " Returns a string with error messages (hopefully empty).
- 1 0.000003 func! TestFiletypeFuncs(testlist)
- let output = ''
- for f in a:testlist
- try
- exe f
- catch
- let output = output . "\n" . f . ": " . v:exception
- endtry
- endfor
- return output
- endfunc
- " Restore 'cpoptions'
- 1 0.000022 let &cpo = s:cpo_save
- 1 0.000004 unlet s:cpo_save
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/ftplugin.vim
- Sourced 1 time
- Total time: 0.000051
- Self time: 0.000051
- count total (s) self (s)
- " Vim support file to switch on loading plugins for file types
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last change: 2006 Apr 30
- 1 0.000006 if exists("did_load_ftplugin")
- finish
- endif
- 1 0.000003 let did_load_ftplugin = 1
- 1 0.000003 augroup filetypeplugin
- 1 0.000005 au FileType * call s:LoadFTPlugin()
- 1 0.000004 func! s:LoadFTPlugin()
- if exists("b:undo_ftplugin")
- exe b:undo_ftplugin
- unlet! b:undo_ftplugin b:did_ftplugin
- endif
- let s = expand("<amatch>")
- if s != ""
- if &cpo =~# "S" && exists("b:did_ftplugin")
- " In compatible mode options are reset to the global values, need to
- " set the local values also when a plugin was already used.
- unlet b:did_ftplugin
- endif
- " When there is a dot it is used to separate filetype names. Thus for
- " "aaa.bbb" load "aaa" and then "bbb".
- for name in split(s, '\.')
- exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
- endfor
- endif
- endfunc
- 1 0.000002 augroup END
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/indent.vim
- Sourced 1 time
- Total time: 0.000051
- Self time: 0.000051
- count total (s) self (s)
- " Vim support file to switch on loading indent files for file types
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last Change: 2008 Feb 22
- 1 0.000008 if exists("did_indent_on")
- finish
- endif
- 1 0.000004 let did_indent_on = 1
- 1 0.000002 augroup filetypeindent
- 1 0.000005 au FileType * call s:LoadIndent()
- 1 0.000004 func! s:LoadIndent()
- if exists("b:undo_indent")
- exe b:undo_indent
- unlet! b:undo_indent b:did_indent
- endif
- let s = expand("<amatch>")
- if s != ""
- if exists("b:did_indent")
- unlet b:did_indent
- endif
- " When there is a dot it is used to separate filetype names. Thus for
- " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".
- for name in split(s, '\.')
- exe 'runtime! indent/' . name . '.vim'
- endfor
- endif
- endfunc
- 1 0.000002 augroup END
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/gui_shim.vim
- Sourced 1 time
- Total time: 0.000015
- Self time: 0.000015
- count total (s) self (s)
- " A Neovim plugin that implements GUI helper commands
- 1 0.000010 if !has('win32') || !has('nvim') || exists('g:GuiLoaded')
- 1 0.000002 finish
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/gzip.vim
- Sourced 1 time
- Total time: 0.000201
- Self time: 0.000201
- count total (s) self (s)
- " Vim plugin for editing compressed files.
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last Change: 2010 Mar 10
- " Exit quickly when:
- " - this plugin was already loaded
- " - when 'compatible' is set
- " - some autocommands are already taking care of compressed files
- 1 0.000015 if exists("loaded_gzip") || &cp || exists("#BufReadPre#*.gz")
- finish
- endif
- 1 0.000004 let loaded_gzip = 1
- 1 0.000002 augroup gzip
- " Remove all gzip autocommands
- 1 0.000020 au!
- " Enable editing of gzipped files.
- " The functions are defined in autoload/gzip.vim.
- "
- " Set binary mode before reading the file.
- " Use "gzip -d", gunzip isn't always available.
- 1 0.000021 autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin
- 1 0.000011 autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
- 1 0.000011 autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
- 1 0.000017 autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
- 1 0.000011 autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
- 1 0.000009 autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
- 1 0.000004 autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
- 1 0.000004 autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
- 1 0.000006 autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
- 1 0.000004 autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
- 1 0.000005 autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
- 1 0.000003 autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
- 1 0.000003 autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
- 1 0.000004 autocmd FileAppendPre *.Z call gzip#appre("uncompress")
- 1 0.000003 autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
- 1 0.000005 autocmd FileAppendPre *.xz call gzip#appre("xz -d")
- 1 0.000003 autocmd FileAppendPost *.gz call gzip#write("gzip")
- 1 0.000004 autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
- 1 0.000003 autocmd FileAppendPost *.Z call gzip#write("compress -f")
- 1 0.000003 autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
- 1 0.000004 autocmd FileAppendPost *.xz call gzip#write("xz -z")
- 1 0.000002 augroup END
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/health.vim
- Sourced 1 time
- Total time: 0.000023
- Self time: 0.000023
- count total (s) self (s)
- function! s:complete(lead, _line, _pos) abort
- return sort(filter(map(globpath(&runtimepath, 'autoload/health/*', 1, 1),
- \ 'fnamemodify(v:val, ":t:r")'),
- \ 'empty(a:lead) || v:val[:strlen(a:lead)-1] ==# a:lead'))
- endfunction
- 1 0.000010 command! -nargs=* -complete=customlist,s:complete CheckHealth
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/man.vim
- Sourced 1 time
- Total time: 0.000075
- Self time: 0.000075
- count total (s) self (s)
- " Maintainer: Anmol Sethi <anmol@aubble.com>
- 1 0.000006 if exists('g:loaded_man')
- finish
- endif
- 1 0.000010 let g:loaded_man = 1
- 1 0.000015 command! -range=0 -complete=customlist,man#complete -nargs=* Man call man#open_page(v:count, v:count1, <q-mods>, <f-args>)
- 1 0.000003 augroup man
- 1 0.000020 autocmd!
- 1 0.000009 autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*'))
- 1 0.000003 augroup END
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/matchit.vim
- Sourced 1 time
- Total time: 0.000895
- Self time: 0.000895
- count total (s) self (s)
- " matchit.vim: (global plugin) Extended "%" matching
- " Last Change: Fri Jul 29 01:20 AM 2016 EST
- " Maintainer: Benji Fisher PhD <benji@member.AMS.org>
- " Version: 1.13.2, for Vim 6.3+
- " Fix from Tommy Allen included.
- " URL: http://www.vim.org/script.php?script_id=39
- " Documentation:
- " The documentation is in a separate file, matchit.txt .
- " Credits:
- " Vim editor by Bram Moolenaar (Thanks, Bram!)
- " Original script and design by Raul Segura Acevedo
- " Support for comments by Douglas Potts
- " Support for back references and other improvements by Benji Fisher
- " Support for many languages by Johannes Zellner
- " Suggestions for improvement, bug reports, and support for additional
- " languages by Jordi-Albert Batalla, Neil Bird, Servatius Brandt, Mark
- " Collett, Stephen Wall, Dany St-Amant, Yuheng Xie, and Johannes Zellner.
- " Debugging:
- " If you'd like to try the built-in debugging commands...
- " :MatchDebug to activate debugging for the current buffer
- " This saves the values of several key script variables as buffer-local
- " variables. See the MatchDebug() function, below, for details.
- " TODO: I should think about multi-line patterns for b:match_words.
- " This would require an option: how many lines to scan (default 1).
- " This would be useful for Python, maybe also for *ML.
- " TODO: Maybe I should add a menu so that people will actually use some of
- " the features that I have implemented.
- " TODO: Eliminate the MultiMatch function. Add yet another argument to
- " Match_wrapper() instead.
- " TODO: Allow :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1'
- " TODO: Make backrefs safer by using '\V' (very no-magic).
- " TODO: Add a level of indirection, so that custom % scripts can use my
- " work but extend it.
- " allow user to prevent loading
- " and prevent duplicate loading
- 1 0.000015 if exists("loaded_matchit") || &cp
- finish
- endif
- 1 0.000003 let loaded_matchit = 1
- 1 0.000002 let s:last_mps = ""
- 1 0.000002 let s:last_words = ":"
- 1 0.000006 let s:save_cpo = &cpo
- 1 0.000012 set cpo&vim
- 1 0.000033 nnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'n') <CR>
- 1 0.000058 nnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'n') <CR>
- 1 0.000009 vnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'v') <CR>m'gv``
- 1 0.000005 vnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'v') <CR>m'gv``
- 1 0.000005 onoremap <silent> % v:<C-U>call <SID>Match_wrapper('',1,'o') <CR>
- 1 0.000005 onoremap <silent> g% v:<C-U>call <SID>Match_wrapper('',0,'o') <CR>
- " Analogues of [{ and ]} using matching patterns:
- 1 0.000005 nnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "n") <CR>
- 1 0.000007 nnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "n") <CR>
- 1 0.000004 vmap [% <Esc>[%m'gv``
- 1 0.000003 vmap ]% <Esc>]%m'gv``
- " vnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "v") <CR>m'gv``
- " vnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "v") <CR>m'gv``
- 1 0.000005 onoremap <silent> [% v:<C-U>call <SID>MultiMatch("bW", "o") <CR>
- 1 0.000004 onoremap <silent> ]% v:<C-U>call <SID>MultiMatch("W", "o") <CR>
- " text object:
- 1 0.000003 vmap a% <Esc>[%v]%
- " Auto-complete mappings: (not yet "ready for prime time")
- " TODO Read :help write-plugin for the "right" way to let the user
- " specify a key binding.
- " let g:match_auto = '<C-]>'
- " let g:match_autoCR = '<C-CR>'
- " if exists("g:match_auto")
- " execute "inoremap " . g:match_auto . ' x<Esc>"=<SID>Autocomplete()<CR>Pls'
- " endif
- " if exists("g:match_autoCR")
- " execute "inoremap " . g:match_autoCR . ' <CR><C-R>=<SID>Autocomplete()<CR>'
- " endif
- " if exists("g:match_gthhoh")
- " execute "inoremap " . g:match_gthhoh . ' <C-O>:call <SID>Gthhoh()<CR>'
- " endif " gthhoh = "Get the heck out of here!"
- 1 0.000004 let s:notslash = '\\\@<!\%(\\\\\)*'
- 1 0.000004 function! s:Match_wrapper(word, forward, mode) range
- " In s:CleanUp(), :execute "set" restore_options .
- let restore_options = (&ic ? " " : " no") . "ignorecase"
- if exists("b:match_ignorecase")
- let &ignorecase = b:match_ignorecase
- endif
- let restore_options = " ve=" . &ve . restore_options
- set ve=
- " If this function was called from Visual mode, make sure that the cursor
- " is at the correct end of the Visual range:
- if a:mode == "v"
- execute "normal! gv\<Esc>"
- endif
- " In s:CleanUp(), we may need to check whether the cursor moved forward.
- let startline = line(".")
- let startcol = col(".")
- " Use default behavior if called with a count.
- if v:count
- exe "normal! " . v:count . "%"
- return s:CleanUp(restore_options, a:mode, startline, startcol)
- end
- " First step: if not already done, set the script variables
- " s:do_BR flag for whether there are backrefs
- " s:pat parsed version of b:match_words
- " s:all regexp based on s:pat and the default groups
- "
- if !exists("b:match_words") || b:match_words == ""
- let match_words = ""
- " Allow b:match_words = "GetVimMatchWords()" .
- elseif b:match_words =~ ":"
- let match_words = b:match_words
- else
- execute "let match_words =" b:match_words
- endif
- " Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
- if (match_words != s:last_words) || (&mps != s:last_mps) ||
- \ exists("b:match_debug")
- let s:last_mps = &mps
- " The next several lines were here before
- " BF started messing with this script.
- " quote the special chars in 'matchpairs', replace [,:] with \| and then
- " append the builtin pairs (/*, */, #if, #ifdef, #else, #elif, #endif)
- " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
- " \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
- let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
- \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
- " s:all = pattern with all the keywords
- let match_words = match_words . (strlen(match_words) ? "," : "") . default
- let s:last_words = match_words
- if match_words !~ s:notslash . '\\\d'
- let s:do_BR = 0
- let s:pat = match_words
- else
- let s:do_BR = 1
- let s:pat = s:ParseWords(match_words)
- endif
- let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g')
- let s:all = '\%(' . s:all . '\)'
- " let s:all = '\%(' . substitute(s:all, '\\\ze[,:]', '', 'g') . '\)'
- if exists("b:match_debug")
- let b:match_pat = s:pat
- endif
- endif
- " Second step: set the following local variables:
- " matchline = line on which the cursor started
- " curcol = number of characters before match
- " prefix = regexp for start of line to start of match
- " suffix = regexp for end of match to end of line
- " Require match to end on or after the cursor and prefer it to
- " start on or before the cursor.
- let matchline = getline(startline)
- if a:word != ''
- " word given
- if a:word !~ s:all
- echohl WarningMsg|echo 'Missing rule for word:"'.a:word.'"'|echohl NONE
- return s:CleanUp(restore_options, a:mode, startline, startcol)
- endif
- let matchline = a:word
- let curcol = 0
- let prefix = '^\%('
- let suffix = '\)$'
- " Now the case when "word" is not given
- else " Find the match that ends on or after the cursor and set curcol.
- let regexp = s:Wholematch(matchline, s:all, startcol-1)
- let curcol = match(matchline, regexp)
- " If there is no match, give up.
- if curcol == -1
- return s:CleanUp(restore_options, a:mode, startline, startcol)
- endif
- let endcol = matchend(matchline, regexp)
- let suf = strlen(matchline) - endcol
- let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(')
- let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$')
- endif
- if exists("b:match_debug")
- let b:match_match = matchstr(matchline, regexp)
- let b:match_col = curcol+1
- endif
- " Third step: Find the group and single word that match, and the original
- " (backref) versions of these. Then, resolve the backrefs.
- " Set the following local variable:
- " group = colon-separated list of patterns, one of which matches
- " = ini:mid:fin or ini:fin
- "
- " Reconstruct the version with unresolved backrefs.
- let patBR = substitute(match_words.',',
- \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
- let patBR = substitute(patBR, s:notslash.'\zs:\{2,}', ':', 'g')
- " Now, set group and groupBR to the matching group: 'if:endif' or
- " 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
- " group . "," . groupBR, and we pick it apart.
- let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
- let i = matchend(group, s:notslash . ",")
- let groupBR = strpart(group, i)
- let group = strpart(group, 0, i-1)
- " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
- if s:do_BR " Do the hard part: resolve those backrefs!
- let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
- endif
- if exists("b:match_debug")
- let b:match_wholeBR = groupBR
- let i = matchend(groupBR, s:notslash . ":")
- let b:match_iniBR = strpart(groupBR, 0, i-1)
- endif
- " Fourth step: Set the arguments for searchpair().
- let i = matchend(group, s:notslash . ":")
- let j = matchend(group, '.*' . s:notslash . ":")
- let ini = strpart(group, 0, i-1)
- let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g')
- let fin = strpart(group, j)
- "Un-escape the remaining , and : characters.
- let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
- let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
- let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
- " searchpair() requires that these patterns avoid \(\) groups.
- let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g')
- let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g')
- let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g')
- " Set mid. This is optimized for readability, not micro-efficiency!
- if a:forward && matchline =~ prefix . fin . suffix
- \ || !a:forward && matchline =~ prefix . ini . suffix
- let mid = ""
- endif
- " Set flag. This is optimized for readability, not micro-efficiency!
- if a:forward && matchline =~ prefix . fin . suffix
- \ || !a:forward && matchline !~ prefix . ini . suffix
- let flag = "bW"
- else
- let flag = "W"
- endif
- " Set skip.
- if exists("b:match_skip")
- let skip = b:match_skip
- elseif exists("b:match_comment") " backwards compatibility and testing!
- let skip = "r:" . b:match_comment
- else
- let skip = 's:comment\|string'
- endif
- let skip = s:ParseSkip(skip)
- if exists("b:match_debug")
- let b:match_ini = ini
- let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin
- endif
- " Fifth step: actually start moving the cursor and call searchpair().
- " Later, :execute restore_cursor to get to the original screen.
- let view = winsaveview()
- call cursor(0, curcol + 1)
- " normal! 0
- " if curcol
- " execute "normal!" . curcol . "l"
- " endif
- if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
- let skip = "0"
- else
- execute "if " . skip . "| let skip = '0' | endif"
- endif
- let sp_return = searchpair(ini, mid, fin, flag, skip)
- let final_position = "call cursor(" . line(".") . "," . col(".") . ")"
- " Restore cursor position and original screen.
- call winrestview(view)
- normal! m'
- if sp_return > 0
- execute final_position
- endif
- return s:CleanUp(restore_options, a:mode, startline, startcol, mid.'\|'.fin)
- endfun
- " Restore options and do some special handling for Operator-pending mode.
- " The optional argument is the tail of the matching group.
- 1 0.000004 fun! s:CleanUp(options, mode, startline, startcol, ...)
- execute "set" a:options
- " Open folds, if appropriate.
- if a:mode != "o"
- if &foldopen =~ "percent"
- normal! zv
- endif
- " In Operator-pending mode, we want to include the whole match
- " (for example, d%).
- " This is only a problem if we end up moving in the forward direction.
- elseif (a:startline < line(".")) ||
- \ (a:startline == line(".") && a:startcol < col("."))
- if a:0
- " Check whether the match is a single character. If not, move to the
- " end of the match.
- let matchline = getline(".")
- let currcol = col(".")
- let regexp = s:Wholematch(matchline, a:1, currcol-1)
- let endcol = matchend(matchline, regexp)
- if endcol > currcol " This is NOT off by one!
- call cursor(0, endcol)
- endif
- endif " a:0
- endif " a:mode != "o" && etc.
- return 0
- endfun
- " Example (simplified HTML patterns): if
- " a:groupBR = '<\(\k\+\)>:</\1>'
- " a:prefix = '^.\{3}\('
- " a:group = '<\(\k\+\)>:</\(\k\+\)>'
- " a:suffix = '\).\{2}$'
- " a:matchline = "123<tag>12" or "123</tag>12"
- " then extract "tag" from a:matchline and return "<tag>:</tag>" .
- 1 0.000003 fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
- if a:matchline !~ a:prefix .
- \ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix
- return a:group
- endif
- let i = matchend(a:groupBR, s:notslash . ':')
- let ini = strpart(a:groupBR, 0, i-1)
- let tailBR = strpart(a:groupBR, i)
- let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix,
- \ a:groupBR)
- let i = matchend(word, s:notslash . ":")
- let wordBR = strpart(word, i)
- let word = strpart(word, 0, i-1)
- " Now, a:matchline =~ a:prefix . word . a:suffix
- if wordBR != ini
- let table = s:Resolve(ini, wordBR, "table")
- else
- " let table = "----------"
- let table = ""
- let d = 0
- while d < 10
- if tailBR =~ s:notslash . '\\' . d
- " let table[d] = d
- let table = table . d
- else
- let table = table . "-"
- endif
- let d = d + 1
- endwhile
- endif
- let d = 9
- while d
- if table[d] != "-"
- let backref = substitute(a:matchline, a:prefix.word.a:suffix,
- \ '\'.table[d], "")
- " Are there any other characters that should be escaped?
- let backref = escape(backref, '*,:')
- execute s:Ref(ini, d, "start", "len")
- let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len)
- let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d,
- \ escape(backref, '\\&'), 'g')
- endif
- let d = d-1
- endwhile
- if exists("b:match_debug")
- if s:do_BR
- let b:match_table = table
- let b:match_word = word
- else
- let b:match_table = ""
- let b:match_word = ""
- endif
- endif
- return ini . ":" . tailBR
- endfun
- " Input a comma-separated list of groups with backrefs, such as
- " a:groups = '\(foo\):end\1,\(bar\):end\1'
- " and return a comma-separated list of groups with backrefs replaced:
- " return '\(foo\):end\(foo\),\(bar\):end\(bar\)'
- 1 0.000002 fun! s:ParseWords(groups)
- let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
- let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g')
- let parsed = ""
- while groups =~ '[^,:]'
- let i = matchend(groups, s:notslash . ':')
- let j = matchend(groups, s:notslash . ',')
- let ini = strpart(groups, 0, i-1)
- let tail = strpart(groups, i, j-i-1) . ":"
- let groups = strpart(groups, j)
- let parsed = parsed . ini
- let i = matchend(tail, s:notslash . ':')
- while i != -1
- " In 'if:else:endif', ini='if' and word='else' and then word='endif'.
- let word = strpart(tail, 0, i-1)
- let tail = strpart(tail, i)
- let i = matchend(tail, s:notslash . ':')
- let parsed = parsed . ":" . s:Resolve(ini, word, "word")
- endwhile " Now, tail has been used up.
- let parsed = parsed . ","
- endwhile " groups =~ '[^,:]'
- let parsed = substitute(parsed, ',$', '', '')
- return parsed
- endfun
- " TODO I think this can be simplified and/or made more efficient.
- " TODO What should I do if a:start is out of range?
- " Return a regexp that matches all of a:string, such that
- " matchstr(a:string, regexp) represents the match for a:pat that starts
- " as close to a:start as possible, before being preferred to after, and
- " ends after a:start .
- " Usage:
- " let regexp = s:Wholematch(getline("."), 'foo\|bar', col(".")-1)
- " let i = match(getline("."), regexp)
- " let j = matchend(getline("."), regexp)
- " let match = matchstr(getline("."), regexp)
- 1 0.000002 fun! s:Wholematch(string, pat, start)
- let group = '\%(' . a:pat . '\)'
- let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^')
- let len = strlen(a:string)
- let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$')
- if a:string !~ prefix . group . suffix
- let prefix = ''
- endif
- return prefix . group . suffix
- endfun
- " No extra arguments: s:Ref(string, d) will
- " find the d'th occurrence of '\(' and return it, along with everything up
- " to and including the matching '\)'.
- " One argument: s:Ref(string, d, "start") returns the index of the start
- " of the d'th '\(' and any other argument returns the length of the group.
- " Two arguments: s:Ref(string, d, "foo", "bar") returns a string to be
- " executed, having the effect of
- " :let foo = s:Ref(string, d, "start")
- " :let bar = s:Ref(string, d, "len")
- 1 0.000002 fun! s:Ref(string, d, ...)
- let len = strlen(a:string)
- if a:d == 0
- let start = 0
- else
- let cnt = a:d
- let match = a:string
- while cnt
- let cnt = cnt - 1
- let index = matchend(match, s:notslash . '\\(')
- if index == -1
- return ""
- endif
- let match = strpart(match, index)
- endwhile
- let start = len - strlen(match)
- if a:0 == 1 && a:1 == "start"
- return start - 2
- endif
- let cnt = 1
- while cnt
- let index = matchend(match, s:notslash . '\\(\|\\)') - 1
- if index == -2
- return ""
- endif
- " Increment if an open, decrement if a ')':
- let cnt = cnt + (match[index]=="(" ? 1 : -1) " ')'
- " let cnt = stridx('0(', match[index]) + cnt
- let match = strpart(match, index+1)
- endwhile
- let start = start - 2
- let len = len - start - strlen(match)
- endif
- if a:0 == 1
- return len
- elseif a:0 == 2
- return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len
- else
- return strpart(a:string, start, len)
- endif
- endfun
- " Count the number of disjoint copies of pattern in string.
- " If the pattern is a literal string and contains no '0' or '1' characters
- " then s:Count(string, pattern, '0', '1') should be faster than
- " s:Count(string, pattern).
- 1 0.000002 fun! s:Count(string, pattern, ...)
- let pat = escape(a:pattern, '\\')
- if a:0 > 1
- let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g")
- let foo = substitute(a:string, pat, a:2, "g")
- let foo = substitute(foo, '[^' . a:2 . ']', "", "g")
- return strlen(foo)
- endif
- let result = 0
- let foo = a:string
- let index = matchend(foo, pat)
- while index != -1
- let result = result + 1
- let foo = strpart(foo, index)
- let index = matchend(foo, pat)
- endwhile
- return result
- endfun
- " s:Resolve('\(a\)\(b\)', '\(c\)\2\1\1\2') should return table.word, where
- " word = '\(c\)\(b\)\(a\)\3\2' and table = '-32-------'. That is, the first
- " '\1' in target is replaced by '\(a\)' in word, table[1] = 3, and this
- " indicates that all other instances of '\1' in target are to be replaced
- " by '\3'. The hard part is dealing with nesting...
- " Note that ":" is an illegal character for source and target,
- " unless it is preceded by "\".
- 1 0.000002 fun! s:Resolve(source, target, output)
- let word = a:target
- let i = matchend(word, s:notslash . '\\\d') - 1
- let table = "----------"
- while i != -2 " There are back references to be replaced.
- let d = word[i]
- let backref = s:Ref(a:source, d)
- " The idea is to replace '\d' with backref. Before we do this,
- " replace any \(\) groups in backref with :1, :2, ... if they
- " correspond to the first, second, ... group already inserted
- " into backref. Later, replace :1 with \1 and so on. The group
- " number w+b within backref corresponds to the group number
- " s within a:source.
- " w = number of '\(' in word before the current one
- let w = s:Count(
- \ substitute(strpart(word, 0, i-1), '\\\\', '', 'g'), '\(', '1')
- let b = 1 " number of the current '\(' in backref
- let s = d " number of the current '\(' in a:source
- while b <= s:Count(substitute(backref, '\\\\', '', 'g'), '\(', '1')
- \ && s < 10
- if table[s] == "-"
- if w + b < 10
- " let table[s] = w + b
- let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1)
- endif
- let b = b + 1
- let s = s + 1
- else
- execute s:Ref(backref, b, "start", "len")
- let ref = strpart(backref, start, len)
- let backref = strpart(backref, 0, start) . ":". table[s]
- \ . strpart(backref, start+len)
- let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1')
- endif
- endwhile
- let word = strpart(word, 0, i-1) . backref . strpart(word, i+1)
- let i = matchend(word, s:notslash . '\\\d') - 1
- endwhile
- let word = substitute(word, s:notslash . '\zs:', '\\', 'g')
- if a:output == "table"
- return table
- elseif a:output == "word"
- return word
- else
- return table . word
- endif
- endfun
- " Assume a:comma = ",". Then the format for a:patterns and a:1 is
- " a:patterns = "<pat1>,<pat2>,..."
- " a:1 = "<alt1>,<alt2>,..."
- " If <patn> is the first pattern that matches a:string then return <patn>
- " if no optional arguments are given; return <patn>,<altn> if a:1 is given.
- 1 0.000003 fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
- let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma)
- let i = matchend(tail, s:notslash . a:comma)
- if a:0
- let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma)
- let j = matchend(alttail, s:notslash . a:comma)
- endif
- let current = strpart(tail, 0, i-1)
- if a:branch == ""
- let currpat = current
- else
- let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
- endif
- while a:string !~ a:prefix . currpat . a:suffix
- let tail = strpart(tail, i)
- let i = matchend(tail, s:notslash . a:comma)
- if i == -1
- return -1
- endif
- let current = strpart(tail, 0, i-1)
- if a:branch == ""
- let currpat = current
- else
- let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
- endif
- if a:0
- let alttail = strpart(alttail, j)
- let j = matchend(alttail, s:notslash . a:comma)
- endif
- endwhile
- if a:0
- let current = current . a:comma . strpart(alttail, 0, j-1)
- endif
- return current
- endfun
- " Call this function to turn on debugging information. Every time the main
- " script is run, buffer variables will be saved. These can be used directly
- " or viewed using the menu items below.
- 1 0.000006 if !exists(":MatchDebug")
- 1 0.000004 command! -nargs=0 MatchDebug call s:Match_debug()
- 1 0.000001 endif
- 1 0.000002 fun! s:Match_debug()
- let b:match_debug = 1 " Save debugging information.
- " pat = all of b:match_words with backrefs parsed
- amenu &Matchit.&pat :echo b:match_pat<CR>
- " match = bit of text that is recognized as a match
- amenu &Matchit.&match :echo b:match_match<CR>
- " curcol = cursor column of the start of the matching text
- amenu &Matchit.&curcol :echo b:match_col<CR>
- " wholeBR = matching group, original version
- amenu &Matchit.wh&oleBR :echo b:match_wholeBR<CR>
- " iniBR = 'if' piece, original version
- amenu &Matchit.ini&BR :echo b:match_iniBR<CR>
- " ini = 'if' piece, with all backrefs resolved from match
- amenu &Matchit.&ini :echo b:match_ini<CR>
- " tail = 'else\|endif' piece, with all backrefs resolved from match
- amenu &Matchit.&tail :echo b:match_tail<CR>
- " fin = 'endif' piece, with all backrefs resolved from match
- amenu &Matchit.&word :echo b:match_word<CR>
- " '\'.d in ini refers to the same thing as '\'.table[d] in word.
- amenu &Matchit.t&able :echo '0:' . b:match_table . ':9'<CR>
- endfun
- " Jump to the nearest unmatched "(" or "if" or "<tag>" if a:spflag == "bW"
- " or the nearest unmatched "</tag>" or "endif" or ")" if a:spflag == "W".
- " Return a "mark" for the original position, so that
- " let m = MultiMatch("bW", "n") ... execute m
- " will return to the original position. If there is a problem, do not
- " move the cursor and return "", unless a count is given, in which case
- " go up or down as many levels as possible and again return "".
- " TODO This relies on the same patterns as % matching. It might be a good
- " idea to give it its own matching patterns.
- 1 0.000002 fun! s:MultiMatch(spflag, mode)
- if !exists("b:match_words") || b:match_words == ""
- return {}
- end
- let restore_options = (&ic ? "" : "no") . "ignorecase"
- if exists("b:match_ignorecase")
- let &ignorecase = b:match_ignorecase
- endif
- let startline = line(".")
- let startcol = col(".")
- " First step: if not already done, set the script variables
- " s:do_BR flag for whether there are backrefs
- " s:pat parsed version of b:match_words
- " s:all regexp based on s:pat and the default groups
- " This part is copied and slightly modified from s:Match_wrapper().
- let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
- \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
- " Allow b:match_words = "GetVimMatchWords()" .
- if b:match_words =~ ":"
- let match_words = b:match_words
- else
- execute "let match_words =" b:match_words
- endif
- if (match_words != s:last_words) || (&mps != s:last_mps) ||
- \ exists("b:match_debug")
- let s:last_words = match_words
- let s:last_mps = &mps
- if match_words !~ s:notslash . '\\\d'
- let s:do_BR = 0
- let s:pat = match_words
- else
- let s:do_BR = 1
- let s:pat = s:ParseWords(match_words)
- endif
- let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default,
- \ '[,:]\+','\\|','g') . '\)'
- if exists("b:match_debug")
- let b:match_pat = s:pat
- endif
- endif
- " Second step: figure out the patterns for searchpair()
- " and save the screen, cursor position, and 'ignorecase'.
- " - TODO: A lot of this is copied from s:Match_wrapper().
- " - maybe even more functionality should be split off
- " - into separate functions!
- let cdefault = (s:pat =~ '[^,]$' ? "," : "") . default
- let open = substitute(s:pat . cdefault,
- \ s:notslash . '\zs:.\{-}' . s:notslash . ',', '\\),\\(', 'g')
- let open = '\(' . substitute(open, s:notslash . '\zs:.*$', '\\)', '')
- let close = substitute(s:pat . cdefault,
- \ s:notslash . '\zs,.\{-}' . s:notslash . ':', '\\),\\(', 'g')
- let close = substitute(close, '^.\{-}' . s:notslash . ':', '\\(', '') . '\)'
- if exists("b:match_skip")
- let skip = b:match_skip
- elseif exists("b:match_comment") " backwards compatibility and testing!
- let skip = "r:" . b:match_comment
- else
- let skip = 's:comment\|string'
- endif
- let skip = s:ParseSkip(skip)
- let view = winsaveview()
- " Third step: call searchpair().
- " Replace '\('--but not '\\('--with '\%(' and ',' with '\|'.
- let openpat = substitute(open, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
- let openpat = substitute(openpat, ',', '\\|', 'g')
- let closepat = substitute(close, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
- let closepat = substitute(closepat, ',', '\\|', 'g')
- if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
- let skip = '0'
- else
- execute "if " . skip . "| let skip = '0' | endif"
- endif
- mark '
- let level = v:count1
- while level
- if searchpair(openpat, '', closepat, a:spflag, skip) < 1
- call s:CleanUp(restore_options, a:mode, startline, startcol)
- return {}
- endif
- let level = level - 1
- endwhile
- " Restore options and return view dict to restore the original position.
- call s:CleanUp(restore_options, a:mode, startline, startcol)
- return view
- endfun
- " Search backwards for "if" or "while" or "<tag>" or ...
- " and return "endif" or "endwhile" or "</tag>" or ... .
- " For now, this uses b:match_words and the same script variables
- " as s:Match_wrapper() . Later, it may get its own patterns,
- " either from a buffer variable or passed as arguments.
- " fun! s:Autocomplete()
- " echo "autocomplete not yet implemented :-("
- " if !exists("b:match_words") || b:match_words == ""
- " return ""
- " end
- " let startpos = s:MultiMatch("bW")
- "
- " if startpos == ""
- " return ""
- " endif
- " " - TODO: figure out whether 'if' or '<tag>' matched, and construct
- " " - the appropriate closing.
- " let matchline = getline(".")
- " let curcol = col(".") - 1
- " " - TODO: Change the s:all argument if there is a new set of match pats.
- " let regexp = s:Wholematch(matchline, s:all, curcol)
- " let suf = strlen(matchline) - matchend(matchline, regexp)
- " let prefix = (curcol ? '^.\{' . curcol . '}\%(' : '^\%(')
- " let suffix = (suf ? '\).\{' . suf . '}$' : '\)$')
- " " Reconstruct the version with unresolved backrefs.
- " let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g')
- " let patBR = substitute(patBR, ':\{2,}', ':', "g")
- " " Now, set group and groupBR to the matching group: 'if:endif' or
- " " 'while:endwhile' or whatever.
- " let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
- " let i = matchend(group, s:notslash . ",")
- " let groupBR = strpart(group, i)
- " let group = strpart(group, 0, i-1)
- " " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
- " if s:do_BR
- " let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
- " endif
- " " let g:group = group
- "
- " " - TODO: Construct the closing from group.
- " let fake = "end" . expand("<cword>")
- " execute startpos
- " return fake
- " endfun
- " Close all open structures. "Get the heck out of here!"
- " fun! s:Gthhoh()
- " let close = s:Autocomplete()
- " while strlen(close)
- " put=close
- " let close = s:Autocomplete()
- " endwhile
- " endfun
- " Parse special strings as typical skip arguments for searchpair():
- " s:foo becomes (current syntax item) =~ foo
- " S:foo becomes (current syntax item) !~ foo
- " r:foo becomes (line before cursor) =~ foo
- " R:foo becomes (line before cursor) !~ foo
- 1 0.000005 fun! s:ParseSkip(str)
- let skip = a:str
- if skip[1] == ":"
- if skip[0] == "s"
- let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" .
- \ strpart(skip,2) . "'"
- elseif skip[0] == "S"
- let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" .
- \ strpart(skip,2) . "'"
- elseif skip[0] == "r"
- let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'"
- elseif skip[0] == "R"
- let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'"
- endif
- endif
- return skip
- endfun
- 1 0.000012 let &cpo = s:save_cpo
- 1 0.000003 unlet s:save_cpo
- " vim:sts=2:sw=2:
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/matchparen.vim
- Sourced 1 time
- Total time: 0.000282
- Self time: 0.000282
- count total (s) self (s)
- " Vim plugin for showing matching parens
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last Change: 2016 Feb 16
- " Exit quickly when:
- " - this plugin was already loaded (or disabled)
- " - when 'compatible' is set
- " - the "CursorMoved" autocmd event is not available.
- 1 0.000014 if exists("g:loaded_matchparen") || &cp || !exists("##CursorMoved")
- finish
- endif
- 1 0.000003 let g:loaded_matchparen = 1
- 1 0.000002 if !exists("g:matchparen_timeout")
- 1 0.000002 let g:matchparen_timeout = 300
- 1 0.000001 endif
- 1 0.000002 if !exists("g:matchparen_insert_timeout")
- 1 0.000002 let g:matchparen_insert_timeout = 60
- 1 0.000001 endif
- 1 0.000002 augroup matchparen
- " Replace all matchparen autocommands
- 1 0.000009 autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair()
- 1 0.000003 if exists('##TextChanged')
- 1 0.000005 autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
- 1 0.000001 endif
- 1 0.000001 augroup END
- " Skip the rest if it was already done.
- 1 0.000005 if exists("*s:Highlight_Matching_Pair")
- finish
- endif
- 1 0.000007 let s:cpo_save = &cpo
- 1 0.000008 set cpo-=C
- " The function that is invoked (very often) to define a ":match" highlighting
- " for any matching paren.
- 1 0.000004 function! s:Highlight_Matching_Pair()
- " Remove any previous match.
- if exists('w:paren_hl_on') && w:paren_hl_on
- silent! call matchdelete(3)
- let w:paren_hl_on = 0
- endif
- " Avoid that we remove the popup menu.
- " Return when there are no colors (looks like the cursor jumps).
- if pumvisible() || (&t_Co < 8 && !has("gui_running"))
- return
- endif
- " Get the character under the cursor and check if it's in 'matchpairs'.
- let c_lnum = line('.')
- let c_col = col('.')
- let before = 0
- let text = getline(c_lnum)
- let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)')
- if empty(matches)
- let [c_before, c] = ['', '']
- else
- let [c_before, c] = matches[1:2]
- endif
- let plist = split(&matchpairs, '.\zs[:,]')
- let i = index(plist, c)
- if i < 0
- " not found, in Insert mode try character before the cursor
- if c_col > 1 && (mode() == 'i' || mode() == 'R')
- let before = strlen(c_before)
- let c = c_before
- let i = index(plist, c)
- endif
- if i < 0
- " not found, nothing to do
- return
- endif
- endif
- " Figure out the arguments for searchpairpos().
- if i % 2 == 0
- let s_flags = 'nW'
- let c2 = plist[i + 1]
- else
- let s_flags = 'nbW'
- let c2 = c
- let c = plist[i - 1]
- endif
- if c == '['
- let c = '\['
- let c2 = '\]'
- endif
- " Find the match. When it was just before the cursor move it there for a
- " moment.
- if before > 0
- let has_getcurpos = exists("*getcurpos")
- if has_getcurpos
- " getcurpos() is more efficient but doesn't exist before 7.4.313.
- let save_cursor = getcurpos()
- else
- let save_cursor = winsaveview()
- endif
- call cursor(c_lnum, c_col - before)
- endif
- " Build an expression that detects whether the current cursor position is in
- " certain syntax types (string, comment, etc.), for use as searchpairpos()'s
- " skip argument.
- " We match "escape" for special items, such as lispEscapeSpecial.
- let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
- \ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
- " If executing the expression determines that the cursor is currently in
- " one of the syntax types, then we want searchpairpos() to find the pair
- " within those syntax types (i.e., not skip). Otherwise, the cursor is
- " outside of the syntax types and s_skip should keep its value so we skip any
- " matching pair inside the syntax types.
- execute 'if' s_skip '| let s_skip = 0 | endif'
- " Limit the search to lines visible in the window.
- let stoplinebottom = line('w$')
- let stoplinetop = line('w0')
- if i % 2 == 0
- let stopline = stoplinebottom
- else
- let stopline = stoplinetop
- endif
- " Limit the search time to 300 msec to avoid a hang on very long lines.
- " This fails when a timeout is not supported.
- if mode() == 'i' || mode() == 'R'
- let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
- else
- let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
- endif
- try
- let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
- catch /E118/
- " Can't use the timeout, restrict the stopline a bit more to avoid taking
- " a long time on closed folds and long lines.
- " The "viewable" variables give a range in which we can scroll while
- " keeping the cursor at the same position.
- " adjustedScrolloff accounts for very large numbers of scrolloff.
- let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2])
- let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2])
- let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2])
- " one of these stoplines will be adjusted below, but the current values are
- " minimal boundaries within the current window
- if i % 2 == 0
- if has("byte_offset") && has("syntax_items") && &smc > 0
- let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2])
- let stopline = min([bottom_viewable, byte2line(stopbyte)])
- else
- let stopline = min([bottom_viewable, c_lnum + 100])
- endif
- let stoplinebottom = stopline
- else
- if has("byte_offset") && has("syntax_items") && &smc > 0
- let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2])
- let stopline = max([top_viewable, byte2line(stopbyte)])
- else
- let stopline = max([top_viewable, c_lnum - 100])
- endif
- let stoplinetop = stopline
- endif
- let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
- endtry
- if before > 0
- if has_getcurpos
- call setpos('.', save_cursor)
- else
- call winrestview(save_cursor)
- endif
- endif
- " If a match is found setup match highlighting.
- if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
- if exists('*matchaddpos')
- call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
- else
- exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
- \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
- endif
- let w:paren_hl_on = 1
- endif
- endfunction
- " Define commands that will disable and enable the plugin.
- 1 0.000011 command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen |
- \ au! matchparen
- 1 0.000006 command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
- 1 0.000010 let &cpo = s:cpo_save
- 1 0.000003 unlet s:cpo_save
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/netrwPlugin.vim
- Sourced 1 time
- Total time: 0.000592
- Self time: 0.000592
- count total (s) self (s)
- " netrwPlugin.vim: Handles file transfer and remote directory listing across a network
- " PLUGIN SECTION
- " Date: Feb 08, 2016
- " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
- " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
- " Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1
- " Permission is hereby granted to use and distribute this code,
- " with or without modifications, provided that this copyright
- " notice is copied with it. Like anything else that's free,
- " netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided
- " *as is* and comes with no warranty of any kind, either
- " expressed or implied. By using this plugin, you agree that
- " in no event will the copyright holder be liable for any damages
- " resulting from the use of this software.
- "
- " But be doers of the Word, and not only hearers, deluding your own selves {{{1
- " (James 1:22 RSV)
- " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- " Load Once: {{{1
- 1 0.000011 if &cp || exists("g:loaded_netrwPlugin")
- finish
- endif
- 1 0.000003 let g:loaded_netrwPlugin = "v156"
- 1 0.000006 let s:keepcpo = &cpo
- 1 0.000007 set cpo&vim
- "DechoRemOn
- " ---------------------------------------------------------------------
- " Public Interface: {{{1
- " Local Browsing Autocmds: {{{2
- 1 0.000002 augroup FileExplorer
- 1 0.000020 au!
- 1 0.000006 au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif
- 1 0.000003 au BufEnter * sil call s:LocalBrowse(expand("<amatch>"))
- 1 0.000006 au VimEnter * sil call s:VimEnter(expand("<amatch>"))
- 1 0.000010 if has("win32") || has("win95") || has("win64") || has("win16")
- au BufEnter .* sil call s:LocalBrowse(expand("<amatch>"))
- endif
- 1 0.000001 augroup END
- " Network Browsing Reading Writing: {{{2
- 1 0.000001 augroup Network
- 1 0.000016 au!
- 1 0.000006 au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
- 1 0.000025 au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
- 1 0.000024 au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
- 1 0.000019 au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
- 1 0.000027 au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
- 1 0.000002 try
- 1 0.000015 au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
- 1 0.000003 catch /^Vim\%((\a\+)\)\=:E216/
- au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
- endtry
- 1 0.000002 augroup END
- " Commands: :Nread, :Nwrite, :NetUserPass {{{2
- 1 0.000024 com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
- 1 0.000015 com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
- 1 0.000004 com! -nargs=* NetUserPass call NetUserPass(<f-args>)
- 1 0.000008 com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
- 1 0.000004 com! -nargs=? Ntree call netrw#SetTreetop(<q-args>)
- " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
- 1 0.000009 com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
- 1 0.000007 com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>)
- 1 0.000007 com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>)
- 1 0.000006 com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>)
- 1 0.000006 com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>)
- 1 0.000004 com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
- 1 0.000005 com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
- 1 0.000006 com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(<count>,<bang>0,<q-args>)
- " Commands: NetrwSettings {{{2
- 1 0.000004 com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
- 1 0.000004 com! -bang NetrwClean call netrw#Clean(<bang>0)
- " Maps:
- 1 0.000005 if !exists("g:netrw_nogx")
- 1 0.000010 if maparg('gx','n') == ""
- 1 0.000010 if !hasmapto('<Plug>NetrwBrowseX')
- 1 0.000005 nmap <unique> gx <Plug>NetrwBrowseX
- 1 0.000001 endif
- 1 0.000011 nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
- 1 0.000001 endif
- 1 0.000004 if maparg('gx','v') == ""
- 1 0.000006 if !hasmapto('<Plug>NetrwBrowseXVis')
- 1 0.000005 vmap <unique> gx <Plug>NetrwBrowseXVis
- 1 0.000001 endif
- 1 0.000009 vno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr>
- 1 0.000001 endif
- 1 0.000001 endif
- 1 0.000003 if exists("g:netrw_usetab") && g:netrw_usetab
- if maparg('<c-tab>','n') == ""
- nmap <unique> <c-tab> <Plug>NetrwShrink
- endif
- nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr>
- endif
- " ---------------------------------------------------------------------
- " LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2
- 1 0.000005 fun! s:LocalBrowse(dirname)
- " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here.
- " Otherwise, the BufEnter event gets triggered when attempts to write to
- " the DBG buffer are made.
- if !exists("s:vimentered")
- " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will,
- " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined.
- " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)")
- " call Dret("s:LocalBrowse")
- return
- endif
- " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")")
- if has("amiga")
- " The check against '' is made for the Amiga, where the empty
- " string is the current directory and not checking would break
- " things such as the help command.
- " call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
- if a:dirname != '' && isdirectory(a:dirname)
- sil! call netrw#LocalBrowseCheck(a:dirname)
- if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
- exe w:netrw_bannercnt
- endif
- endif
- elseif isdirectory(a:dirname)
- " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
- " call Dredir("LocalBrowse ft last set: ","verbose set ft")
- " call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- sil! call netrw#LocalBrowseCheck(a:dirname)
- " call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
- exe w:netrw_bannercnt
- " call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- endif
- else
- " not a directory, ignore it
- " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
- endif
- " call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- " call Dret("s:LocalBrowse")
- endfun
- " ---------------------------------------------------------------------
- " s:VimEnter: after all vim startup stuff is done, this function is called. {{{2
- " Its purpose: to look over all windows and run s:LocalBrowse() on
- " them, which checks if they're directories and will create a directory
- " listing when appropriate.
- " It also sets s:vimentered, letting s:LocalBrowse() know that s:VimEnter()
- " has already been called.
- 1 0.000003 fun! s:VimEnter(dirname)
- " call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">")
- let curwin = winnr()
- let s:vimentered = 1
- windo call s:LocalBrowse(expand("%:p"))
- exe curwin."wincmd w"
- " call Dret("s:VimEnter")
- endfun
- " ---------------------------------------------------------------------
- " NetrwStatusLine: {{{1
- 1 0.000002 fun! NetrwStatusLine()
- " let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".")
- if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
- let &stl= s:netrw_explore_stl
- if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
- if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
- return ""
- else
- return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
- endif
- endfun
- " ------------------------------------------------------------------------
- " NetUserPass: set username and password for subsequent ftp transfer {{{1
- " Usage: :call NetUserPass() -- will prompt for userid and password
- " :call NetUserPass("uid") -- will prompt for password
- " :call NetUserPass("uid","password") -- sets global userid and password
- 1 0.000002 fun! NetUserPass(...)
- " get/set userid
- if a:0 == 0
- " call Dfunc("NetUserPass(a:0<".a:0.">)")
- if !exists("g:netrw_uid") || g:netrw_uid == ""
- " via prompt
- let g:netrw_uid= input('Enter username: ')
- endif
- else " from command line
- " call Dfunc("NetUserPass(a:1<".a:1.">) {")
- let g:netrw_uid= a:1
- endif
- " get password
- if a:0 <= 1 " via prompt
- " call Decho("a:0=".a:0." case <=1:")
- let g:netrw_passwd= inputsecret("Enter Password: ")
- else " from command line
- " call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
- let g:netrw_passwd=a:2
- endif
- " call Dret("NetUserPass")
- endfun
- " ------------------------------------------------------------------------
- " Modelines And Restoration: {{{1
- 1 0.000012 let &cpo= s:keepcpo
- 1 0.000003 unlet s:keepcpo
- " vim:ts=8 fdm=marker
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/rplugin.vim
- Sourced 1 time
- Total time: 0.000078
- Self time: 0.000078
- count total (s) self (s)
- if exists('g:loaded_remote_plugins')
- finish
- endif
- 1 0.000004 let g:loaded_remote_plugins = 1
- 1 0.000010 command! UpdateRemotePlugins call remote#host#UpdateRemotePlugins()
- 1 0.000002 augroup nvim-rplugin
- 1 0.000020 autocmd!
- 1 0.000011 autocmd FuncUndefined *
- \ call remote#host#LoadRemotePluginsEvent(
- \ 'FuncUndefined', expand('<amatch>'))
- 1 0.000007 autocmd CmdUndefined *
- \ call remote#host#LoadRemotePluginsEvent(
- \ 'CmdUndefined', expand('<amatch>'))
- 1 0.000004 augroup END
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/rrhelper.vim
- Sourced 1 time
- Total time: 0.000039
- Self time: 0.000039
- count total (s) self (s)
- " Vim plugin with helper function(s) for --remote-wait
- " Maintainer: Flemming Madsen <fma@cci.dk>
- " Last Change: 2008 May 29
- " Has this already been loaded?
- 1 0.000028 if exists("loaded_rrhelper") || !has("clientserver")
- 1 0.000002 finish
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/shada.vim
- Sourced 1 time
- Total time: 0.000119
- Self time: 0.000119
- count total (s) self (s)
- if exists('g:loaded_shada_plugin')
- finish
- endif
- 1 0.000004 let g:loaded_shada_plugin = 1
- 1 0.000002 augroup ShaDaCommands
- 1 0.000019 autocmd!
- 1 0.000017 autocmd BufReadCmd *.shada,*.shada.tmp.[a-z]
- \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
- \ |call setline('.', shada#get_strings(readfile(expand('<afile>'),'b')))
- \ |setlocal filetype=shada
- 1 0.000012 autocmd FileReadCmd *.shada,*.shada.tmp.[a-z]
- \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
- \ |call append("'[", shada#get_strings(readfile(expand('<afile>'), 'b')))
- 1 0.000015 autocmd BufWriteCmd *.shada,*.shada.tmp.[a-z]
- \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
- \ |if writefile(shada#get_binstrings(getline(1, '$')),
- \expand('<afile>'), 'b') == 0
- \ | let &l:modified = (expand('<afile>') is# bufname(+expand('<abuf>'))
- \? 0
- \: stridx(&cpoptions, '+') != -1)
- \ |endif
- 1 0.000012 autocmd FileWriteCmd *.shada,*.shada.tmp.[a-z]
- \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
- \ |call writefile(
- \shada#get_binstrings(getline(min([line("'["), line("']")]),
- \max([line("'["), line("']")]))),
- \expand('<afile>'),
- \'b')
- 1 0.000013 autocmd FileAppendCmd *.shada,*.shada.tmp.[a-z]
- \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
- \ |call writefile(
- \shada#get_binstrings(getline(min([line("'["), line("']")]),
- \max([line("'["), line("']")]))),
- \expand('<afile>'),
- \'ab')
- 1 0.000010 autocmd SourceCmd *.shada,*.shada.tmp.[a-z]
- \ :execute 'rshada' fnameescape(expand('<afile>'))
- 1 0.000003 augroup END
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/spellfile.vim
- Sourced 1 time
- Total time: 0.000033
- Self time: 0.000033
- count total (s) self (s)
- " Vim plugin for downloading spell files
- 1 0.000014 if exists("loaded_spellfile_plugin") || &cp || exists("#SpellFileMissing")
- finish
- endif
- 1 0.000004 let loaded_spellfile_plugin = 1
- 1 0.000006 autocmd SpellFileMissing * call spellfile#LoadFile(expand('<amatch>'))
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/tarPlugin.vim
- Sourced 1 time
- Total time: 0.000246
- Self time: 0.000246
- count total (s) self (s)
- " tarPlugin.vim -- a Vim plugin for browsing tarfiles
- " Original was copyright (c) 2002, Michael C. Toren <mct@toren.net>
- " Modified by Charles E. Campbell
- " Distributed under the GNU General Public License.
- "
- " Updates are available from <http://michael.toren.net/code/>. If you
- " find this script useful, or have suggestions for improvements, please
- " let me know.
- " Also look there for further comments and documentation.
- "
- " This part only sets the autocommands. The functions are in autoload/tar.vim.
- " ---------------------------------------------------------------------
- " Load Once: {{{1
- 1 0.000011 if &cp || exists("g:loaded_tarPlugin")
- finish
- endif
- 1 0.000003 let g:loaded_tarPlugin = "v29"
- 1 0.000008 let s:keepcpo = &cpo
- 1 0.000010 set cpo&vim
- " ---------------------------------------------------------------------
- " Public Interface: {{{1
- 1 0.000003 augroup tar
- 1 0.000021 au!
- 1 0.000009 au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"), 1)
- 1 0.000006 au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"), 0)
- 1 0.000007 au BufWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
- 1 0.000005 au FileWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
- 1 0.000005 if has("unix")
- 1 0.000007 au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 1)
- 1 0.000011 au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 0)
- 1 0.000006 au BufWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
- 1 0.000006 au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
- 1 0.000002 endif
- 1 0.000006 au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
- 1 0.000005 au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
- 1 0.000005 au BufReadCmd *.lrp call tar#Browse(expand("<amatch>"))
- 1 0.000006 au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))
- 1 0.000007 au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>"))
- 1 0.000005 au BufReadCmd *.tgz call tar#Browse(expand("<amatch>"))
- 1 0.000020 au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))
- 1 0.000006 au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
- 1 0.000005 au BufReadCmd *.txz call tar#Browse(expand("<amatch>"))
- 1 0.000002 augroup END
- 1 0.000010 com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
- " ---------------------------------------------------------------------
- " Restoration And Modelines: {{{1
- " vim: fdm=marker
- 1 0.000014 let &cpo= s:keepcpo
- 1 0.000006 unlet s:keepcpo
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/tohtml.vim
- Sourced 1 time
- Total time: 0.000154
- Self time: 0.000154
- count total (s) self (s)
- " Vim plugin for converting a syntax highlighted file to HTML.
- " Maintainer: Ben Fritz <fritzophrenic@gmail.com>
- " Last Change: 2015 Sep 08
- "
- " The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
- " $VIMRUNTIME/syntax/2html.vim
- "
- " TODO: {{{
- " * Options for generating the CSS in external style sheets. New :TOcss
- " command to convert the current color scheme into a (mostly) generic CSS
- " stylesheet which can be re-used. Alternate stylesheet support? Good start
- " by Erik Falor
- " ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
- " * Add optional argument to :TOhtml command to specify mode (gui, cterm,
- " term) to use for the styling. Suggestion by "nacitar".
- " * Add way to override or specify which RGB colors map to the color numbers
- " in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
- " * Disable filetype detection until after all processing is done.
- " * Add option for not generating the hyperlink on stuff that looks like a
- " URL? Or just color the link to fit with the colorscheme (and only special
- " when hovering)?
- " * Bug: Opera does not allow printing more than one page if uncopyable
- " regions is turned on. Possible solution: Add normal text line numbers with
- " display:none, set to display:inline for print style sheets, and hide
- " <input> elements for print, to allow Opera printing multiple pages (and
- " other uncopyable areas?). May need to make the new text invisible to IE
- " with conditional comments to prevent copying it, IE for some reason likes
- " to copy hidden text. Other browsers too?
- " * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
- " "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
- " on Windows). Perhaps it is font related?
- " * Bug: still some gaps in the fold column when html_prevent_copy contains
- " 'd' and showing the whole diff (observed in multiple browsers). Only gaps
- " on diff lines though.
- " * Undercurl support via CSS3, with fallback to dotted or something:
- " https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
- " * Redo updates for modified default foldtext (v11) when/if the patch is
- " accepted to modify it.
- " * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
- " +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
- " +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
- " does not show the whole diff filler as it is supposed to?
- " * Bug: when 'isprint' is wrong for the current encoding, will generate
- " invalid content. Can/should anything be done about this? Maybe a separate
- " plugin to correct 'isprint' based on encoding?
- " * Check to see if the windows-125\d encodings actually work in Unix without
- " the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not.
- " * Font auto-detection similar to
- " http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of
- " platforms.
- " * Error thrown when sourcing 2html.vim directly when plugins are not loaded.
- " * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 :
- " - listchars support
- " - full-line background highlight
- " - other?
- " * Make it so deleted lines in a diff don't create side-scrolling (get it
- " free with full-line background highlight above).
- " * Restore open/closed folds and cursor position after processing each file
- " with option not to restore for speed increase.
- " * Add extra meta info (generation time, etc.)?
- " * Tidy up so we can use strict doctype in even more situations
- " * Implementation detail: add threshold for writing the lines to the html
- " buffer before we're done (5000 or so lines should do it)
- " * TODO comments for code cleanup scattered throughout
- "}}}
- 1 0.000007 if exists('g:loaded_2html_plugin')
- finish
- endif
- 1 0.000003 let g:loaded_2html_plugin = 'vim7.4_v2'
- "
- " Changelog: {{{
- " 7.4_v2 (this version): Fix error raised when converting a diff containing
- " an empty buffer. Jan Stocker: allow g:html_font to
- " take a list so it is easier to specfiy fallback
- " fonts in the generated CSS.
- " 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and
- " also for version-specific modelines like "vim>703:".
- "
- " 7.3 updates: {{{
- " 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using
- " g:html_line_ids=0. Allow customizing
- " important IDs (like line IDs and fold IDs) using
- " g:html_id_expr evalutated when the buffer conversion
- " is started.
- " 7.3_v13 (Vim 7.3.1088): Keep foldmethod at manual in the generated file and
- " insert modeline to set it to manual.
- " Fix bug: diff mode with 2 unsaved buffers creates a
- " duplicate of one buffer instead of including both.
- " Add anchors to each line so you can put '#L123'
- " or '#123' at the end of the URL to jump to line 123
- " (idea by Andy Spencer). Add javascript to open folds
- " to show the anchor being jumped to if it is hidden.
- " Fix XML validation error: &nsbp; not part of XML.
- " Allow TOhtml to chain together with other commands
- " using |.
- " 7.3_v12 (Vim 7.3.0616): Fix modeline mangling to also work for when multiple
- " highlight groups make up the start-of-modeline text.
- " Improve render time of page with uncopyable regions
- " by not using one-input-per-char. Change name of
- " uncopyable option from html_unselectable to
- " html_prevent_copy. Added html_no_invalid option and
- " default to inserting invalid markup for uncopyable
- " regions to prevent MS Word from pasting undeletable
- " <input> elements. Fix 'cpo' handling (Thilo Six).
- " 7.3_v12b1: Add html_unselectable option. Rework logic to
- " eliminate post-processing substitute commands in
- " favor of doing the work up front. Remove unnecessary
- " special treatment of 'LineNr' highlight group. Minor
- " speed improvements. Fix modeline mangling in
- " generated output so it works for text in the first
- " column. Fix missing line number and fold column in
- " diff filler lines. Fix that some fonts have a 1px
- " gap (using a dirty hack, improvements welcome). Add
- " "colorscheme" meta tag. Does NOT include support for
- " the new default foldtext added in v11, as the patch
- " adding it has not yet been included in Vim.
- " 7.3_v11 ( unreleased ): Support new default foldtext from patch by Christian
- " Brabandt in
- " http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
- " This patch has not yet been included in Vim, thus
- " these changes are removed in the next version.
- " 7.3_v10 (Vim 7.3.0227): Fix error E684 when converting a range wholly inside
- " multiple nested folds with dynamic folding on.
- " Also fix problem with foldtext in this situation.
- " 7.3_v9 (Vim 7.3.0170): Add html_pre_wrap option active with html_use_css
- " and without html_no_pre, default value same as
- " 'wrap' option, (Andy Spencer). Don't use
- " 'fileencoding' for converted document encoding if
- " 'buftype' indicates a special buffer which isn't
- " written.
- " 7.3_v8 (Vim 7.3.0100): Add html_expand_tabs option to allow leaving tab
- " characters in generated output (Andy Spencer).
- " Escape text that looks like a modeline so Vim
- " doesn't use anything in the converted HTML as a
- " modeline. Bugfixes: Fix folding when a fold starts
- " before the conversion range. Remove fold column when
- " there are no folds.
- " 7.3_v7 (Vim 7-3-0063): see betas released on vim_dev below:
- " 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
- " 7.3_v7b2: Remove automatic detection of encodings that are not
- " supported by all major browsers according to
- " http://wiki.whatwg.org/wiki/Web_Encodings and
- " convert to UTF-8 for all Unicode encodings. Make
- " HTML encoding to Vim encoding detection be
- " case-insensitive for built-in pairs.
- " 7.3_v7b1: Remove use of setwinvar() function which cannot be
- " called in restricted mode (Andy Spencer). Use
- " 'fencoding' instead of 'encoding' to determine by
- " charset, and make sure the 'fenc' of the generated
- " file matches its indicated charset. Add charsets for
- " all of Vim's natively supported encodings.
- " 7.3_v6 (Vim 7.3.0000): Really fix bug with 'nowrapscan', 'magic' and other
- " user settings interfering with diff mode generation,
- " trailing whitespace (e.g. line number column) when
- " using html_no_pre, and bugs when using
- " html_hover_unfold.
- " 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
- " folds in diff mode when first line was folded.
- " 7.3_v4 (Vim 7.3.0000): Bugfixes, especially for xhtml markup, and diff mode
- " 7.3_v3 (Vim 7.3.0000): Refactor option handling and make html_use_css
- " default to true when not set to anything. Use strict
- " doctypes where possible. Rename use_xhtml option to
- " html_use_xhtml for consistency. Use .xhtml extension
- " when using this option. Add meta tag for settings.
- " 7.3_v2 (Vim 7.3.0000): Fix syntax highlighting in diff mode to use both the
- " diff colors and the normal syntax colors
- " 7.3_v1 (Vim 7.3.0000): Add conceal support and meta tags in output
- "}}}
- "}}}
- " Define the :TOhtml command when:
- " - 'compatible' is not set
- " - this plugin was not already loaded
- " - user commands are available. {{{
- 1 0.000014 if !&cp && !exists(":TOhtml") && has("user_commands")
- 1 0.000013 command -range=% -bar TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
- 1 0.000002 endif "}}}
- " Make sure any patches will probably use consistent indent
- " vim: ts=8 sw=2 sts=2 noet fdm=marker
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/tutor.vim
- Sourced 1 time
- Total time: 0.000026
- Self time: 0.000026
- count total (s) self (s)
- if exists('g:loaded_tutor_mode_plugin') || &compatible
- finish
- endif
- 1 0.000004 let g:loaded_tutor_mode_plugin = 1
- 1 0.000007 command! -nargs=? -complete=custom,tutor#TutorCmdComplete Tutor call tutor#TutorCmd(<q-args>)
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/plugin/zipPlugin.vim
- Sourced 1 time
- Total time: 0.000232
- Self time: 0.000232
- count total (s) self (s)
- " zipPlugin.vim: Handles browsing zipfiles
- " PLUGIN PORTION
- " Date: Jun 07, 2013
- " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
- " License: Vim License (see vim's :help license)
- " Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1
- " Permission is hereby granted to use and distribute this code,
- " with or without modifications, provided that this copyright
- " notice is copied with it. Like anything else that's free,
- " zipPlugin.vim is provided *as is* and comes with no warranty
- " of any kind, either expressed or implied. By using this
- " plugin, you agree that in no event will the copyright
- " holder be liable for any damages resulting from the use
- " of this software.
- "
- " (James 4:8 WEB) Draw near to God, and he will draw near to you.
- " Cleanse your hands, you sinners; and purify your hearts, you double-minded.
- " ---------------------------------------------------------------------
- " Load Once: {{{1
- 1 0.000012 if &cp || exists("g:loaded_zipPlugin")
- finish
- endif
- 1 0.000003 let g:loaded_zipPlugin = "v27"
- 1 0.000007 let s:keepcpo = &cpo
- 1 0.000007 set cpo&vim
- " ---------------------------------------------------------------------
- " Options: {{{1
- 1 0.000003 if !exists("g:zipPlugin_ext")
- 1 0.000005 let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,*.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,*.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,*.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx'
- 1 0.000001 endif
- " ---------------------------------------------------------------------
- " Public Interface: {{{1
- 1 0.000002 augroup zip
- 1 0.000019 au!
- 1 0.000007 au BufReadCmd zipfile:* call zip#Read(expand("<amatch>"), 1)
- 1 0.000006 au FileReadCmd zipfile:* call zip#Read(expand("<amatch>"), 0)
- 1 0.000003 au BufWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
- 1 0.000003 au FileWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
- 1 0.000003 if has("unix")
- 1 0.000006 au BufReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 1)
- 1 0.000004 au FileReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 0)
- 1 0.000006 au BufWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
- 1 0.000004 au FileWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
- 1 0.000001 endif
- 1 0.000068 exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand("<amatch>"))'
- 1 0.000001 augroup END
- " ---------------------------------------------------------------------
- " Restoration And Modelines: {{{1
- " vim: fdm=marker
- 1 0.000008 let &cpo= s:keepcpo
- 1 0.000003 unlet s:keepcpo
- SCRIPT /data/roxma/test/starttime/plugin/bar.vim
- Sourced 1 time
- Total time: 0.000019
- Self time: 0.000019
- count total (s) self (s)
- 1 0.000006 func s:foo()
- call foo#bar()
- endfunc
- 1 0.000005 au BufWinEnter * call s:foo()
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/autoload/remote/host.vim
- Sourced 1 time
- Total time: 0.000481
- Self time: 0.000405
- count total (s) self (s)
- let s:hosts = {}
- 1 0.000004 let s:plugin_patterns = {}
- 1 0.000002 let s:plugins_for_host = {}
- " Register a host by associating it with a factory(funcref)
- 1 0.000006 function! remote#host#Register(name, pattern, factory) abort
- let s:hosts[a:name] = {'factory': a:factory, 'channel': 0, 'initialized': 0}
- let s:plugin_patterns[a:name] = a:pattern
- if type(a:factory) == type(1) && a:factory
- " Passed a channel directly
- let s:hosts[a:name].channel = a:factory
- endif
- endfunction
- " Register a clone to an existing host. The new host will use the same factory
- " as `source`, but it will run as a different process. This can be used by
- " plugins that should run isolated from other plugins created for the same host
- " type
- 1 0.000004 function! remote#host#RegisterClone(name, orig_name) abort
- if !has_key(s:hosts, a:orig_name)
- throw 'No host named "'.a:orig_name.'" is registered'
- endif
- let Factory = s:hosts[a:orig_name].factory
- let s:hosts[a:name] = {
- \ 'factory': Factory,
- \ 'channel': 0,
- \ 'initialized': 0,
- \ 'orig_name': a:orig_name
- \ }
- endfunction
- " Get a host channel, bootstrapping it if necessary
- 1 0.000003 function! remote#host#Require(name) abort
- if empty(s:plugins_for_host)
- call remote#host#LoadRemotePlugins()
- endif
- if !has_key(s:hosts, a:name)
- throw 'No host named "'.a:name.'" is registered'
- endif
- let host = s:hosts[a:name]
- if !host.channel && !host.initialized
- let host_info = {
- \ 'name': a:name,
- \ 'orig_name': get(host, 'orig_name', a:name)
- \ }
- let host.channel = call(host.factory, [host_info])
- let host.initialized = 1
- endif
- return host.channel
- endfunction
- 1 0.000003 function! remote#host#IsRunning(name) abort
- if !has_key(s:hosts, a:name)
- throw 'No host named "'.a:name.'" is registered'
- endif
- return s:hosts[a:name].channel != 0
- endfunction
- " Example of registering a Python plugin with two commands (one async), one
- " autocmd (async) and one function (sync):
- "
- " let s:plugin_path = expand('<sfile>:p:h').'/nvim_plugin.py'
- " call remote#host#RegisterPlugin('python', s:plugin_path, [
- " \ {'type': 'command', 'name': 'PyCmd', 'sync': 1, 'opts': {}},
- " \ {'type': 'command', 'name': 'PyAsyncCmd', 'sync': 0, 'opts': {'eval': 'cursor()'}},
- " \ {'type': 'autocmd', 'name': 'BufEnter', 'sync': 0, 'opts': {'eval': 'expand("<afile>")'}},
- " \ {'type': 'function', 'name': 'PyFunc', 'sync': 1, 'opts': {}}
- " \ ])
- "
- " The third item in a declaration is a boolean: non zero means the command,
- " autocommand or function will be executed synchronously with rpcrequest.
- 1 0.000004 function! remote#host#RegisterPlugin(host, path, specs) abort
- let plugins = remote#host#PluginsForHost(a:host)
- for plugin in plugins
- if plugin.path == a:path
- throw 'Plugin "'.a:path.'" is already registered'
- endif
- endfor
- if has_key(s:hosts, a:host) && remote#host#IsRunning(a:host)
- " For now we won't allow registration of plugins when the host is already
- " running.
- throw 'Host "'.a:host.'" is already running'
- endif
- for spec in a:specs
- let type = spec.type
- let name = spec.name
- let sync = spec.sync
- let opts = spec.opts
- let rpc_method = a:path
- if type == 'command'
- let rpc_method .= ':command:'.name
- call remote#define#CommandOnHost(a:host, rpc_method, sync, name, opts)
- elseif type == 'autocmd'
- " Since multiple handlers can be attached to the same autocmd event by a
- " single plugin, we need a way to uniquely identify the rpc method to
- " call. The solution is to append the autocmd pattern to the method
- " name(This still has a limit: one handler per event/pattern combo, but
- " there's no need to allow plugins define multiple handlers in that case)
- let rpc_method .= ':autocmd:'.name.':'.get(opts, 'pattern', '*')
- call remote#define#AutocmdOnHost(a:host, rpc_method, sync, name, opts)
- elseif type == 'function'
- let rpc_method .= ':function:'.name
- call remote#define#FunctionOnHost(a:host, rpc_method, sync, name, opts)
- else
- echoerr 'Invalid declaration type: '.type
- endif
- endfor
- call add(plugins, {'path': a:path, 'specs': a:specs})
- endfunction
- " Get the path to the rplugin manifest file.
- 1 0.000006 function! s:GetManifestPath() abort
- let manifest_base = ''
- if exists('$NVIM_RPLUGIN_MANIFEST')
- return fnamemodify($NVIM_RPLUGIN_MANIFEST, ':p')
- endif
- let dest = has('win32') ? '$LOCALAPPDATA' : '$XDG_DATA_HOME'
- if !exists(dest)
- let dest = has('win32') ? '~/AppData/Local' : '~/.local/share'
- endif
- let dest = fnamemodify(expand(dest), ':p')
- if !empty(dest) && !filereadable(dest)
- let dest .= ('/' ==# dest[-1:] ? '' : '/') . 'nvim'
- call mkdir(dest, 'p', 0700)
- let manifest_base = dest
- endif
- return manifest_base.'/rplugin.vim'
- endfunction
- " Old manifest file based on known script locations.
- 1 0.000004 function! s:GetOldManifestPath() abort
- let prefix = exists('$MYVIMRC')
- \ ? $MYVIMRC
- \ : matchstr(get(split(execute('scriptnames'), '\n'), 0, ''), '\f\+$')
- return fnamemodify(expand(prefix, 1), ':h')
- \.'/.'.fnamemodify(prefix, ':t').'-rplugin~'
- endfunction
- 1 0.000002 function! s:GetManifest() abort
- let manifest = s:GetManifestPath()
- if !filereadable(manifest)
- " Check if an old manifest file exists and move it to the new location.
- let old_manifest = s:GetOldManifestPath()
- if filereadable(old_manifest)
- call rename(old_manifest, manifest)
- endif
- endif
- return manifest
- endfunction
- 1 0.000002 function! remote#host#LoadRemotePlugins() abort
- let manifest = s:GetManifest()
- if filereadable(manifest)
- execute 'source' fnameescape(manifest)
- endif
- endfunction
- 1 0.000003 function! remote#host#LoadRemotePluginsEvent(event, pattern) abort
- autocmd! nvim-rplugin
- call remote#host#LoadRemotePlugins()
- if exists('#'.a:event.'#'.a:pattern) " Avoid 'No matching autocommands'.
- execute 'silent doautocmd <nomodeline>' a:event a:pattern
- endif
- endfunction
- 1 0.000002 function! s:RegistrationCommands(host) abort
- " Register a temporary host clone for discovering specs
- let host_id = a:host.'-registration-clone'
- call remote#host#RegisterClone(host_id, a:host)
- let pattern = s:plugin_patterns[a:host]
- let paths = globpath(&rtp, 'rplugin/'.a:host.'/'.pattern, 0, 1)
- let paths = map(paths, 'tr(resolve(v:val),"\\","/")') " Normalize slashes #4795
- let paths = uniq(sort(paths))
- if empty(paths)
- return []
- endif
- for path in paths
- call remote#host#RegisterPlugin(host_id, path, [])
- endfor
- let channel = remote#host#Require(host_id)
- let lines = []
- let registered = []
- for path in paths
- unlet! specs
- let specs = rpcrequest(channel, 'specs', path)
- if type(specs) != type([])
- " host didn't return a spec list, indicates a failure while loading a
- " plugin
- continue
- endif
- call add(lines, "call remote#host#RegisterPlugin('".a:host
- \ ."', '".path."', [")
- for spec in specs
- call add(lines, " \\ ".string(spec).",")
- endfor
- call add(lines, " \\ ])")
- call add(registered, path)
- endfor
- echomsg printf("remote/host: %s host registered plugins %s",
- \ a:host, string(map(registered, "fnamemodify(v:val, ':t')")))
- " Delete the temporary host clone
- call rpcstop(s:hosts[host_id].channel)
- call remove(s:hosts, host_id)
- call remove(s:plugins_for_host, host_id)
- return lines
- endfunction
- 1 0.000004 function! remote#host#UpdateRemotePlugins() abort
- let commands = []
- let hosts = keys(s:hosts)
- for host in hosts
- if has_key(s:plugin_patterns, host)
- try
- let commands +=
- \ ['" '.host.' plugins']
- \ + s:RegistrationCommands(host)
- \ + ['', '']
- catch
- echomsg v:throwpoint
- echomsg v:exception
- endtry
- endif
- endfor
- call writefile(commands, s:GetManifest())
- echomsg printf('remote/host: generated rplugin manifest: %s',
- \ s:GetManifest())
- endfunction
- 1 0.000002 function! remote#host#PluginsForHost(host) abort
- if !has_key(s:plugins_for_host, a:host)
- let s:plugins_for_host[a:host] = []
- end
- return s:plugins_for_host[a:host]
- endfunction
- 1 0.000004 function! remote#host#LoadErrorForHost(host, log) abort
- return 'Failed to load '. a:host . ' host. '.
- \ 'You can try to see what happened by starting nvim with '.
- \ a:log . ' set and opening the generated log file.'.
- \ ' Also, the host stderr is available in messages.'
- endfunction
- " Registration of standard hosts
- " Python/Python3
- 1 0.000065 0.000028 call remote#host#Register('python', '*',
- \ function('provider#pythonx#Require'))
- 1 0.000032 0.000011 call remote#host#Register('python3', '*',
- \ function('provider#pythonx#Require'))
- " Ruby
- 1 0.000028 0.000009 call remote#host#Register('ruby', '*.rb',
- SCRIPT /data/roxma/.local/share/nvim/rplugin.vim
- Sourced 1 time
- Total time: 0.004597
- Self time: 0.000154
- count total (s) self (s)
- " python3 plugins
- 1 0.004376 0.000125 call remote#host#RegisterPlugin('python3', '/data/roxma/.local_software/neovim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient', [
- \ {'sync': v:true, 'name': 'LanguageClient_alive', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_completionItem/resolve', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_completionManager_refresh', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_exit', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_FZFSinkTextDocumentDocumentSymbol', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_FZFSinkTextDocumentReferences', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_FZFSinkWorkspaceSymbol', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'CursorMoved', 'type': 'autocmd', 'opts': {'pattern': '*'}},
- \ {'sync': v:false, 'name': 'LanguageClient_initialize', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_registerServerCommands', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_setLoggingLevel', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClientStart', 'type': 'command', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClientStop', 'type': 'command', 'opts': {}},
- \ {'sync': v:false, 'name': 'TextChanged', 'type': 'autocmd', 'opts': {'pattern': '*'}},
- \ {'sync': v:false, 'name': 'TextChangedI', 'type': 'autocmd', 'opts': {'pattern': '*'}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_completion', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_definition', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_didClose', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'BufReadPost', 'type': 'autocmd', 'opts': {'pattern': '*'}},
- \ {'sync': v:false, 'name': 'BufWritePost', 'type': 'autocmd', 'opts': {'pattern': '*'}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_documentSymbol', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_hover', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_references', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_rename', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_textDocument_signatureHelp', 'type': 'function', 'opts': {}},
- \ {'sync': v:false, 'name': 'LanguageClient_workspace_symbol', 'type': 'function', 'opts': {}},
- \ ])
- 1 0.000206 0.000014 call remote#host#RegisterPlugin('python3', '/data/roxma/.local_software/neovim/plugged/deoplete.nvim/rplugin/python3/deoplete', [
- \ {'sync': v:true, 'name': '_deoplete', 'type': 'function', 'opts': {}},
- \ ])
- " ruby plugins
- " python plugins
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/autoload/remote/define.vim
- Sourced 1 time
- Total time: 0.000277
- Self time: 0.000277
- count total (s) self (s)
- function! remote#define#CommandOnHost(host, method, sync, name, opts)
- let prefix = ''
- if has_key(a:opts, 'range')
- if a:opts.range == '' || a:opts.range == '%'
- " -range or -range=%, pass the line range in a list
- let prefix = '<line1>,<line2>'
- elseif matchstr(a:opts.range, '\d') != ''
- " -range=N, pass the count
- let prefix = '<count>'
- endif
- elseif has_key(a:opts, 'count')
- let prefix = '<count>'
- endif
- let forward_args = [prefix.a:name]
- if has_key(a:opts, 'bang')
- call add(forward_args, '<bang>')
- endif
- if has_key(a:opts, 'register')
- call add(forward_args, ' <register>')
- endif
- if has_key(a:opts, 'nargs')
- call add(forward_args, ' <args>')
- endif
- exe s:GetCommandPrefix(a:name, a:opts)
- \ .' call remote#define#CommandBootstrap("'.a:host.'"'
- \ . ', "'.a:method.'"'
- \ . ', '.string(a:sync)
- \ . ', "'.a:name.'"'
- \ . ', '.string(a:opts).''
- \ . ', "'.join(forward_args, '').'"'
- \ . ')'
- endfunction
- 1 0.000004 function! remote#define#CommandBootstrap(host, method, sync, name, opts, forward)
- let channel = remote#host#Require(a:host)
- if channel
- call remote#define#CommandOnChannel(channel, a:method, a:sync, a:name, a:opts)
- exe a:forward
- else
- exe 'delcommand '.a:name
- echoerr 'Host "'a:host.'" is not available, deleting command "'.a:name.'"'
- endif
- endfunction
- 1 0.000003 function! remote#define#CommandOnChannel(channel, method, sync, name, opts)
- let rpcargs = [a:channel, '"'.a:method.'"']
- if has_key(a:opts, 'nargs')
- " -nargs, pass arguments in a list
- call add(rpcargs, '[<f-args>]')
- endif
- if has_key(a:opts, 'range')
- if a:opts.range == '' || a:opts.range == '%'
- " -range or -range=%, pass the line range in a list
- call add(rpcargs, '[<line1>, <line2>]')
- elseif matchstr(a:opts.range, '\d') != ''
- " -range=N, pass the count
- call add(rpcargs, '<count>')
- endif
- elseif has_key(a:opts, 'count')
- " count
- call add(rpcargs, '<count>')
- endif
- if has_key(a:opts, 'bang')
- " bang
- call add(rpcargs, '<q-bang> == "!"')
- endif
- if has_key(a:opts, 'register')
- " register
- call add(rpcargs, '<q-reg>')
- endif
- call s:AddEval(rpcargs, a:opts)
- exe s:GetCommandPrefix(a:name, a:opts)
- \ . ' call '.s:GetRpcFunction(a:sync).'('.join(rpcargs, ', ').')'
- endfunction
- 1 0.000005 function! remote#define#AutocmdOnHost(host, method, sync, name, opts)
- let group = s:GetNextAutocmdGroup()
- let forward = '"doau '.group.' '.a:name.' ".'.'expand("<amatch>")'
- let a:opts.group = group
- let bootstrap_def = s:GetAutocmdPrefix(a:name, a:opts)
- \ .' call remote#define#AutocmdBootstrap("'.a:host.'"'
- \ . ', "'.a:method.'"'
- \ . ', '.string(a:sync)
- \ . ', "'.a:name.'"'
- \ . ', '.string(a:opts).''
- \ . ', "'.escape(forward, '"').'"'
- \ . ')'
- exe bootstrap_def
- endfunction
- 1 0.000004 function! remote#define#AutocmdBootstrap(host, method, sync, name, opts, forward)
- let channel = remote#host#Require(a:host)
- exe 'autocmd! '.a:opts.group
- if channel
- call remote#define#AutocmdOnChannel(channel, a:method, a:sync, a:name,
- \ a:opts)
- exe eval(a:forward)
- else
- exe 'augroup! '.a:opts.group
- echoerr 'Host "'a:host.'" for "'.a:name.'" autocmd is not available'
- endif
- endfunction
- 1 0.000002 function! remote#define#AutocmdOnChannel(channel, method, sync, name, opts)
- let rpcargs = [a:channel, '"'.a:method.'"']
- call s:AddEval(rpcargs, a:opts)
- let autocmd_def = s:GetAutocmdPrefix(a:name, a:opts)
- \ . ' call '.s:GetRpcFunction(a:sync).'('.join(rpcargs, ', ').')'
- exe autocmd_def
- endfunction
- 1 0.000002 function! remote#define#FunctionOnHost(host, method, sync, name, opts)
- let group = s:GetNextAutocmdGroup()
- exe 'autocmd! '.group.' FuncUndefined '.a:name
- \ .' call remote#define#FunctionBootstrap("'.a:host.'"'
- \ . ', "'.a:method.'"'
- \ . ', '.string(a:sync)
- \ . ', "'.a:name.'"'
- \ . ', '.string(a:opts)
- \ . ', "'.group.'"'
- \ . ')'
- endfunction
- 1 0.000003 function! remote#define#FunctionBootstrap(host, method, sync, name, opts, group)
- let channel = remote#host#Require(a:host)
- exe 'autocmd! '.a:group
- exe 'augroup! '.a:group
- if channel
- call remote#define#FunctionOnChannel(channel, a:method, a:sync, a:name,
- \ a:opts)
- else
- echoerr 'Host "'a:host.'" for "'.a:name.'" function is not available'
- endif
- endfunction
- 1 0.000003 function! remote#define#FunctionOnChannel(channel, method, sync, name, opts)
- let rpcargs = [a:channel, '"'.a:method.'"', 'a:000']
- if has_key(a:opts, 'range')
- call add(rpcargs, '[a:firstline, a:lastline]')
- endif
- call s:AddEval(rpcargs, a:opts)
- let function_def = s:GetFunctionPrefix(a:name, a:opts)
- \ . 'return '.s:GetRpcFunction(a:sync).'('.join(rpcargs, ', ').')'
- \ . "\nendfunction"
- exe function_def
- endfunction
- 1 0.000003 function! s:GetRpcFunction(sync)
- if a:sync
- return 'rpcrequest'
- endif
- return 'rpcnotify'
- endfunction
- 1 0.000004 function! s:GetCommandPrefix(name, opts)
- return 'command!'.s:StringifyOpts(a:opts, ['nargs', 'complete', 'range',
- \ 'count', 'bang', 'bar', 'register']).' '.a:name
- endfunction
- " Each msgpack-rpc autocommand has it's own unique group, which is derived
- " from an autoincrementing gid(group id). This is required for replacing the
- " autocmd implementation with the lazy-load mechanism
- 1 0.000005 let s:next_gid = 1
- 1 0.000004 function! s:GetNextAutocmdGroup()
- let gid = s:next_gid
- let s:next_gid += 1
- let group_name = 'RPC_DEFINE_AUTOCMD_GROUP_'.gid
- " Ensure the group is defined
- exe 'augroup '.group_name.' | augroup END'
- return group_name
- endfunction
- 1 0.000002 function! s:GetAutocmdPrefix(name, opts)
- if has_key(a:opts, 'group')
- let group = a:opts.group
- else
- let group = s:GetNextAutocmdGroup()
- endif
- let rv = ['autocmd!', group, a:name]
- if has_key(a:opts, 'pattern')
- call add(rv, a:opts.pattern)
- else
- call add(rv, '*')
- endif
- if has_key(a:opts, 'nested') && a:opts.nested
- call add(rv, 'nested')
- endif
- return join(rv, ' ')
- endfunction
- 1 0.000002 function! s:GetFunctionPrefix(name, opts)
- let res = "function! ".a:name."(...)"
- if has_key(a:opts, 'range')
- let res = res." range"
- endif
- return res."\n"
- endfunction
- 1 0.000002 function! s:StringifyOpts(opts, keys)
- let rv = []
- for key in a:keys
- if has_key(a:opts, key)
- call add(rv, ' -'.key)
- let val = a:opts[key]
- if type(val) != type('') || val != ''
- call add(rv, '='.val)
- endif
- endif
- endfor
- return join(rv, '')
- endfunction
- 1 0.000002 function! s:AddEval(rpcargs, opts)
- if has_key(a:opts, 'eval')
- if type(a:opts.eval) != type('') || a:opts.eval == ''
- throw "Eval option must be a non-empty string"
- endif
- " evaluate an expression and pass as argument
- call add(a:rpcargs, 'eval("'.escape(a:opts.eval, '"').'")')
- endif
- endfunction
- SCRIPT /data/roxma/test/starttime/autoload/foo.vim
- Sourced 1 time
- Total time: 0.000014
- Self time: 0.000014
- count total (s) self (s)
- 1 0.000005 fun foo#bar()
- echo 'hi'
- endf
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/autoload/provider/pythonx.vim
- Sourced 1 time
- Total time: 0.000127
- Self time: 0.000127
- count total (s) self (s)
- " The Python provider helper
- 1 0.000005 if exists('s:loaded_pythonx_provider')
- finish
- endif
- 1 0.000003 let s:loaded_pythonx_provider = 1
- 1 0.000004 let s:stderr = {}
- 1 0.000003 let s:job_opts = {'rpc': v:true}
- " TODO(bfredl): this logic is common and should be builtin
- 1 0.000003 function! s:job_opts.on_stderr(chan_id, data, event)
- let stderr = get(s:stderr, a:chan_id, [''])
- let last = remove(stderr, -1)
- let a:data[0] = last.a:data[0]
- call extend(stderr, a:data)
- let s:stderr[a:chan_id] = stderr
- endfunction
- 1 0.000003 function! provider#pythonx#Require(host) abort
- let ver = (a:host.orig_name ==# 'python') ? 2 : 3
- " Python host arguments
- let prog = (ver == '2' ? provider#python#Prog() : provider#python3#Prog())
- let args = [prog, '-c', 'import sys; sys.path.remove(""); import neovim; neovim.start_host()']
- " Collect registered Python plugins into args
- let python_plugins = remote#host#PluginsForHost(a:host.name)
- for plugin in python_plugins
- call add(args, plugin.path)
- endfor
- try
- let channel_id = jobstart(args, s:job_opts)
- if rpcrequest(channel_id, 'poll') ==# 'ok'
- return channel_id
- endif
- catch
- echomsg v:throwpoint
- echomsg v:exception
- for row in get(s:stderr, channel_id, [])
- echomsg row
- endfor
- endtry
- throw remote#host#LoadErrorForHost(a:host.orig_name,
- \ '$NVIM_PYTHON_LOG_FILE')
- endfunction
- 1 0.000003 function! provider#pythonx#Detect(major_ver) abort
- if a:major_ver == 2
- if exists('g:python_host_prog')
- return [g:python_host_prog, '']
- else
- let progs = ['python2', 'python2.7', 'python2.6', 'python']
- endif
- else
- if exists('g:python3_host_prog')
- return [g:python3_host_prog, '']
- else
- let progs = ['python3', 'python3.7', 'python3.6', 'python3.5',
- \ 'python3.4', 'python3.3', 'python']
- endif
- endif
- let errors = []
- for prog in progs
- let [result, err] = s:check_interpreter(prog, a:major_ver)
- if result
- return [prog, err]
- endif
- " Accumulate errors in case we don't find
- " any suitable Python interpreter.
- call add(errors, err)
- endfor
- " No suitable Python interpreter found.
- return ['', 'provider/pythonx: Could not load Python ' . a:major_ver
- \ . ":\n" . join(errors, "\n")]
- endfunction
- 1 0.000003 function! s:check_interpreter(prog, major_ver) abort
- let prog_path = exepath(a:prog)
- if prog_path ==# ''
- return [0, a:prog . ' not found in search path or not executable.']
- endif
- let min_version = (a:major_ver == 2) ? '2.6' : '3.3'
- " Try to load neovim module, and output Python version.
- " Return codes:
- " 0 Neovim module can be loaded.
- " 2 Neovim module cannot be loaded.
- " Otherwise something else went wrong (e.g. 1 or 127).
- let prog_ver = system([ a:prog , '-c' ,
- \ 'import sys; ' .
- \ 'sys.path.remove(""); ' .
- \ 'sys.stdout.write(str(sys.version_info[0]) + "." + str(sys.version_info[1])); ' .
- \ 'import pkgutil; ' .
- \ 'exit(2*int(pkgutil.get_loader("neovim") is None))'
- \ ])
- if v:shell_error == 2 || v:shell_error == 0
- " Check version only for expected return codes.
- if prog_ver !~ '^' . a:major_ver
- return [0, prog_path . ' is Python ' . prog_ver . ' and cannot provide Python '
- \ . a:major_ver . '.']
- elseif prog_ver =~ '^' . a:major_ver && prog_ver < min_version
- return [0, prog_path . ' is Python ' . prog_ver . ' and cannot provide Python >= '
- \ . min_version . '.']
- endif
- endif
- if v:shell_error == 2
- return [0, prog_path . ' does not have the neovim module installed. '
- \ . 'See ":help provider-python".']
- elseif v:shell_error == 127
- " This can happen with pyenv's shims.
- return [0, prog_path . ' does not exist: ' . prog_ver]
- elseif v:shell_error
- return [0, 'Checking ' . prog_path . ' caused an unknown error. '
- \ . '(' . v:shell_error . ', output: ' . prog_ver . ')'
- \ . ' Please report this at github.com/neovim/neovim.']
- endif
- return [1, '']
- endfunction
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/autoload/provider/python3.vim
- Sourced 1 time
- Total time: 0.046328
- Self time: 0.000177
- count total (s) self (s)
- " The Python3 provider uses a Python3 host to emulate an environment for running
- " python3 plugins. See ":help provider".
- "
- " Associating the plugin with the Python3 host is the first step because
- " plugins will be passed as command-line arguments
- 1 0.000006 if exists('g:loaded_python3_provider')
- finish
- endif
- 1 0.000004 let g:loaded_python3_provider = 1
- 1 0.045829 0.000019 let [s:prog, s:err] = provider#pythonx#Detect(3)
- 1 0.000009 function! provider#python3#Prog()
- return s:prog
- endfunction
- 1 0.000004 function! provider#python3#Error()
- return s:err
- endfunction
- 1 0.000003 if s:prog == ''
- " Detection failed
- finish
- endif
- " The Python3 provider plugin will run in a separate instance of the Python3
- " host.
- 1 0.000073 0.000029 call remote#host#RegisterClone('legacy-python3-provider', 'python3')
- 1 0.000307 0.000011 call remote#host#RegisterPlugin('legacy-python3-provider', 'script_host.py', [])
- 1 0.000007 function! provider#python3#Call(method, args)
- if s:err != ''
- return
- endif
- if !exists('s:host')
- let s:rpcrequest = function('rpcrequest')
- " Ensure that we can load the Python3 host before bootstrapping
- try
- let s:host = remote#host#Require('legacy-python3-provider')
- catch
- let s:err = v:exception
- echohl WarningMsg
- echomsg v:exception
- echohl None
- return
- endtry
- endif
- return call(s:rpcrequest, insert(insert(a:args, 'python_'.a:method), s:host))
- endfunction
- SCRIPT /data/roxma/.local_software/neovim_master/share/nvim/runtime/scripts.vim
- Sourced 1 time
- Total time: 0.000699
- Self time: 0.000699
- count total (s) self (s)
- " Vim support file to detect file types in scripts
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- " Last change: 2016 May 21
- " This file is called by an autocommand for every file that has just been
- " loaded into a buffer. It checks if the type of file can be recognized by
- " the file contents. The autocommand is in $VIMRUNTIME/filetype.vim.
- " Only do the rest when the FileType autocommand has not been triggered yet.
- 1 0.000005 if did_filetype()
- finish
- endif
- " Load the user defined scripts file first
- " Only do this when the FileType autocommand has not been triggered yet
- 1 0.000006 if exists("myscriptsfile") && filereadable(expand(myscriptsfile))
- execute "source " . myscriptsfile
- if did_filetype()
- finish
- endif
- endif
- " Line continuation is used here, remove 'C' from 'cpoptions'
- 1 0.000018 let s:cpo_save = &cpo
- 1 0.000012 set cpo&vim
- 1 0.000007 let s:line1 = getline(1)
- 1 0.000007 if s:line1 =~ "^#!"
- " A script that starts with "#!".
- " Check for a line like "#!/usr/bin/env VAR=val bash". Turn it into
- " "#!/usr/bin/bash" to make matching easier.
- if s:line1 =~ '^#!\s*\S*\<env\s'
- let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g')
- let s:line1 = substitute(s:line1, '\<env\s\+', '', '')
- endif
- " Get the program name.
- " Only accept spaces in PC style paths: "#!c:/program files/perl [args]".
- " If the word env is used, use the first word after the space:
- " "#!/usr/bin/env perl [path/args]"
- " If there is no path use the first word: "#!perl [path/args]".
- " Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]".
- if s:line1 =~ '^#!\s*\a:[/\\]'
- let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
- elseif s:line1 =~ '^#!.*\<env\>'
- let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
- elseif s:line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
- let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
- else
- let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
- endif
- " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
- " third line. Suggested by Steven Atkinson.
- if getline(3) =~ '^exec wish'
- let s:name = 'wish'
- endif
- " Bourne-like shell scripts: bash bash2 ksh ksh93 sh
- if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
- call SetFileTypeSH(s:line1) " defined in filetype.vim
- " csh scripts
- elseif s:name =~ '^csh\>'
- if exists("g:filetype_csh")
- call SetFileTypeShell(g:filetype_csh)
- else
- call SetFileTypeShell("csh")
- endif
- " tcsh scripts
- elseif s:name =~ '^tcsh\>'
- call SetFileTypeShell("tcsh")
- " Z shell scripts
- elseif s:name =~ '^zsh\>'
- set ft=zsh
- " TCL scripts
- elseif s:name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
- set ft=tcl
- " Expect scripts
- elseif s:name =~ '^expect\>'
- set ft=expect
- " Gnuplot scripts
- elseif s:name =~ '^gnuplot\>'
- set ft=gnuplot
- " Makefiles
- elseif s:name =~ 'make\>'
- set ft=make
- " Lua
- elseif s:name =~ 'lua'
- set ft=lua
- " Perl 6
- elseif s:name =~ 'perl6'
- set ft=perl6
- " Perl
- elseif s:name =~ 'perl'
- set ft=perl
- " PHP
- elseif s:name =~ 'php'
- set ft=php
- " Python
- elseif s:name =~ 'python'
- set ft=python
- " Groovy
- elseif s:name =~ '^groovy\>'
- set ft=groovy
- " Ruby
- elseif s:name =~ 'ruby'
- set ft=ruby
- " BC calculator
- elseif s:name =~ '^bc\>'
- set ft=bc
- " sed
- elseif s:name =~ 'sed\>'
- set ft=sed
- " OCaml-scripts
- elseif s:name =~ 'ocaml'
- set ft=ocaml
- " Awk scripts
- elseif s:name =~ 'awk\>'
- set ft=awk
- " Website MetaLanguage
- elseif s:name =~ 'wml'
- set ft=wml
- " Scheme scripts
- elseif s:name =~ 'scheme'
- set ft=scheme
- " CFEngine scripts
- elseif s:name =~ 'cfengine'
- set ft=cfengine
- " Erlang scripts
- elseif s:name =~ 'escript'
- set ft=erlang
- endif
- unlet s:name
- else
- " File does not start with "#!".
- 1 0.000003 let s:line2 = getline(2)
- 1 0.000002 let s:line3 = getline(3)
- 1 0.000002 let s:line4 = getline(4)
- 1 0.000002 let s:line5 = getline(5)
- " Bourne-like shell scripts: sh ksh bash bash2
- 1 0.000004 if s:line1 =~ '^:$'
- call SetFileTypeSH(s:line1) " defined in filetype.vim
- " Z shell scripts
- elseif s:line1 =~ '^#compdef\>' || s:line1 =~ '^#autoload\>' ||
- \ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
- set ft=zsh
- " ELM Mail files
- elseif s:line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
- set ft=mail
- " Mason
- elseif s:line1 =~ '^<[%&].*>'
- set ft=mason
- " Vim scripts (must have '" vim' as the first line to trigger this)
- elseif s:line1 =~ '^" *[vV]im$'
- set ft=vim
- " MOO
- elseif s:line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
- set ft=moo
- " Diff file:
- " - "diff" in first line (context diff)
- " - "Only in " in first line
- " - "--- " in first line and "+++ " in second line (unified diff).
- " - "*** " in first line and "--- " in second line (context diff).
- " - "# It was generated by makepatch " in the second line (makepatch diff).
- " - "Index: <filename>" in the first line (CVS file)
- " - "=== ", line of "=", "---", "+++ " (SVK diff)
- " - "=== ", "--- ", "+++ " (bzr diff, common case)
- " - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
- " - "# HG changeset patch" in first line (Mercurial export format)
- elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
- \ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
- \ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
- \ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
- \ || (s:line1 =~ '^=== ' && ((s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') || (s:line2 =~ '^--- ' && s:line3 =~ '^+++ ')))
- \ || (s:line1 =~ '^=== \(removed\|added\|renamed\|modified\)')
- set ft=diff
- " PostScript Files (must have %!PS as the first line, like a2ps output)
- elseif s:line1 =~ '^%![ \t]*PS'
- set ft=postscr
- " M4 scripts: Guess there is a line that starts with "dnl".
- elseif s:line1 =~ '^\s*dnl\>'
- \ || s:line2 =~ '^\s*dnl\>'
- \ || s:line3 =~ '^\s*dnl\>'
- \ || s:line4 =~ '^\s*dnl\>'
- \ || s:line5 =~ '^\s*dnl\>'
- set ft=m4
- " SiCAD scripts (must have procn or procd as the first line to trigger this)
- elseif s:line1 =~? '^ *proc[nd] *$'
- set ft=sicad
- " Purify log files start with "**** Purify"
- elseif s:line1 =~ '^\*\*\*\* Purify'
- set ft=purifylog
- " XML
- elseif s:line1 =~ '<?\s*xml.*?>'
- set ft=xml
- " XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN")
- elseif s:line1 =~ '\<DTD\s\+XHTML\s'
- set ft=xhtml
- " HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
- " Avoid "doctype html", used by slim.
- elseif s:line1 =~? '<!DOCTYPE\s\+html\>'
- set ft=html
- " PDF
- elseif s:line1 =~ '^%PDF-'
- set ft=pdf
- " XXD output
- elseif s:line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
- set ft=xxd
- " RCS/CVS log output
- elseif s:line1 =~ '^RCS file:' || s:line2 =~ '^RCS file:'
- set ft=rcslog
- " CVS commit
- elseif s:line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
- set ft=cvs
- " Prescribe
- elseif s:line1 =~ '^!R!'
- set ft=prescribe
- " Send-pr
- elseif s:line1 =~ '^SEND-PR:'
- set ft=sendpr
- " SNNS files
- elseif s:line1 =~ '^SNNS network definition file'
- set ft=snnsnet
- elseif s:line1 =~ '^SNNS pattern definition file'
- set ft=snnspat
- elseif s:line1 =~ '^SNNS result file'
- set ft=snnsres
- " Virata
- elseif s:line1 =~ '^%.\{-}[Vv]irata'
- \ || s:line2 =~ '^%.\{-}[Vv]irata'
- \ || s:line3 =~ '^%.\{-}[Vv]irata'
- \ || s:line4 =~ '^%.\{-}[Vv]irata'
- \ || s:line5 =~ '^%.\{-}[Vv]irata'
- set ft=virata
- " Strace
- elseif s:line1 =~ '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~ '^__libc_start_main'
- set ft=strace
- " VSE JCL
- elseif s:line1 =~ '^\* $$ JOB\>' || s:line1 =~ '^// *JOB\>'
- set ft=vsejcl
- " TAK and SINDA
- elseif s:line4 =~ 'K & K Associates' || s:line2 =~ 'TAK 2000'
- set ft=takout
- elseif s:line3 =~ 'S Y S T E M S I M P R O V E D '
- set ft=sindaout
- elseif getline(6) =~ 'Run Date: '
- set ft=takcmp
- elseif getline(9) =~ 'Node File 1'
- set ft=sindacmp
- " DNS zone files
- elseif s:line1.s:line2.s:line3.s:line4 =~ '^; <<>> DiG [0-9.]\+ <<>>\|BIND.*named\|$ORIGIN\|$TTL\|IN\s\+SOA'
- set ft=bindzone
- " BAAN
- elseif s:line1 =~ '|\*\{1,80}' && s:line2 =~ 'VRC '
- \ || s:line2 =~ '|\*\{1,80}' && s:line3 =~ 'VRC '
- set ft=baan
- " Valgrind
- elseif s:line1 =~ '^==\d\+== valgrind' || s:line3 =~ '^==\d\+== Using valgrind'
- set ft=valgrind
- " Go docs
- elseif s:line1 =~ '^PACKAGE DOCUMENTATION$'
- set ft=godoc
- " Renderman Interface Bytestream
- elseif s:line1 =~ '^##RenderMan'
- set ft=rib
- " Scheme scripts
- elseif s:line1 =~ 'exec\s\+\S*scheme' || s:line2 =~ 'exec\s\+\S*scheme'
- set ft=scheme
- " Git output
- elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$'
- set ft=git
- " Gprof (gnu profiler)
- elseif s:line1 == 'Flat profile:'
- \ && s:line2 == ''
- \ && s:line3 =~ '^Each sample counts as .* seconds.$'
- set ft=gprof
- " Erlang terms
- " (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
- elseif s:line1 =~? '-\*-.*erlang.*-\*-'
- set ft=erlang
- " CVS diff
- else
- 1 0.000003 let s:lnum = 1
- 1 0.000006 while getline(s:lnum) =~ "^? " && s:lnum < line("$")
- let s:lnum += 1
- endwhile
- 1 0.000004 if getline(s:lnum) =~ '^Index:\s\+\f\+$'
- set ft=diff
- " locale input files: Formal Definitions of Cultural Conventions
- " filename must be like en_US, fr_FR@euro or en_US.UTF-8
- elseif expand("%") =~ '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_'
- let s:lnum = 1
- while s:lnum < 100 && s:lnum < line("$")
- if getline(s:lnum) =~ '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$'
- setf fdcc
- break
- endif
- let s:lnum += 1
- endwhile
- endif
- 1 0.000002 unlet s:lnum
- 1 0.000001 endif
- 1 0.000002 unlet s:line2 s:line3 s:line4 s:line5
- 1 0.000001 endif
- " Restore 'cpoptions'
- 1 0.000012 let &cpo = s:cpo_save
- 1 0.000003 unlet s:cpo_save s:line1
- FUNCTION remote#host#IsRunning()
- Called 3 times
- Total time: 0.000072
- Self time: 0.000072
- count total (s) self (s)
- 3 0.000016 if !has_key(s:hosts, a:name)
- throw 'No host named "'.a:name.'" is registered'
- endif
- 3 0.000012 return s:hosts[a:name].channel != 0
- FUNCTION remote#host#RegisterClone()
- Called 1 time
- Total time: 0.000044
- Self time: 0.000044
- count total (s) self (s)
- 1 0.000010 if !has_key(s:hosts, a:orig_name)
- throw 'No host named "'.a:orig_name.'" is registered'
- endif
- 1 0.000011 let Factory = s:hosts[a:orig_name].factory
- 1 0.000012 let s:hosts[a:name] = { 'factory': Factory, 'channel': 0, 'initialized': 0, 'orig_name': a:orig_name }
- FUNCTION remote#host#RegisterPlugin()
- Called 3 times
- Total time: 0.004739
- Self time: 0.001965
- count total (s) self (s)
- 3 0.000096 0.000039 let plugins = remote#host#PluginsForHost(a:host)
- 4 0.000012 for plugin in plugins
- 1 0.000002 if plugin.path == a:path
- throw 'Plugin "'.a:path.'" is already registered'
- endif
- 1 0.000001 endfor
- 3 0.000104 0.000032 if has_key(s:hosts, a:host) && remote#host#IsRunning(a:host)
- " For now we won't allow registration of plugins when the host is already
- " running.
- throw 'Host "'.a:host.'" is already running'
- endif
- 30 0.000075 for spec in a:specs
- 27 0.000066 let type = spec.type
- 27 0.000051 let name = spec.name
- 27 0.000046 let sync = spec.sync
- 27 0.000047 let opts = spec.opts
- 27 0.000055 let rpc_method = a:path
- 27 0.000051 if type == 'command'
- 2 0.000007 let rpc_method .= ':command:'.name
- 2 0.000556 0.000027 call remote#define#CommandOnHost(a:host, rpc_method, sync, name, opts)
- 2 0.000004 elseif type == 'autocmd'
- " Since multiple handlers can be attached to the same autocmd event by a
- " single plugin, we need a way to uniquely identify the rpc method to
- " call. The solution is to append the autocmd pattern to the method
- " name(This still has a limit: one handler per event/pattern combo, but
- " there's no need to allow plugins define multiple handlers in that case)
- 5 0.000034 let rpc_method .= ':autocmd:'.name.':'.get(opts, 'pattern', '*')
- 5 0.000794 0.000052 call remote#define#AutocmdOnHost(a:host, rpc_method, sync, name, opts)
- 5 0.000010 elseif type == 'function'
- 20 0.000061 let rpc_method .= ':function:'.name
- 20 0.001650 0.000276 call remote#define#FunctionOnHost(a:host, rpc_method, sync, name, opts)
- 20 0.000024 else
- echoerr 'Invalid declaration type: '.type
- endif
- 27 0.000031 endfor
- 3 0.000129 call add(plugins, {'path': a:path, 'specs': a:specs})
- FUNCTION remote#host#LoadRemotePlugins()
- Called 1 time
- Total time: 0.004900
- Self time: 0.000116
- count total (s) self (s)
- 1 0.000186 0.000020 let manifest = s:GetManifest()
- 1 0.000006 if filereadable(manifest)
- 1 0.004702 0.000084 execute 'source' fnameescape(manifest)
- 1 0.000002 endif
- FUNCTION provider#python3#Prog()
- Called 1 time
- Total time: 0.000009
- Self time: 0.000009
- count total (s) self (s)
- 1 0.000006 return s:prog
- FUNCTION <SNR>23_foo()
- Called 2 times
- Total time: 0.005981
- Self time: 0.000164
- count total (s) self (s)
- 2 0.005974 0.000157 call foo#bar()
- FUNCTION <SNR>24_GetManifest()
- Called 1 time
- Total time: 0.000166
- Self time: 0.000041
- count total (s) self (s)
- 1 0.000138 0.000013 let manifest = s:GetManifestPath()
- 1 0.000010 if !filereadable(manifest)
- " Check if an old manifest file exists and move it to the new location.
- let old_manifest = s:GetOldManifestPath()
- if filereadable(old_manifest)
- call rename(old_manifest, manifest)
- endif
- endif
- 1 0.000002 return manifest
- FUNCTION <SNR>24_GetManifestPath()
- Called 1 time
- Total time: 0.000125
- Self time: 0.000125
- count total (s) self (s)
- 1 0.000004 let manifest_base = ''
- 1 0.000007 if exists('$NVIM_RPLUGIN_MANIFEST')
- return fnamemodify($NVIM_RPLUGIN_MANIFEST, ':p')
- endif
- 1 0.000012 let dest = has('win32') ? '$LOCALAPPDATA' : '$XDG_DATA_HOME'
- 1 0.000004 if !exists(dest)
- 1 0.000006 let dest = has('win32') ? '~/AppData/Local' : '~/.local/share'
- 1 0.000001 endif
- 1 0.000041 let dest = fnamemodify(expand(dest), ':p')
- 1 0.000007 if !empty(dest) && !filereadable(dest)
- 1 0.000009 let dest .= ('/' ==# dest[-1:] ? '' : '/') . 'nvim'
- 1 0.000011 call mkdir(dest, 'p', 0700)
- 1 0.000003 let manifest_base = dest
- 1 0.000001 endif
- 1 0.000004 return manifest_base.'/rplugin.vim'
- FUNCTION remote#host#Require()
- Called 3 times
- Total time: 0.240231
- Self time: 0.000257
- count total (s) self (s)
- 3 0.000013 if empty(s:plugins_for_host)
- call remote#host#LoadRemotePlugins()
- endif
- 3 0.000018 if !has_key(s:hosts, a:name)
- throw 'No host named "'.a:name.'" is registered'
- endif
- 3 0.000012 let host = s:hosts[a:name]
- 3 0.000008 if !host.channel && !host.initialized
- 1 0.000005 let host_info = { 'name': a:name, 'orig_name': get(host, 'orig_name', a:name) }
- 1 0.240099 0.000124 let host.channel = call(host.factory, [host_info])
- 1 0.000006 let host.initialized = 1
- 1 0.000003 endif
- 3 0.000011 return host.channel
- FUNCTION remote#host#Register()
- Called 3 times
- Total time: 0.000076
- Self time: 0.000076
- count total (s) self (s)
- 3 0.000026 let s:hosts[a:name] = {'factory': a:factory, 'channel': 0, 'initialized': 0}
- 3 0.000011 let s:plugin_patterns[a:name] = a:pattern
- 3 0.000016 if type(a:factory) == type(1) && a:factory
- " Passed a channel directly
- let s:hosts[a:name].channel = a:factory
- endif
- FUNCTION remote#host#PluginsForHost()
- Called 4 times
- Total time: 0.000075
- Self time: 0.000075
- count total (s) self (s)
- 4 0.000026 if !has_key(s:plugins_for_host, a:host)
- 2 0.000012 let s:plugins_for_host[a:host] = []
- 2 0.000003 end
- 4 0.000015 return s:plugins_for_host[a:host]
- FUNCTION provider#pythonx#Require()
- Called 1 time
- Total time: 0.239823
- Self time: 0.193428
- count total (s) self (s)
- 1 0.000007 let ver = (a:host.orig_name ==# 'python') ? 2 : 3
- " Python host arguments
- 1 0.046537 0.000160 let prog = (ver == '2' ? provider#python#Prog() : provider#python3#Prog())
- 1 0.000007 let args = [prog, '-c', 'import sys; sys.path.remove(""); import neovim; neovim.start_host()']
- " Collect registered Python plugins into args
- 1 0.000030 0.000012 let python_plugins = remote#host#PluginsForHost(a:host.name)
- 3 0.000013 for plugin in python_plugins
- 2 0.000017 call add(args, plugin.path)
- 2 0.000004 endfor
- 1 0.000002 try
- 1 0.010767 let channel_id = jobstart(args, s:job_opts)
- 1 0.182367 if rpcrequest(channel_id, 'poll') ==# 'ok'
- 1 0.000014 return channel_id
- endif
- catch
- echomsg v:throwpoint
- echomsg v:exception
- for row in get(s:stderr, channel_id, [])
- echomsg row
- endfor
- endtry
- throw remote#host#LoadErrorForHost(a:host.orig_name, '$NVIM_PYTHON_LOG_FILE')
- FUNCTION <SNR>26_StringifyOpts()
- Called 2 times
- Total time: 0.000292
- Self time: 0.000292
- count total (s) self (s)
- 2 0.000005 let rv = []
- 16 0.000028 for key in a:keys
- 14 0.000037 if has_key(a:opts, key)
- call add(rv, ' -'.key)
- let val = a:opts[key]
- if type(val) != type('') || val != ''
- call add(rv, '='.val)
- endif
- endif
- 14 0.000020 endfor
- 2 0.000007 return join(rv, '')
- FUNCTION remote#define#AutocmdOnChannel()
- Called 3 times
- Total time: 0.000474
- Self time: 0.000222
- count total (s) self (s)
- 3 0.000018 let rpcargs = [a:channel, '"'.a:method.'"']
- 3 0.000094 0.000035 call s:AddEval(rpcargs, a:opts)
- 3 0.000286 0.000093 let autocmd_def = s:GetAutocmdPrefix(a:name, a:opts) . ' call '.s:GetRpcFunction(a:sync).'('.join(rpcargs, ', ').')'
- 3 0.000068 exe autocmd_def
- FUNCTION remote#define#FunctionOnHost()
- Called 20 times
- Total time: 0.001077
- Self time: 0.000728
- count total (s) self (s)
- 20 0.000469 0.000119 let group = s:GetNextAutocmdGroup()
- 20 0.000578 exe 'autocmd! '.group.' FuncUndefined '.a:name .' call remote#define#FunctionBootstrap("'.a:host.'"' . ', "'.a:method.'"' . ', '.string(a:sync) . ', "'.a:name.'"' . ', '.string(a:opts) . ', "'.group.'"' . ')'
- FUNCTION provider#pythonx#Detect()
- Called 1 time
- Total time: 0.045810
- Self time: 0.000083
- count total (s) self (s)
- 1 0.000002 if a:major_ver == 2
- if exists('g:python_host_prog')
- return [g:python_host_prog, '']
- else
- let progs = ['python2', 'python2.7', 'python2.6', 'python']
- endif
- else
- 1 0.000003 if exists('g:python3_host_prog')
- return [g:python3_host_prog, '']
- else
- 1 0.000004 let progs = ['python3', 'python3.7', 'python3.6', 'python3.5', 'python3.4', 'python3.3', 'python']
- 1 0.000001 endif
- 1 0.000001 endif
- 1 0.000002 let errors = []
- 1 0.000003 for prog in progs
- 1 0.045750 0.000022 let [result, err] = s:check_interpreter(prog, a:major_ver)
- 1 0.000005 if result
- 1 0.000005 return [prog, err]
- endif
- " Accumulate errors in case we don't find
- " any suitable Python interpreter.
- call add(errors, err)
- endfor
- " No suitable Python interpreter found.
- return ['', 'provider/pythonx: Could not load Python ' . a:major_ver . ":\n" . join(errors, "\n")]
- FUNCTION <SNR>13_Highlight_Matching_Pair()
- Called 3 times
- Total time: 0.000522
- Self time: 0.000522
- count total (s) self (s)
- " Remove any previous match.
- 3 0.000036 if exists('w:paren_hl_on') && w:paren_hl_on
- silent! call matchdelete(3)
- let w:paren_hl_on = 0
- endif
- " Avoid that we remove the popup menu.
- " Return when there are no colors (looks like the cursor jumps).
- 3 0.000023 if pumvisible() || (&t_Co < 8 && !has("gui_running"))
- return
- endif
- " Get the character under the cursor and check if it's in 'matchpairs'.
- 3 0.000018 let c_lnum = line('.')
- 3 0.000010 let c_col = col('.')
- 3 0.000006 let before = 0
- 3 0.000015 let text = getline(c_lnum)
- 3 0.000096 let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)')
- 3 0.000013 if empty(matches)
- let [c_before, c] = ['', '']
- else
- 3 0.000023 let [c_before, c] = matches[1:2]
- 3 0.000004 endif
- 3 0.000077 let plist = split(&matchpairs, '.\zs[:,]')
- 3 0.000015 let i = index(plist, c)
- 3 0.000006 if i < 0
- " not found, in Insert mode try character before the cursor
- 3 0.000011 if c_col > 1 && (mode() == 'i' || mode() == 'R')
- let before = strlen(c_before)
- let c = c_before
- let i = index(plist, c)
- endif
- 3 0.000006 if i < 0
- " not found, nothing to do
- 3 0.000006 return
- endif
- endif
- " Figure out the arguments for searchpairpos().
- if i % 2 == 0
- let s_flags = 'nW'
- let c2 = plist[i + 1]
- else
- let s_flags = 'nbW'
- let c2 = c
- let c = plist[i - 1]
- endif
- if c == '['
- let c = '\['
- let c2 = '\]'
- endif
- " Find the match. When it was just before the cursor move it there for a
- " moment.
- if before > 0
- let has_getcurpos = exists("*getcurpos")
- if has_getcurpos
- " getcurpos() is more efficient but doesn't exist before 7.4.313.
- let save_cursor = getcurpos()
- else
- let save_cursor = winsaveview()
- endif
- call cursor(c_lnum, c_col - before)
- endif
- " Build an expression that detects whether the current cursor position is in
- " certain syntax types (string, comment, etc.), for use as searchpairpos()'s
- " skip argument.
- " We match "escape" for special items, such as lispEscapeSpecial.
- let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
- " If executing the expression determines that the cursor is currently in
- " one of the syntax types, then we want searchpairpos() to find the pair
- " within those syntax types (i.e., not skip). Otherwise, the cursor is
- " outside of the syntax types and s_skip should keep its value so we skip any
- " matching pair inside the syntax types.
- execute 'if' s_skip '| let s_skip = 0 | endif'
- " Limit the search to lines visible in the window.
- let stoplinebottom = line('w$')
- let stoplinetop = line('w0')
- if i % 2 == 0
- let stopline = stoplinebottom
- else
- let stopline = stoplinetop
- endif
- " Limit the search time to 300 msec to avoid a hang on very long lines.
- " This fails when a timeout is not supported.
- if mode() == 'i' || mode() == 'R'
- let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
- else
- let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
- endif
- try
- let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
- catch /E118/
- " Can't use the timeout, restrict the stopline a bit more to avoid taking
- " a long time on closed folds and long lines.
- " The "viewable" variables give a range in which we can scroll while
- " keeping the cursor at the same position.
- " adjustedScrolloff accounts for very large numbers of scrolloff.
- let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2])
- let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2])
- let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2])
- " one of these stoplines will be adjusted below, but the current values are
- " minimal boundaries within the current window
- if i % 2 == 0
- if has("byte_offset") && has("syntax_items") && &smc > 0
- let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2])
- let stopline = min([bottom_viewable, byte2line(stopbyte)])
- else
- let stopline = min([bottom_viewable, c_lnum + 100])
- endif
- let stoplinebottom = stopline
- else
- if has("byte_offset") && has("syntax_items") && &smc > 0
- let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2])
- let stopline = max([top_viewable, byte2line(stopbyte)])
- else
- let stopline = max([top_viewable, c_lnum - 100])
- endif
- let stoplinetop = stopline
- endif
- let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
- endtry
- if before > 0
- if has_getcurpos
- call setpos('.', save_cursor)
- else
- call winrestview(save_cursor)
- endif
- endif
- " If a match is found setup match highlighting.
- if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
- if exists('*matchaddpos')
- call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
- else
- exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
- endif
- let w:paren_hl_on = 1
- endif
- FUNCTION remote#define#AutocmdOnHost()
- Called 5 times
- Total time: 0.000742
- Self time: 0.000374
- count total (s) self (s)
- 5 0.000142 0.000033 let group = s:GetNextAutocmdGroup()
- 5 0.000027 let forward = '"doau '.group.' '.a:name.' ".'.'expand("<amatch>")'
- 5 0.000041 let a:opts.group = group
- 5 0.000399 0.000141 let bootstrap_def = s:GetAutocmdPrefix(a:name, a:opts) .' call remote#define#AutocmdBootstrap("'.a:host.'"' . ', "'.a:method.'"' . ', '.string(a:sync) . ', "'.a:name.'"' . ', '.string(a:opts).'' . ', "'.escape(forward, '"').'"' . ')'
- 5 0.000117 exe bootstrap_def
- FUNCTION <SNR>26_GetNextAutocmdGroup()
- Called 25 times
- Total time: 0.000458
- Self time: 0.000458
- count total (s) self (s)
- 25 0.000056 let gid = s:next_gid
- 25 0.000050 let s:next_gid += 1
- 25 0.000070 let group_name = 'RPC_DEFINE_AUTOCMD_GROUP_'.gid
- " Ensure the group is defined
- 25 0.000159 exe 'augroup '.group_name.' | augroup END'
- 25 0.000042 return group_name
- FUNCTION <SNR>26_GetAutocmdPrefix()
- Called 8 times
- Total time: 0.000428
- Self time: 0.000428
- count total (s) self (s)
- 8 0.000029 if has_key(a:opts, 'group')
- 8 0.000023 let group = a:opts.group
- 8 0.000011 else
- let group = s:GetNextAutocmdGroup()
- endif
- 8 0.000031 let rv = ['autocmd!', group, a:name]
- 8 0.000021 if has_key(a:opts, 'pattern')
- 8 0.000082 call add(rv, a:opts.pattern)
- 8 0.000009 else
- call add(rv, '*')
- endif
- 8 0.000026 if has_key(a:opts, 'nested') && a:opts.nested
- call add(rv, 'nested')
- endif
- 8 0.000046 return join(rv, ' ')
- FUNCTION remote#define#CommandOnHost()
- Called 2 times
- Total time: 0.000529
- Self time: 0.000205
- count total (s) self (s)
- 2 0.000005 let prefix = ''
- 2 0.000006 if has_key(a:opts, 'range')
- if a:opts.range == '' || a:opts.range == '%'
- " -range or -range=%, pass the line range in a list
- let prefix = '<line1>,<line2>'
- elseif matchstr(a:opts.range, '\d') != ''
- " -range=N, pass the count
- let prefix = '<count>'
- endif
- elseif has_key(a:opts, 'count')
- let prefix = '<count>'
- endif
- 2 0.000007 let forward_args = [prefix.a:name]
- 2 0.000004 if has_key(a:opts, 'bang')
- call add(forward_args, '<bang>')
- endif
- 2 0.000005 if has_key(a:opts, 'register')
- call add(forward_args, ' <register>')
- endif
- 2 0.000004 if has_key(a:opts, 'nargs')
- call add(forward_args, ' <args>')
- endif
- 2 0.000438 0.000113 exe s:GetCommandPrefix(a:name, a:opts) .' call remote#define#CommandBootstrap("'.a:host.'"' . ', "'.a:method.'"' . ', '.string(a:sync) . ', "'.a:name.'"' . ', '.string(a:opts).'' . ', "'.join(forward_args, '').'"' . ')'
- FUNCTION <SNR>14_VimEnter()
- Called 1 time
- Total time: 0.000097
- Self time: 0.000044
- count total (s) self (s)
- " call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">")
- 1 0.000006 let curwin = winnr()
- 1 0.000002 let s:vimentered = 1
- 1 0.000077 0.000024 windo call s:LocalBrowse(expand("%:p"))
- 1 0.000009 exe curwin."wincmd w"
- " call Dret("s:VimEnter")
- FUNCTION <SNR>26_GetRpcFunction()
- Called 3 times
- Total time: 0.000024
- Self time: 0.000024
- count total (s) self (s)
- 3 0.000006 if a:sync
- return 'rpcrequest'
- endif
- 3 0.000004 return 'rpcnotify'
- FUNCTION remote#host#LoadRemotePluginsEvent()
- Called 1 time
- Total time: 0.005023
- Self time: 0.000123
- count total (s) self (s)
- 1 0.000062 autocmd! nvim-rplugin
- 1 0.004946 0.000046 call remote#host#LoadRemotePlugins()
- 1 0.000008 if exists('#'.a:event.'#'.a:pattern) " Avoid 'No matching autocommands'.
- execute 'silent doautocmd <nomodeline>' a:event a:pattern
- endif
- FUNCTION <SNR>28_check_interpreter()
- Called 1 time
- Total time: 0.045727
- Self time: 0.045727
- count total (s) self (s)
- 1 0.000016 let prog_path = exepath(a:prog)
- 1 0.000002 if prog_path ==# ''
- return [0, a:prog . ' not found in search path or not executable.']
- endif
- 1 0.000003 let min_version = (a:major_ver == 2) ? '2.6' : '3.3'
- " Try to load neovim module, and output Python version.
- " Return codes:
- " 0 Neovim module can be loaded.
- " 2 Neovim module cannot be loaded.
- " Otherwise something else went wrong (e.g. 1 or 127).
- 1 0.045565 let prog_ver = system([ a:prog , '-c' , 'import sys; ' . 'sys.path.remove(""); ' . 'sys.stdout.write(str(sys.version_info[0]) + "." + str(sys.version_info[1])); ' . 'import pkgutil; ' . 'exit(2*int(pkgutil.get_loader("neovim") is None))' ])
- 1 0.000019 if v:shell_error == 2 || v:shell_error == 0
- " Check version only for expected return codes.
- 1 0.000043 if prog_ver !~ '^' . a:major_ver
- return [0, prog_path . ' is Python ' . prog_ver . ' and cannot provide Python ' . a:major_ver . '.']
- elseif prog_ver =~ '^' . a:major_ver && prog_ver < min_version
- return [0, prog_path . ' is Python ' . prog_ver . ' and cannot provide Python >= ' . min_version . '.']
- endif
- 1 0.000002 endif
- 1 0.000002 if v:shell_error == 2
- return [0, prog_path . ' does not have the neovim module installed. ' . 'See ":help provider-python".']
- elseif v:shell_error == 127
- " This can happen with pyenv's shims.
- return [0, prog_path . ' does not exist: ' . prog_ver]
- elseif v:shell_error
- return [0, 'Checking ' . prog_path . ' caused an unknown error. ' . '(' . v:shell_error . ', output: ' . prog_ver . ')' . ' Please report this at github.com/neovim/neovim.']
- endif
- 1 0.000004 return [1, '']
- FUNCTION <SNR>26_GetCommandPrefix()
- Called 2 times
- Total time: 0.000325
- Self time: 0.000033
- count total (s) self (s)
- 2 0.000322 0.000030 return 'command!'.s:StringifyOpts(a:opts, ['nargs', 'complete', 'range', 'count', 'bang', 'bar', 'register']).' '.a:name
- FUNCTION remote#define#AutocmdBootstrap()
- Called 3 times
- Total time: 0.241226
- Self time: 0.000424
- count total (s) self (s)
- 3 0.240282 0.000051 let channel = remote#host#Require(a:host)
- 3 0.000186 exe 'autocmd! '.a:opts.group
- 3 0.000010 if channel
- 3 0.000544 0.000069 call remote#define#AutocmdOnChannel(channel, a:method, a:sync, a:name, a:opts)
- 3 0.000166 0.000069 exe eval(a:forward)
- 3 0.000005 else
- exe 'augroup! '.a:opts.group
- echoerr 'Host "'a:host.'" for "'.a:name.'" autocmd is not available'
- endif
- FUNCTION foo#bar()
- Called 2 times
- Total time: 0.000044
- Self time: 0.000044
- count total (s) self (s)
- 2 0.000041 echo 'hi'
- FUNCTION <SNR>14_LocalBrowse()
- Called 3 times
- Total time: 0.000118
- Self time: 0.000118
- count total (s) self (s)
- " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here.
- " Otherwise, the BufEnter event gets triggered when attempts to write to
- " the DBG buffer are made.
- 3 0.000010 if !exists("s:vimentered")
- " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will,
- " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined.
- " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)")
- " call Dret("s:LocalBrowse")
- 1 0.000001 return
- endif
- " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")")
- 2 0.000012 if has("amiga")
- " The check against '' is made for the Amiga, where the empty
- " string is the current directory and not checking would break
- " things such as the help command.
- " call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
- if a:dirname != '' && isdirectory(a:dirname)
- sil! call netrw#LocalBrowseCheck(a:dirname)
- if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
- exe w:netrw_bannercnt
- endif
- endif
- elseif isdirectory(a:dirname)
- " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
- " call Dredir("LocalBrowse ft last set: ","verbose set ft")
- " call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- sil! call netrw#LocalBrowseCheck(a:dirname)
- " call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
- exe w:netrw_bannercnt
- " call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- endif
- else
- " not a directory, ignore it
- " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
- 2 0.000002 endif
- " call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
- " call Dret("s:LocalBrowse")
- FUNCTION <SNR>26_AddEval()
- Called 3 times
- Total time: 0.000059
- Self time: 0.000059
- count total (s) self (s)
- 3 0.000013 if has_key(a:opts, 'eval')
- if type(a:opts.eval) != type('') || a:opts.eval == ''
- throw "Eval option must be a non-empty string"
- endif
- " evaluate an expression and pass as argument
- call add(a:rpcargs, 'eval("'.escape(a:opts.eval, '"').'")')
- endif
- FUNCTIONS SORTED ON TOTAL TIME
- count total (s) self (s) function
- 3 0.241226 0.000424 remote#define#AutocmdBootstrap()
- 3 0.240231 0.000257 remote#host#Require()
- 1 0.239823 0.193428 provider#pythonx#Require()
- 1 0.045810 0.000083 provider#pythonx#Detect()
- 1 0.045727 <SNR>28_check_interpreter()
- 2 0.005981 0.000164 <SNR>23_foo()
- 1 0.005023 0.000123 remote#host#LoadRemotePluginsEvent()
- 1 0.004900 0.000116 remote#host#LoadRemotePlugins()
- 3 0.004739 0.001965 remote#host#RegisterPlugin()
- 20 0.001077 0.000728 remote#define#FunctionOnHost()
- 5 0.000742 0.000374 remote#define#AutocmdOnHost()
- 2 0.000529 0.000205 remote#define#CommandOnHost()
- 3 0.000522 <SNR>13_Highlight_Matching_Pair()
- 3 0.000474 0.000222 remote#define#AutocmdOnChannel()
- 25 0.000458 <SNR>26_GetNextAutocmdGroup()
- 8 0.000428 <SNR>26_GetAutocmdPrefix()
- 2 0.000325 0.000033 <SNR>26_GetCommandPrefix()
- 2 0.000292 <SNR>26_StringifyOpts()
- 1 0.000166 0.000041 <SNR>24_GetManifest()
- 1 0.000125 <SNR>24_GetManifestPath()
- FUNCTIONS SORTED ON SELF TIME
- count total (s) self (s) function
- 1 0.239823 0.193428 provider#pythonx#Require()
- 1 0.045727 <SNR>28_check_interpreter()
- 3 0.004739 0.001965 remote#host#RegisterPlugin()
- 20 0.001077 0.000728 remote#define#FunctionOnHost()
- 3 0.000522 <SNR>13_Highlight_Matching_Pair()
- 25 0.000458 <SNR>26_GetNextAutocmdGroup()
- 8 0.000428 <SNR>26_GetAutocmdPrefix()
- 3 0.241226 0.000424 remote#define#AutocmdBootstrap()
- 5 0.000742 0.000374 remote#define#AutocmdOnHost()
- 2 0.000292 <SNR>26_StringifyOpts()
- 3 0.240231 0.000257 remote#host#Require()
- 3 0.000474 0.000222 remote#define#AutocmdOnChannel()
- 2 0.000529 0.000205 remote#define#CommandOnHost()
- 2 0.005981 0.000164 <SNR>23_foo()
- 1 0.000125 <SNR>24_GetManifestPath()
- 1 0.005023 0.000123 remote#host#LoadRemotePluginsEvent()
- 3 0.000118 <SNR>14_LocalBrowse()
- 1 0.004900 0.000116 remote#host#LoadRemotePlugins()
- 1 0.045810 0.000083 provider#pythonx#Detect()
- 3 0.000076 remote#host#Register()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement