Last active
February 23, 2019 21:26
-
-
Save Migacz85/3d5887f878d6a2961aa04f9c7adef793 to your computer and use it in GitHub Desktop.
vim log beautify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chdir(/etc) | |
fchdir() to previous dir | |
sourcing "/etc/vimrc" | |
line 1: " All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just | |
line 2: " /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime | |
line 3: " you can find below. If you wish to change any of those settings, you should | |
line 4: " do it in this file (/etc/vimrc), since archlinux.vim will be overwritten | |
line 5: " everytime an upgrade of the vim packages is performed. It is recommended to | |
line 6: " make changes after sourcing archlinux.vim since it alters the value of the | |
line 7: " 'compatible' option. | |
line 8: | |
line 9: " This line should not be removed as it ensures that various options are | |
line 10: " properly set to work with the Vim-related packages. | |
line 11: runtime! archlinux.vim | |
Searching for "archlinux.vim" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after" | |
Searching for "/home/migacz/.vim/archlinux.vim" | |
Searching for "/usr/share/vim/vimfiles/archlinux.vim" | |
chdir(/usr/share/vim/vimfiles) | |
fchdir() to previous dir | |
line 11: sourcing "/usr/share/vim/vimfiles/archlinux.vim" | |
line 1: " The Arch Linux global vimrc - setting only a few sane defaults | |
line 2: " | |
line 3: " DO NOT EDIT THIS FILE. IT'S OVERWRITTEN UPON UPGRADES. | |
line 4: " | |
line 5: " Use /etc/vimrc for system-wide and $HOME/.vimrc for personal configuration | |
line 6: " (for details see ':help initialization'). | |
line 7: " | |
line 8: " Use :help '<option>' to see the documentation for the given option. | |
line 9: | |
line 10: " Use Vim defaults instead of 100% vi compatibility | |
line 11: " Avoid side-effects when nocompatible has already been set. | |
line 12: if &compatible | |
line 13: set nocompatible | |
line 14: endif | |
line 15: | |
line 16: set backspace=indent,eol,start | |
line 17: set ruler | |
line 18: set suffixes+=.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc | |
line 19: set suffixes-=.h | |
line 20: set suffixes-=.obj | |
line 21: | |
line 22: " Move temporary files to a secure location to protect against CVE-2017-1000382 | |
line 23: if exists('$XDG_CACHE_HOME') | |
line 24: let &g:directory=$XDG_CACHE_HOME | |
line 25: else | |
line 26: let &g:directory=$HOME . '/.cache' | |
line 27: endif | |
line 28: let &g:undodir=&g:directory . '/vim/undo//' | |
line 29: let &g:backupdir=&g:directory . '/vim/backup//' | |
line 30: let &g:directory.='/vim/swap//' | |
line 31: " Create directories if they doesn't exist | |
line 32: if ! isdirectory(expand(&g:directory)) | |
line 33: silent! call mkdir(expand(&g:directory), 'p', 0700) | |
line 34: endif | |
line 35: if ! isdirectory(expand(&g:backupdir)) | |
line 36: silent! call mkdir(expand(&g:backupdir), 'p', 0700) | |
line 37: endif | |
line 38: if ! isdirectory(expand(&g:undodir)) | |
line 39: silent! call mkdir(expand(&g:undodir), 'p', 0700) | |
line 40: endif | |
line 41: | |
line 42: " Make shift-insert work like in Xterm | |
line 43: if has('gui_running') | |
line 44: map <S-Insert> <MiddleMouse> | |
line 45: map! <S-Insert> <MiddleMouse> | |
line 46: endif | |
finished sourcing /usr/share/vim/vimfiles/archlinux.vim | |
continuing in /etc/vimrc | |
Searching for "/usr/share/vim/vim81/archlinux.vim" | |
Searching for "/usr/share/vim/vimfiles/after/archlinux.vim" | |
Searching for "/home/migacz/.vim/after/archlinux.vim" | |
line 12: | |
line 13: " If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim' | |
line 14: " Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual | |
line 15: " and configure vim to your own liking! | |
line 16: | |
line 17: " do not load defaults if ~/.vimrc is missing | |
line 18: "let skip_defaults_vim=1 | |
finished sourcing /etc/vimrc | |
chdir(/home/migacz) | |
fchdir() to previous dir | |
sourcing "$HOME/.vimrc" | |
line 1: set nocompatible " be iMproved, required | |
line 2: filetype off " required | |
Searching for "ftoff.vim" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after" | |
Searching for "/home/migacz/.vim/ftoff.vim" | |
Searching for "/usr/share/vim/vimfiles/ftoff.vim" | |
Searching for "/usr/share/vim/vim81/ftoff.vim" | |
chdir(/usr/share/vim/vim81) | |
fchdir() to previous dir | |
line 2: sourcing "/usr/share/vim/vim81/ftoff.vim" | |
line 1: " Vim support file to switch off detection of file types | |
line 2: " | |
line 3: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 4: " Last change:^I2001 Jun 11 | |
line 5: | |
line 6: if exists("did_load_filetypes") | |
line 7: unlet did_load_filetypes | |
line 8: endif | |
line 9: | |
line 10: " Remove all autocommands in the filetypedetect group | |
line 11: silent! au! filetypedetect * | |
Error detected while processing /usr/share/vim/vim81/ftoff.vim: | |
line 11: | |
E216: No such group or event: filetypedetect * | |
finished sourcing /usr/share/vim/vim81/ftoff.vim | |
continuing in /home/migacz/.vimrc | |
Searching for "/usr/share/vim/vimfiles/after/ftoff.vim" | |
Searching for "/home/migacz/.vim/after/ftoff.vim" | |
line 3: | |
line 4: " set the runtime path to include Vundle and initialize | |
line 5: set rtp+=~/.vim/bundle/Vundle.vim | |
line 6: call vundle#begin() | |
Searching for "autoload/vundle.vim" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim" | |
Searching for "/home/migacz/.vim/autoload/vundle.vim" | |
Searching for "/usr/share/vim/vimfiles/autoload/vundle.vim" | |
Searching for "/usr/share/vim/vim81/autoload/vundle.vim" | |
Searching for "/usr/share/vim/vimfiles/after/autoload/vundle.vim" | |
Searching for "/home/migacz/.vim/after/autoload/vundle.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/vundle.vim" | |
chdir(/home/migacz/.vim/bundle/Vundle.vim/autoload) | |
fchdir() to previous dir | |
line 6: sourcing "/home/migacz/.vim/bundle/Vundle.vim/autoload/vundle.vim" | |
line 1: " Vundle is a shortcut for Vim Bundle and Is a simple plugin manager for Vim | |
line 2: " Author: gmarik | |
line 3: " HomePage: http://github.com/VundleVim/Vundle.vim | |
line 4: " Readme: http://github.com/VundleVim/Vundle.vim/blob/master/README.md | |
line 5: " Version: 0.10.2 | |
line 6: | |
line 7: " Plugin Commands | |
line 9: com! -nargs=+ -bar Plugin call vundle#config#bundle(<args>) | |
line 10: | |
line 12: com! -nargs=* -bang -complete=custom,vundle#scripts#complete PluginInstall call vundle#installer#new('!' == '<bang>', <f-args>) | |
line 13: | |
line 15: com! -nargs=? -bang -complete=custom,vundle#scripts#complete PluginSearch call vundle#scripts#all('!' == '<bang>', <q-args>) | |
line 16: | |
line 18: com! -nargs=0 -bang PluginList call vundle#installer#list('!' == '<bang>') | |
line 19: | |
line 21: com! -nargs=? -bang PluginClean call vundle#installer#clean('!' == '<bang>') | |
line 22: | |
line 24: com! -nargs=0 PluginDocs call vundle#installer#helptags(g:vundle#bundles) | |
line 25: | |
line 26: " Aliases | |
line 27: com! -nargs=* -complete=custom,vundle#scripts#complete PluginUpdate PluginInstall! <args> | |
line 28: | |
line 29: " Vundle Aliases | |
line 30: com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleInstall PluginInstall<bang> <args> | |
line 31: com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleSearch PluginSearch<bang> <args> | |
line 32: com! -nargs=? -bang VundleClean PluginClean<bang> | |
line 33: com! -nargs=0 VundleDocs PluginDocs | |
line 34: com! VundleUpdate PluginInstall! | |
line 35: com! -nargs=* -complete=custom,vundle#scripts#complete VundleUpdate PluginInstall! <args> | |
line 36: | |
line 37: " Deprecated Commands | |
line 38: com! -nargs=+ Bundle call vundle#config#bundle(<args>) | |
line 39: com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleInstall PluginInstall<bang> <args> | |
line 40: com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleSearch PluginSearch<bang> <args> | |
line 41: com! -nargs=0 -bang BundleList PluginList<bang> | |
line 42: com! -nargs=? -bang BundleClean PluginClean<bang> | |
line 43: com! -nargs=0 BundleDocs PluginDocs | |
line 44: com! BundleUpdate PluginInstall! | |
line 45: | |
line 46: " Set up the signs used in the installer window. (See :help signs) | |
line 47: if (has('signs')) | |
line 48: sign define Vu_error text=! texthl=Error | |
line 49: sign define Vu_active text=> texthl=Comment | |
line 50: sign define Vu_todate text=. texthl=Comment | |
line 51: sign define Vu_new text=+ texthl=Comment | |
line 52: sign define Vu_updated text=* texthl=Comment | |
line 53: sign define Vu_deleted text=- texthl=Comment | |
line 54: sign define Vu_helptags text=* texthl=Comment | |
line 55: sign define Vu_pinned text== texthl=Comment | |
line 56: endif | |
line 57: | |
line 58: " Set up Vundle. This function has to be called from the users vimrc file. | |
line 59: " This will force Vim to source this file as a side effect which wil define | |
line 60: " the :Plugin command. After calling this function the user can use the | |
line 61: " :Plugin command in the vimrc. It is not possible to do this automatically | |
line 62: " because when loading the vimrc file no plugins where loaded yet. | |
line 63: func! vundle#rc(...) abort | |
line 69: | |
line 70: " Alternative to vundle#rc, offers speed up by modifying rtp only when end() | |
line 71: " called later. | |
line 72: func! vundle#begin(...) abort | |
line 76: | |
line 77: " Finishes putting plugins on the rtp. | |
line 78: func! vundle#end(...) abort | |
line 82: | |
line 83: " Initialize some global variables used by Vundle. | |
line 84: let vundle#bundle_dir = expand('$HOME/.vim/bundle', 1) | |
line 85: let vundle#bundles = [] | |
line 86: let vundle#lazy_load = 0 | |
line 87: let vundle#log = [] | |
line 88: let vundle#updated_bundles = [] | |
line 89: | |
line 90: " vim: set expandtab sts=2 ts=2 sw=2 tw=78 norl: | |
finished sourcing /home/migacz/.vim/bundle/Vundle.vim/autoload/vundle.vim | |
continuing in /home/migacz/.vimrc | |
calling function vundle#begin() | |
line 1: let g:vundle#lazy_load = 1 | |
line 2: call call('vundle#rc', a:000) | |
calling function vundle#begin[2]..vundle#rc() | |
line 1: if a:0 > 0 | |
line 2: let g:vundle#bundle_dir = expand(a:1, 1) | |
line 3: endif | |
line 4: call vundle#config#init() | |
Searching for "autoload/vundle/config.vim" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim" | |
Searching for "/home/migacz/.vim/autoload/vundle/config.vim" | |
Searching for "/usr/share/vim/vimfiles/autoload/vundle/config.vim" | |
Searching for "/usr/share/vim/vim81/autoload/vundle/config.vim" | |
Searching for "/usr/share/vim/vimfiles/after/autoload/vundle/config.vim" | |
Searching for "/home/migacz/.vim/after/autoload/vundle/config.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/vundle/config.vim" | |
chdir(/home/migacz/.vim/bundle/Vundle.vim/autoload/vundle) | |
fchdir() to previous dir | |
line 4: sourcing "/home/migacz/.vim/bundle/Vundle.vim/autoload/vundle/config.vim" | |
line 1: " --------------------------------------------------------------------------- | |
line 2: " Add a plugin to the runtimepath. | |
line 3: " | |
line 4: " arg -- a string specifying the plugin | |
line 5: " ... -- a dictionary of options for the plugin | |
line 6: " return -- the return value from vundle#config#init_bundle() | |
line 7: " --------------------------------------------------------------------------- | |
line 8: func! vundle#config#bundle(arg, ...) | |
line 23: | |
line 24: | |
line 25: " --------------------------------------------------------------------------- | |
line 26: " When lazy bundle load is used (begin/end functions), add all configured | |
line 27: " bundles to runtimepath and reorder appropriately. | |
line 28: " --------------------------------------------------------------------------- | |
line 29: func! vundle#config#activate_bundles() | |
line 33: | |
line 34: | |
line 35: " --------------------------------------------------------------------------- | |
line 36: " Initialize Vundle. | |
line 37: " | |
line 38: " Start a new bundles list and make sure the runtimepath does not contain | |
line 39: " directories from a previous call. In theory, this should only be called | |
line 40: " once. | |
line 41: " --------------------------------------------------------------------------- | |
line 42: func! vundle#config#init() | |
line 48: | |
line 49: | |
line 50: " --------------------------------------------------------------------------- | |
line 51: " Add a list of bundles to the runtimepath and source them. | |
line 52: " | |
line 53: " bundles -- a list of bundle objects | |
line 54: " --------------------------------------------------------------------------- | |
line 55: func! vundle#config#require(bundles) abort | |
line 66: | |
line 67: | |
line 68: " --------------------------------------------------------------------------- | |
line 69: " Create a bundle object from a bundle specification. | |
line 70: " | |
line 71: " name -- the bundle specification as a string | |
line 72: " opts -- the options dictionary from then bundle definition | |
line 73: " return -- an initialized bundle object | |
line 74: " --------------------------------------------------------------------------- | |
line 75: func! vundle#config#init_bundle(name, opts) | |
line 84: | |
line 85: | |
line 86: " --------------------------------------------------------------------------- | |
line 87: " Check if the current bundle name has already been used in this running | |
line 88: " instance and show an error to that effect. | |
line 89: " | |
line 90: " bundle -- a bundle object whose name is to be checked | |
line 91: " return -- 0 if the bundle's name has been seen before, 1 otherwise | |
line 92: " --------------------------------------------------------------------------- | |
line 93: funct! s:check_bundle_name(bundle) | |
line 107: | |
line 108: | |
line 109: " --------------------------------------------------------------------------- | |
line 110: " Parse the options which can be supplied with the bundle specification. | |
line 111: " Corresponding documentation: vundle-plugins-configure | |
line 112: " | |
line 113: " opts -- a dictionary with the user supplied options for the bundle | |
line 114: " return -- a dictionary with the user supplied options for the bundle, this | |
line 115: " will be merged with a s:bundle object into one dictionary. | |
line 116: " --------------------------------------------------------------------------- | |
line 117: func! s:parse_options(opts) | |
line 127: | |
line 128: | |
line 129: " --------------------------------------------------------------------------- | |
line 130: " Parse the plugin specification. Corresponding documentation: | |
line 131: " vundle-plugins-uris | |
line 132: " | |
line 133: " arg -- the string supplied to identify the plugin | |
line 134: " return -- a dictionary with the folder name (key 'name') and the uri (key | |
line 135: " 'uri') for cloning the plugin and the original argument (key | |
line 136: " 'name_spec') | |
line 137: " --------------------------------------------------------------------------- | |
line 138: func! s:parse_name(arg) | |
line 160: | |
line 161: | |
line 162: " --------------------------------------------------------------------------- | |
line 163: " Modify the runtimepath, after all bundles have been added, so that the | |
line 164: " directories that were in the default runtimepath appear first in the list | |
line 165: " (with their 'after' directories last). | |
line 166: " --------------------------------------------------------------------------- | |
line 167: func! s:rtp_add_defaults() | |
line 179: | |
line 180: | |
line 181: " --------------------------------------------------------------------------- | |
line 182: " Remove all paths for the plugins which are managed by Vundle from the | |
line 183: " runtimepath. | |
line 184: " --------------------------------------------------------------------------- | |
line 185: func! s:rtp_rm_a() | |
line 192: | |
line 193: | |
line 194: " --------------------------------------------------------------------------- | |
line 195: " Add all paths for the plugins which are managed by Vundle to the | |
line 196: " runtimepath. | |
line 197: " --------------------------------------------------------------------------- | |
line 198: func! s:rtp_add_a() | |
line 205: | |
line 206: | |
line 207: " --------------------------------------------------------------------------- | |
line 208: " Remove a directory and the corresponding 'after' directory from runtimepath. | |
line 209: " | |
line 210: " dir -- the directory name to be removed as a string. The corresponding | |
line 211: " 'after' directory will also be removed. | |
line 212: " --------------------------------------------------------------------------- | |
line 213: func! s:rtp_rm(dir) abort | |
line 217: | |
line 218: | |
line 219: " --------------------------------------------------------------------------- | |
line 220: " Add a directory and the corresponding 'after' directory to runtimepath. | |
line 221: " | |
line 222: " dir -- the directory name to be added as a string. The corresponding | |
line 223: " 'after' directory will also be added. | |
line 224: " --------------------------------------------------------------------------- | |
line 225: func! s:rtp_add(dir) abort | |
line 229: | |
line 230: | |
line 231: " --------------------------------------------------------------------------- | |
line 232: " Expand and simplify a path. | |
line 233: " | |
line 234: " path -- the path to expand as a string | |
line 235: " return -- the expanded and simplified path | |
line 236: " --------------------------------------------------------------------------- | |
line 237: func! s:expand_path(path) abort | |
line 240: | |
line 241: | |
line 242: " --------------------------------------------------------------------------- | |
line 243: " Find the actual path inside a bundle directory to be added to the | |
line 244: " runtimepath. It might be provided by the user with the 'rtp' option. | |
line 245: " Corresponding documentation: vundle-plugins-configure | |
line 246: " | |
line 247: " opts -- a bundle dict | |
line 248: " return -- expanded path to the corresponding plugin directory | |
line 249: " --------------------------------------------------------------------------- | |
line 250: func! s:rtpath(opts) | |
line 253: | |
line 254: | |
line 255: " --------------------------------------------------------------------------- | |
line 256: " a bundle 'object' | |
line 257: " --------------------------------------------------------------------------- | |
line 258: let s:bundle = {} | |
line 259: | |
line 260: | |
line 261: " --------------------------------------------------------------------------- | |
line 262: " Return the absolute path to the directory inside the bundle directory | |
line 263: " (prefix) where thr bundle will be cloned. | |
line 264: " | |
line 265: " return -- the target location to clone this bundle to | |
line 266: " --------------------------------------------------------------------------- | |
line 267: func! s:bundle.path() | |
line 270: | |
line 271: | |
line 272: " --------------------------------------------------------------------------- | |
line 273: " Determine if the bundle has the pinned attribute set in the config | |
line 274: " | |
line 275: " return -- 1 if the bundle is pinned, 0 otherwise | |
line 276: " --------------------------------------------------------------------------- | |
line 277: func! s:bundle.is_pinned() | |
line 280: | |
line 281: " vim: set expandtab sts=2 ts=2 sw=2 tw=78 norl: | |
finished sourcing /home/migacz/.vim/bundle/Vundle.vim/autoload/vundle/config.vim | |
continuing in function vundle#begin[2]..vundle#rc | |
calling function vundle#begin[2]..vundle#rc[4]..vundle#config#init() | |
line 1: if !exists('g:vundle#bundles') | let g:vundle#bundles = [] | endif | |
line 1: let g:vundle#bundles = [] | endif | |
line 1: endif | |
line 2: call s:rtp_rm_a() | |
calling function vundle#begin[2]..vundle#rc[4]..vundle#config#init[2]..<SNR>6_rtp_rm_a() | |
line 1: let paths = map(copy(g:vundle#bundles), 'v:val.rtpath') | |
line 2: let prepends = join(paths, ',') | |
line 3: let appends = join(paths, '/after,').'/after' | |
line 4: exec 'set rtp-='.fnameescape(prepends) | |
line 4: set rtp-= | |
line 5: exec 'set rtp-='.fnameescape(appends) | |
line 5: set rtp-=/after | |
function vundle#begin[2]..vundle#rc[4]..vundle#config#init[2]..<SNR>6_rtp_rm_a returning #0 | |
continuing in function vundle#begin[2]..vundle#rc[4]..vundle#config#init | |
line 3: let g:vundle#bundles = [] | |
line 4: let s:bundle_names = {} | |
function vundle#begin[2]..vundle#rc[4]..vundle#config#init returning #0 | |
continuing in function vundle#begin[2]..vundle#rc | |
function vundle#begin[2]..vundle#rc returning #0 | |
continuing in function vundle#begin | |
function vundle#begin returning #0 | |
continuing in /home/migacz/.vimrc | |
line 7: " alternatively, pass a path where Vundle should install plugins | |
line 8: "call vundle#begin('~/some/path/here') | |
line 9: | |
line 10: " let Vundle manage Vundle, required | |
line 11: Plugin 'VundleVim/Vundle.vim' | |
line 11: call vundle#config#bundle('VundleVim/Vundle.vim') | |
calling function vundle#config#bundle('VundleVim/Vundle.vim') | |
line 1: let bundle = vundle#config#init_bundle(a:arg, a:000) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle('VundleVim/Vundle.vim', []) | |
line 1: if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') | |
line 2: echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'" | |
line 3: endif | |
line 4: let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep') | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options([]) | |
line 1: " TODO: improve this | |
line 2: if len(a:opts) != 1 | return {} | endif | |
line 2: return {} | endif | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options returning {} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name('VundleVim/Vundle.vim') | |
line 1: let arg = a:arg | |
line 2: let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' | |
line 3: | |
line 4: if arg =~? '^\s*\(gh\|github\):\S\+' || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' | |
line 6: let uri = git_proto.'://github.com/'.split(arg, ':')[-1] | |
line 7: if uri !~? '\.git$' | |
line 8: let uri .= '.git' | |
line 9: endif | |
line 10: let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') | |
line 11: elseif arg =~? '^\s*\(git@\|git://\)\S\+' || arg =~? '\(file\|https\?\)://' || arg =~? '\.git\s*$' | |
line 14: let uri = arg | |
line 15: let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] | |
line 16: else | |
line 17: let name = arg | |
line 18: let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' | |
line 19: endif | |
line 20: return {'name': name, 'uri': uri, 'name_spec': arg } | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name returning {'uri': 'https://github.com/VundleVim/...', 'name_spec': 'VundleVim/Vundle.vim'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 5: let b = extend(opts, copy(s:bundle)) | |
line 6: let b.rtpath = s:rtpath(opts) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath({'uri': 'https://github.com/VundleVim/...Vim/Vundle.vim', 'path': function('1')}) | |
line 1: return has_key(a:opts, 'rtp') ? s:expand_path(a:opts.path().'/'.a:opts.rtp) : a:opts.path() | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1() | |
line 1: return s:expand_path(g:vundle#bundle_dir.'/') . self.name | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 returning '/home/migacz/.vim/bundle/Vundle.vim' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath returning '/home/migacz/.vim/bundle/Vundle.vim' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 7: return b | |
function vundle#config#bundle[1]..vundle#config#init_bundle returning {'uri': 'https://github.com/VundleVim/...Vim/Vundle.vim', 'path': function('1')} | |
continuing in function vundle#config#bundle | |
line 2: if !s:check_bundle_name(bundle) | |
calling function vundle#config#bundle[2]..<SNR>6_check_bundle_name({'uri': 'https://github.com/VundleVim/...Vim/Vundle.vim', 'path': function('1')}) | |
line 1: if has_key(s:bundle_names, a:bundle.name) | |
line 2: echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . '. Plugin ' . s:bundle_names[a:bundle.name] . ' previously used the name "' . a:bundle.name . '"' . '. Skipping Plugin ' . a:bundle.name_spec . '.' | |
line 6: return 0 | |
line 7: elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' | |
line 8: echoerr 'Invalid plugin name: ' . a:bundle.name | |
line 9: return 0 | |
line 10: endif | |
line 11: let s:bundle_names[a:bundle.name] = a:bundle.name_spec | |
line 12: return 1 | |
function vundle#config#bundle[2]..<SNR>6_check_bundle_name returning #1 | |
continuing in function vundle#config#bundle | |
line 3: return | |
line 4: endif | |
line 5: if exists('g:vundle#lazy_load') && g:vundle#lazy_load | |
line 6: call add(g:vundle#bundles, bundle) | |
line 7: else | |
line 8: call s:rtp_rm_a() | |
line 9: call add(g:vundle#bundles, bundle) | |
line 10: call s:rtp_add_a() | |
line 11: call s:rtp_add_defaults() | |
line 12: endif | |
line 13: return bundle | |
function vundle#config#bundle returning {'uri': 'https://github.com/VundleVim/...Vim/Vundle.vim', 'path': function('1')} | |
continuing in /home/migacz/.vimrc | |
line 12: Plugin 'tpope/vim-fugitive' | |
line 12: call vundle#config#bundle('tpope/vim-fugitive') | |
calling function vundle#config#bundle('tpope/vim-fugitive') | |
line 1: let bundle = vundle#config#init_bundle(a:arg, a:000) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle('tpope/vim-fugitive', []) | |
line 1: if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') | |
line 2: echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'" | |
line 3: endif | |
line 4: let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep') | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options([]) | |
line 1: " TODO: improve this | |
line 2: if len(a:opts) != 1 | return {} | endif | |
line 2: return {} | endif | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options returning {} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name('tpope/vim-fugitive') | |
line 1: let arg = a:arg | |
line 2: let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' | |
line 3: | |
line 4: if arg =~? '^\s*\(gh\|github\):\S\+' || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' | |
line 6: let uri = git_proto.'://github.com/'.split(arg, ':')[-1] | |
line 7: if uri !~? '\.git$' | |
line 8: let uri .= '.git' | |
line 9: endif | |
line 10: let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') | |
line 11: elseif arg =~? '^\s*\(git@\|git://\)\S\+' || arg =~? '\(file\|https\?\)://' || arg =~? '\.git\s*$' | |
line 14: let uri = arg | |
line 15: let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] | |
line 16: else | |
line 17: let name = arg | |
line 18: let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' | |
line 19: endif | |
line 20: return {'name': name, 'uri': uri, 'name_spec': arg } | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name returning {'uri': 'https://github.com/tpope/vim-...ve', 'name_spec': 'tpope/vim-fugitive'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 5: let b = extend(opts, copy(s:bundle)) | |
line 6: let b.rtpath = s:rtpath(opts) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath({'uri': 'https://github.com/tpope/vim-...e/vim-fugitive', 'path': function('1')}) | |
line 1: return has_key(a:opts, 'rtp') ? s:expand_path(a:opts.path().'/'.a:opts.rtp) : a:opts.path() | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1() | |
line 1: return s:expand_path(g:vundle#bundle_dir.'/') . self.name | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 returning '/home/migacz/.vim/bundle/vim-fugitive' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath returning '/home/migacz/.vim/bundle/vim-fugitive' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 7: return b | |
function vundle#config#bundle[1]..vundle#config#init_bundle returning {'uri': 'https://github.com/tpope/vim-...e/vim-fugitive', 'path': function('1')} | |
continuing in function vundle#config#bundle | |
line 2: if !s:check_bundle_name(bundle) | |
calling function vundle#config#bundle[2]..<SNR>6_check_bundle_name({'uri': 'https://github.com/tpope/vim-...e/vim-fugitive', 'path': function('1')}) | |
line 1: if has_key(s:bundle_names, a:bundle.name) | |
line 2: echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . '. Plugin ' . s:bundle_names[a:bundle.name] . ' previously used the name "' . a:bundle.name . '"' . '. Skipping Plugin ' . a:bundle.name_spec . '.' | |
line 6: return 0 | |
line 7: elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' | |
line 8: echoerr 'Invalid plugin name: ' . a:bundle.name | |
line 9: return 0 | |
line 10: endif | |
line 11: let s:bundle_names[a:bundle.name] = a:bundle.name_spec | |
line 12: return 1 | |
function vundle#config#bundle[2]..<SNR>6_check_bundle_name returning #1 | |
continuing in function vundle#config#bundle | |
line 3: return | |
line 4: endif | |
line 5: if exists('g:vundle#lazy_load') && g:vundle#lazy_load | |
line 6: call add(g:vundle#bundles, bundle) | |
line 7: else | |
line 8: call s:rtp_rm_a() | |
line 9: call add(g:vundle#bundles, bundle) | |
line 10: call s:rtp_add_a() | |
line 11: call s:rtp_add_defaults() | |
line 12: endif | |
line 13: return bundle | |
function vundle#config#bundle returning {'uri': 'https://github.com/tpope/vim-...e/vim-fugitive', 'path': function('1')} | |
continuing in /home/migacz/.vimrc | |
line 13: Plugin 'L9' | |
line 13: call vundle#config#bundle('L9') | |
calling function vundle#config#bundle('L9') | |
line 1: let bundle = vundle#config#init_bundle(a:arg, a:000) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle('L9', []) | |
line 1: if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') | |
line 2: echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'" | |
line 3: endif | |
line 4: let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep') | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options([]) | |
line 1: " TODO: improve this | |
line 2: if len(a:opts) != 1 | return {} | endif | |
line 2: return {} | endif | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options returning {} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name('L9') | |
line 1: let arg = a:arg | |
line 2: let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' | |
line 3: | |
line 4: if arg =~? '^\s*\(gh\|github\):\S\+' || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' | |
line 6: let uri = git_proto.'://github.com/'.split(arg, ':')[-1] | |
line 7: if uri !~? '\.git$' | |
line 8: let uri .= '.git' | |
line 9: endif | |
line 10: let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') | |
line 11: elseif arg =~? '^\s*\(git@\|git://\)\S\+' || arg =~? '\(file\|https\?\)://' || arg =~? '\.git\s*$' | |
line 14: let uri = arg | |
line 15: let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] | |
line 16: else | |
line 17: let name = arg | |
line 18: let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' | |
line 19: endif | |
line 20: return {'name': name, 'uri': uri, 'name_spec': arg } | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name returning {'uri': 'https://github.com/vim-script....git', 'name': 'L9', 'name_spec': 'L9'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 5: let b = extend(opts, copy(s:bundle)) | |
line 6: let b.rtpath = s:rtpath(opts) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath({'uri': 'https://github.com/vim-script...ame_spec': 'L9', 'path': function('1')}) | |
line 1: return has_key(a:opts, 'rtp') ? s:expand_path(a:opts.path().'/'.a:opts.rtp) : a:opts.path() | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1() | |
line 1: return s:expand_path(g:vundle#bundle_dir.'/') . self.name | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 returning '/home/migacz/.vim/bundle/L9' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath returning '/home/migacz/.vim/bundle/L9' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 7: return b | |
function vundle#config#bundle[1]..vundle#config#init_bundle returning {'uri': 'https://github.com/vim-script...ame_spec': 'L9', 'path': function('1')} | |
continuing in function vundle#config#bundle | |
line 2: if !s:check_bundle_name(bundle) | |
calling function vundle#config#bundle[2]..<SNR>6_check_bundle_name({'uri': 'https://github.com/vim-script...ame_spec': 'L9', 'path': function('1')}) | |
line 1: if has_key(s:bundle_names, a:bundle.name) | |
line 2: echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . '. Plugin ' . s:bundle_names[a:bundle.name] . ' previously used the name "' . a:bundle.name . '"' . '. Skipping Plugin ' . a:bundle.name_spec . '.' | |
line 6: return 0 | |
line 7: elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' | |
line 8: echoerr 'Invalid plugin name: ' . a:bundle.name | |
line 9: return 0 | |
line 10: endif | |
line 11: let s:bundle_names[a:bundle.name] = a:bundle.name_spec | |
line 12: return 1 | |
function vundle#config#bundle[2]..<SNR>6_check_bundle_name returning #1 | |
continuing in function vundle#config#bundle | |
line 3: return | |
line 4: endif | |
line 5: if exists('g:vundle#lazy_load') && g:vundle#lazy_load | |
line 6: call add(g:vundle#bundles, bundle) | |
line 7: else | |
line 8: call s:rtp_rm_a() | |
line 9: call add(g:vundle#bundles, bundle) | |
line 10: call s:rtp_add_a() | |
line 11: call s:rtp_add_defaults() | |
line 12: endif | |
line 13: return bundle | |
function vundle#config#bundle returning {'uri': 'https://github.com/vim-script...ame_spec': 'L9', 'path': function('1')} | |
continuing in /home/migacz/.vimrc | |
line 14: Plugin 'git://git.wincent.com/command-t.git' | |
line 14: call vundle#config#bundle('git://git.wincent.com/command-t.git') | |
calling function vundle#config#bundle('git://git.wincent.com/command-t.git') | |
line 1: let bundle = vundle#config#init_bundle(a:arg, a:000) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle('git://git.wincent.com/command-t.git', []) | |
line 1: if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') | |
line 2: echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'" | |
line 3: endif | |
line 4: let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep') | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options([]) | |
line 1: " TODO: improve this | |
line 2: if len(a:opts) != 1 | return {} | endif | |
line 2: return {} | endif | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options returning {} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name('git://git.wincent.com/command-t.git') | |
line 1: let arg = a:arg | |
line 2: let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' | |
line 3: | |
line 4: if arg =~? '^\s*\(gh\|github\):\S\+' || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' | |
line 6: let uri = git_proto.'://github.com/'.split(arg, ':')[-1] | |
line 7: if uri !~? '\.git$' | |
line 8: let uri .= '.git' | |
line 9: endif | |
line 10: let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') | |
line 11: elseif arg =~? '^\s*\(git@\|git://\)\S\+' || arg =~? '\(file\|https\?\)://' || arg =~? '\.git\s*$' | |
line 14: let uri = arg | |
line 15: let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] | |
line 16: else | |
line 17: let name = arg | |
line 18: let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' | |
line 19: endif | |
line 20: return {'name': name, 'uri': uri, 'name_spec': arg } | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name returning {'uri': 'git://git.wincent.com/command... 'git://git.wincent.com/command-t.git'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 5: let b = extend(opts, copy(s:bundle)) | |
line 6: let b.rtpath = s:rtpath(opts) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath({'uri': 'git://git.wincent.com/command.../command-t.git', 'path': function('1')}) | |
line 1: return has_key(a:opts, 'rtp') ? s:expand_path(a:opts.path().'/'.a:opts.rtp) : a:opts.path() | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1() | |
line 1: return s:expand_path(g:vundle#bundle_dir.'/') . self.name | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 returning '/home/migacz/.vim/bundle/command-t' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath returning '/home/migacz/.vim/bundle/command-t' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 7: return b | |
function vundle#config#bundle[1]..vundle#config#init_bundle returning {'uri': 'git://git.wincent.com/command.../command-t.git', 'path': function('1')} | |
continuing in function vundle#config#bundle | |
line 2: if !s:check_bundle_name(bundle) | |
calling function vundle#config#bundle[2]..<SNR>6_check_bundle_name({'uri': 'git://git.wincent.com/command.../command-t.git', 'path': function('1')}) | |
line 1: if has_key(s:bundle_names, a:bundle.name) | |
line 2: echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . '. Plugin ' . s:bundle_names[a:bundle.name] . ' previously used the name "' . a:bundle.name . '"' . '. Skipping Plugin ' . a:bundle.name_spec . '.' | |
line 6: return 0 | |
line 7: elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' | |
line 8: echoerr 'Invalid plugin name: ' . a:bundle.name | |
line 9: return 0 | |
line 10: endif | |
line 11: let s:bundle_names[a:bundle.name] = a:bundle.name_spec | |
line 12: return 1 | |
function vundle#config#bundle[2]..<SNR>6_check_bundle_name returning #1 | |
continuing in function vundle#config#bundle | |
line 3: return | |
line 4: endif | |
line 5: if exists('g:vundle#lazy_load') && g:vundle#lazy_load | |
line 6: call add(g:vundle#bundles, bundle) | |
line 7: else | |
line 8: call s:rtp_rm_a() | |
line 9: call add(g:vundle#bundles, bundle) | |
line 10: call s:rtp_add_a() | |
line 11: call s:rtp_add_defaults() | |
line 12: endif | |
line 13: return bundle | |
function vundle#config#bundle returning {'uri': 'git://git.wincent.com/command.../command-t.git', 'path': function('1')} | |
continuing in /home/migacz/.vimrc | |
line 15: " The sparkup vim script is in a subdirectory of this repo calle | |
line 16: " Pass the path to set the runtimepath properly. | |
line 17: Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} | |
line 17: call vundle#config#bundle('rstacruz/sparkup', {'rtp': 'vim/'}) | |
calling function vundle#config#bundle('rstacruz/sparkup', {'rtp': 'vim/'}) | |
line 1: let bundle = vundle#config#init_bundle(a:arg, a:000) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle('rstacruz/sparkup', [{'rtp': 'vim/'}]) | |
line 1: if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') | |
line 2: echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'" | |
line 3: endif | |
line 4: let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep') | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options([{'rtp': 'vim/'}]) | |
line 1: " TODO: improve this | |
line 2: if len(a:opts) != 1 | return {} | endif | |
line 2: return {} | endif | |
line 2: endif | |
line 3: | |
line 4: if type(a:opts[0]) == type({}) | |
line 5: return a:opts[0] | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options returning {'rtp': 'vim/'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name('rstacruz/sparkup') | |
line 1: let arg = a:arg | |
line 2: let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' | |
line 3: | |
line 4: if arg =~? '^\s*\(gh\|github\):\S\+' || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' | |
line 6: let uri = git_proto.'://github.com/'.split(arg, ':')[-1] | |
line 7: if uri !~? '\.git$' | |
line 8: let uri .= '.git' | |
line 9: endif | |
line 10: let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') | |
line 11: elseif arg =~? '^\s*\(git@\|git://\)\S\+' || arg =~? '\(file\|https\?\)://' || arg =~? '\.git\s*$' | |
line 14: let uri = arg | |
line 15: let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] | |
line 16: else | |
line 17: let name = arg | |
line 18: let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' | |
line 19: endif | |
line 20: return {'name': name, 'uri': uri, 'name_spec': arg } | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name returning {'uri': 'https://github.com/rstacruz/s...rkup', 'name_spec': 'rstacruz/sparkup'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 5: let b = extend(opts, copy(s:bundle)) | |
line 6: let b.rtpath = s:rtpath(opts) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath({'uri': 'https://github.com/rstacruz/s...tacruz/sparkup', 'path': function('1')}) | |
line 1: return has_key(a:opts, 'rtp') ? s:expand_path(a:opts.path().'/'.a:opts.rtp) : a:opts.path() | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1() | |
line 1: return s:expand_path(g:vundle#bundle_dir.'/') . self.name | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 returning '/home/migacz/.vim/bundle/sparkup' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/sparkup/vim/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/sparkup/vim/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath returning '/home/migacz/.vim/bundle/sparkup/vim/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 7: return b | |
function vundle#config#bundle[1]..vundle#config#init_bundle returning {'uri': 'https://github.com/rstacruz/s...tacruz/sparkup', 'path': function('1')} | |
continuing in function vundle#config#bundle | |
line 2: if !s:check_bundle_name(bundle) | |
calling function vundle#config#bundle[2]..<SNR>6_check_bundle_name({'uri': 'https://github.com/rstacruz/s...tacruz/sparkup', 'path': function('1')}) | |
line 1: if has_key(s:bundle_names, a:bundle.name) | |
line 2: echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . '. Plugin ' . s:bundle_names[a:bundle.name] . ' previously used the name "' . a:bundle.name . '"' . '. Skipping Plugin ' . a:bundle.name_spec . '.' | |
line 6: return 0 | |
line 7: elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' | |
line 8: echoerr 'Invalid plugin name: ' . a:bundle.name | |
line 9: return 0 | |
line 10: endif | |
line 11: let s:bundle_names[a:bundle.name] = a:bundle.name_spec | |
line 12: return 1 | |
function vundle#config#bundle[2]..<SNR>6_check_bundle_name returning #1 | |
continuing in function vundle#config#bundle | |
line 3: return | |
line 4: endif | |
line 5: if exists('g:vundle#lazy_load') && g:vundle#lazy_load | |
line 6: call add(g:vundle#bundles, bundle) | |
line 7: else | |
line 8: call s:rtp_rm_a() | |
line 9: call add(g:vundle#bundles, bundle) | |
line 10: call s:rtp_add_a() | |
line 11: call s:rtp_add_defaults() | |
line 12: endif | |
line 13: return bundle | |
function vundle#config#bundle returning {'uri': 'https://github.com/rstacruz/s...tacruz/sparkup', 'path': function('1')} | |
continuing in /home/migacz/.vimrc | |
line 18: " Install L9 and avoid a Naming conflict if you've already insta | |
line 19: " different version somewhere else. | |
line 20: " Plugin 'ascenator/L9', {'name': 'newL9'} | |
line 21: | |
line 22: " Plugin 'https://github.com/scrooloose/nerdtree.git' | |
line 23: " Plugin 'commentary.vim' | |
line 24: " Plugin 'surround.vim' | |
line 25: " Plugin 'https://github.com/tpope/vim-repeat.git' | |
line 26: " Plugin 'https://github.com/tpope/vim-rhubarb.git' " Enable :Gbrowse, | |
line 27: " Plugin 'https://github.com/mattn/emmet-vim.githttps://github.com/mattn/emmet-vim' | |
line 28: " Plugin 'christoomey/vim-system-copy' | |
line 29: " Plugin 'https://github.com/jremmen/vim-ripgrep.git' | |
line 30: " Plugin 'https://github.com/textlint/textlint-plugin-html' | |
line 31: " Plugin 'https://github.com/Glench/Vim-Jinja2-Syntax.git' | |
line 32: " Plugin 'https://github.com/python-mode/python-mode.git' | |
line 33: " Plugin 'https://github.com/suan/vim-instant-markdown.git' | |
line 34: " Plugin 'https://github.com/rhysd/vim-grammarous.git' | |
line 35: " Plugin 'xuhdev/vim-latex-live-preview' | |
line 36: " Plugin 'https://github.com/dylanaraps/wal.vim.git' | |
line 37: " Plugin 'https://github.com/ap/vim-css-color.git' | |
line 38: " " Snipamte | |
line 39: " Plugin 'MarcWeber/vim-addon-mw-utils' | |
line 40: " Plugin 'tomtom/tlib_vim' | |
line 41: " Plugin 'garbas/vim-snipmate' | |
line 42: " Plugin 'honza/vim-snippets' | |
line 43: " Plugin 'flazz/vim-colorschemes' | |
line 44: " Plugin 'lepture/vim-jinja' | |
line 45: Plugin 'francoiscabrol/ranger.vim' | |
line 45: call vundle#config#bundle('francoiscabrol/ranger.vim') | |
calling function vundle#config#bundle('francoiscabrol/ranger.vim') | |
line 1: let bundle = vundle#config#init_bundle(a:arg, a:000) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle('francoiscabrol/ranger.vim', []) | |
line 1: if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') | |
line 2: echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'" | |
line 3: endif | |
line 4: let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep') | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options([]) | |
line 1: " TODO: improve this | |
line 2: if len(a:opts) != 1 | return {} | endif | |
line 2: return {} | endif | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options returning {} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name('francoiscabrol/ranger.vim') | |
line 1: let arg = a:arg | |
line 2: let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' | |
line 3: | |
line 4: if arg =~? '^\s*\(gh\|github\):\S\+' || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' | |
line 6: let uri = git_proto.'://github.com/'.split(arg, ':')[-1] | |
line 7: if uri !~? '\.git$' | |
line 8: let uri .= '.git' | |
line 9: endif | |
line 10: let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') | |
line 11: elseif arg =~? '^\s*\(git@\|git://\)\S\+' || arg =~? '\(file\|https\?\)://' || arg =~? '\.git\s*$' | |
line 14: let uri = arg | |
line 15: let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] | |
line 16: else | |
line 17: let name = arg | |
line 18: let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' | |
line 19: endif | |
line 20: return {'name': name, 'uri': uri, 'name_spec': arg } | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name returning {'uri': 'https://github.com/francoisca...ame_spec': 'francoiscabrol/ranger.vim'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 5: let b = extend(opts, copy(s:bundle)) | |
line 6: let b.rtpath = s:rtpath(opts) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath({'uri': 'https://github.com/francoisca...rol/ranger.vim', 'path': function('1')}) | |
line 1: return has_key(a:opts, 'rtp') ? s:expand_path(a:opts.path().'/'.a:opts.rtp) : a:opts.path() | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1() | |
line 1: return s:expand_path(g:vundle#bundle_dir.'/') . self.name | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 returning '/home/migacz/.vim/bundle/ranger.vim' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath returning '/home/migacz/.vim/bundle/ranger.vim' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 7: return b | |
function vundle#config#bundle[1]..vundle#config#init_bundle returning {'uri': 'https://github.com/francoisca...rol/ranger.vim', 'path': function('1')} | |
continuing in function vundle#config#bundle | |
line 2: if !s:check_bundle_name(bundle) | |
calling function vundle#config#bundle[2]..<SNR>6_check_bundle_name({'uri': 'https://github.com/francoisca...rol/ranger.vim', 'path': function('1')}) | |
line 1: if has_key(s:bundle_names, a:bundle.name) | |
line 2: echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . '. Plugin ' . s:bundle_names[a:bundle.name] . ' previously used the name "' . a:bundle.name . '"' . '. Skipping Plugin ' . a:bundle.name_spec . '.' | |
line 6: return 0 | |
line 7: elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' | |
line 8: echoerr 'Invalid plugin name: ' . a:bundle.name | |
line 9: return 0 | |
line 10: endif | |
line 11: let s:bundle_names[a:bundle.name] = a:bundle.name_spec | |
line 12: return 1 | |
function vundle#config#bundle[2]..<SNR>6_check_bundle_name returning #1 | |
continuing in function vundle#config#bundle | |
line 3: return | |
line 4: endif | |
line 5: if exists('g:vundle#lazy_load') && g:vundle#lazy_load | |
line 6: call add(g:vundle#bundles, bundle) | |
line 7: else | |
line 8: call s:rtp_rm_a() | |
line 9: call add(g:vundle#bundles, bundle) | |
line 10: call s:rtp_add_a() | |
line 11: call s:rtp_add_defaults() | |
line 12: endif | |
line 13: return bundle | |
function vundle#config#bundle returning {'uri': 'https://github.com/francoisca...rol/ranger.vim', 'path': function('1')} | |
continuing in /home/migacz/.vimrc | |
line 46: " Plugin 'https://github.com/vim-scripts/XML-Folding.git' | |
line 47: " Plugin 'https://github.com/Konfekt/FastFold.git' | |
line 48: " Plugin 'mattn/webapi-vim' | |
line 49: " Plugin 'christoomey/vim-quicklink' | |
line 50: | |
line 51: Plugin 'maksimr/vim-jsbeautify' | |
line 51: call vundle#config#bundle('maksimr/vim-jsbeautify') | |
calling function vundle#config#bundle('maksimr/vim-jsbeautify') | |
line 1: let bundle = vundle#config#init_bundle(a:arg, a:000) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle('maksimr/vim-jsbeautify', []) | |
line 1: if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') | |
line 2: echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'" | |
line 3: endif | |
line 4: let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep') | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options([]) | |
line 1: " TODO: improve this | |
line 2: if len(a:opts) != 1 | return {} | endif | |
line 2: return {} | endif | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_options returning {} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name('maksimr/vim-jsbeautify') | |
line 1: let arg = a:arg | |
line 2: let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' | |
line 3: | |
line 4: if arg =~? '^\s*\(gh\|github\):\S\+' || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' | |
line 6: let uri = git_proto.'://github.com/'.split(arg, ':')[-1] | |
line 7: if uri !~? '\.git$' | |
line 8: let uri .= '.git' | |
line 9: endif | |
line 10: let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') | |
line 11: elseif arg =~? '^\s*\(git@\|git://\)\S\+' || arg =~? '\(file\|https\?\)://' || arg =~? '\.git\s*$' | |
line 14: let uri = arg | |
line 15: let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] | |
line 16: else | |
line 17: let name = arg | |
line 18: let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' | |
line 19: endif | |
line 20: return {'name': name, 'uri': uri, 'name_spec': arg } | |
function vundle#config#bundle[1]..vundle#config#init_bundle[4]..<SNR>6_parse_name returning {'uri': 'https://github.com/maksimr/vi... 'name_spec': 'maksimr/vim-jsbeautify'} | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 5: let b = extend(opts, copy(s:bundle)) | |
line 6: let b.rtpath = s:rtpath(opts) | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath({'uri': 'https://github.com/maksimr/vi...vim-jsbeautify', 'path': function('1')}) | |
line 1: return has_key(a:opts, 'rtp') ? s:expand_path(a:opts.path().'/'.a:opts.rtp) : a:opts.path() | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1() | |
line 1: return s:expand_path(g:vundle#bundle_dir.'/') . self.name | |
calling function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path('/home/migacz/.vim/bundle/') | |
line 1: return simplify(expand(a:path, 1)) | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1[1]..<SNR>6_expand_path returning '/home/migacz/.vim/bundle/' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath[1]..1 returning '/home/migacz/.vim/bundle/vim-jsbeautify' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath | |
function vundle#config#bundle[1]..vundle#config#init_bundle[6]..<SNR>6_rtpath returning '/home/migacz/.vim/bundle/vim-jsbeautify' | |
continuing in function vundle#config#bundle[1]..vundle#config#init_bundle | |
line 7: return b | |
function vundle#config#bundle[1]..vundle#config#init_bundle returning {'uri': 'https://github.com/maksimr/vi...vim-jsbeautify', 'path': function('1')} | |
continuing in function vundle#config#bundle | |
line 2: if !s:check_bundle_name(bundle) | |
calling function vundle#config#bundle[2]..<SNR>6_check_bundle_name({'uri': 'https://github.com/maksimr/vi...vim-jsbeautify', 'path': function('1')}) | |
line 1: if has_key(s:bundle_names, a:bundle.name) | |
line 2: echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . '. Plugin ' . s:bundle_names[a:bundle.name] . ' previously used the name "' . a:bundle.name . '"' . '. Skipping Plugin ' . a:bundle.name_spec . '.' | |
line 6: return 0 | |
line 7: elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' | |
line 8: echoerr 'Invalid plugin name: ' . a:bundle.name | |
line 9: return 0 | |
line 10: endif | |
line 11: let s:bundle_names[a:bundle.name] = a:bundle.name_spec | |
line 12: return 1 | |
function vundle#config#bundle[2]..<SNR>6_check_bundle_name returning #1 | |
continuing in function vundle#config#bundle | |
line 3: return | |
line 4: endif | |
line 5: if exists('g:vundle#lazy_load') && g:vundle#lazy_load | |
line 6: call add(g:vundle#bundles, bundle) | |
line 7: else | |
line 8: call s:rtp_rm_a() | |
line 9: call add(g:vundle#bundles, bundle) | |
line 10: call s:rtp_add_a() | |
line 11: call s:rtp_add_defaults() | |
line 12: endif | |
line 13: return bundle | |
function vundle#config#bundle returning {'uri': 'https://github.com/maksimr/vi...vim-jsbeautify', 'path': function('1')} | |
continuing in /home/migacz/.vimrc | |
line 52: | |
line 53: " | |
line 54: " Plugin 'w0rp/ale' " Async linting | |
line 55: " PLUGIN INSTALLATION SECTION | |
line 56: | |
line 57: " Disabled Plugins | |
line 58: | |
line 59: " Plugin 'ctrlp.vim' | |
line 60: " Plugin 'https://github.com/prettier/vim-prettier.git', { 'do': 'yarn install' } | |
line 61: " Plugin 'https://github.com/jmcomets/vim-pony.git' | |
line 62: " Because of that plugin snippets from snip-mate was not working correctly: | |
line 63: " Plugin 'gabrielelana/vim-markdown' | |
line 64: " Plugin 'https://github.com/tpope/vim-unimpaired.git' | |
line 65: " Plugin 'https://github.com/vim-latex/vim-latex.git' | |
line 66: " Pyton mode is turning pylint aswell so there is collision | |
line 67: | |
line 68: " Plugin 'https://github.com/vim-syntastic/syntastic.git' | |
line 69: " This plugin folds the md files, read more by typing :help fold-expr | |
line 70: " Plugin 'plasticboy/vim-markdown' | |
line 71: " Plugin 'godlygeek/tabular' | |
line 72: " | |
line 73: " Plugin 'https://github.com/vim-scripts/taglist.vim.git' | |
line 74: " Don't work some errors appearing | |
line 75: " Plugin 'https://github.com/Valloric/YouCompleteMe.git' | |
line 76: " Plugin 'https://github.com/yodiaditya/vim-pydjango.git' | |
line 77: " - END PLUGIN LIST - | |
line 78: | |
line 79: call vundle#end() " required | |
calling function vundle#end() | |
line 1: unlet g:vundle#lazy_load | |
line 2: call vundle#config#activate_bundles() | |
calling function vundle#end[2]..vundle#config#activate_bundles() | |
line 1: call s:rtp_add_a() | |
calling function vundle#end[2]..vundle#config#activate_bundles[1]..<SNR>6_rtp_add_a() | |
line 1: let paths = map(copy(g:vundle#bundles), 'v:val.rtpath') | |
line 2: let prepends = join(paths, ',') | |
line 3: let appends = join(paths, '/after,').'/after' | |
line 4: exec 'set rtp^='.fnameescape(prepends) | |
line 4: set rtp^=/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify | |
line 5: exec 'set rtp+='.fnameescape(appends) | |
line 5: set rtp+=/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after | |
function vundle#end[2]..vundle#config#activate_bundles[1]..<SNR>6_rtp_add_a returning #0 | |
continuing in function vundle#end[2]..vundle#config#activate_bundles | |
line 2: call s:rtp_add_defaults() | |
calling function vundle#end[2]..vundle#config#activate_bundles[2]..<SNR>6_rtp_add_defaults() | |
line 1: let current = &rtp | |
line 2: set rtp&vim | |
line 3: let default = &rtp | |
line 4: let &rtp = current | |
line 5: let default_rtp_items = split(default, ',') | |
line 6: if !empty(default_rtp_items) | |
line 7: let first_item = fnameescape(default_rtp_items[0]) | |
line 8: exec 'set rtp-=' . first_item | |
line 8: set rtp-=/home/migacz/.vim | |
line 9: exec 'set rtp^=' . first_item | |
line 9: set rtp^=/home/migacz/.vim | |
line 10: endif | |
function vundle#end[2]..vundle#config#activate_bundles[2]..<SNR>6_rtp_add_defaults returning #0 | |
continuing in function vundle#end[2]..vundle#config#activate_bundles | |
function vundle#end[2]..vundle#config#activate_bundles returning #0 | |
continuing in function vundle#end | |
function vundle#end returning #0 | |
continuing in /home/migacz/.vimrc | |
line 80: filetype plugin indent on " required | |
Searching for "filetype.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/filetype.vim" | |
Searching for "/usr/share/vim/vimfiles/filetype.vim" | |
Searching for "/usr/share/vim/vim81/filetype.vim" | |
chdir(/usr/share/vim/vim81) | |
fchdir() to previous dir | |
line 80: sourcing "/usr/share/vim/vim81/filetype.vim" | |
line 1: " Vim support file to detect file types | |
line 2: " | |
line 3: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 4: " Last Change:^I2019 Jan 28 | |
line 5: | |
line 6: " Listen very carefully, I will say this only once | |
line 7: if exists("did_load_filetypes") | |
line 8: finish | |
line 9: endif | |
line 10: let did_load_filetypes = 1 | |
line 11: | |
line 12: " Line continuation is used here, remove 'C' from 'cpoptions' | |
line 13: let s:cpo_save = &cpo | |
line 14: set cpo&vim | |
line 15: | |
line 16: augroup filetypedetect | |
line 17: | |
line 18: " Ignored extensions | |
line 19: if exists("*fnameescape") | |
line 21: 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")) | |
line 28: 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 | |
line 32: au BufNewFile,BufRead ?\+.in if expand("<afile>:t") != "configure.in" | exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) | endif | |
line 33: elseif &verbose > 0 | |
line 34: echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()" | |
line 35: endif | |
line 36: | |
line 37: " Pattern used to match file names which should not be inspected. | |
line 38: " Currently finds compressed files. | |
line 39: if !exists("g:ft_ignore_pat") | |
line 40: let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$' | |
line 41: endif | |
line 42: | |
line 43: " Function used for patterns that end in a star: don't set the filetype if the | |
line 44: " file name matches ft_ignore_pat. | |
line 45: func! s:StarSetf(ft) | |
line 50: | |
line 51: " Vim help file | |
line 52: au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt^Isetf help | |
line 53: | |
line 54: " Abaqus or Trasys | |
line 55: au BufNewFile,BufRead *.inp^I^I^Icall dist#ft#Check_inp() | |
line 56: | |
line 57: " A-A-P recipe | |
line 58: au BufNewFile,BufRead *.aap^I^I^Isetf aap | |
line 59: | |
line 60: " A2ps printing utility | |
line 61: au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps | |
line 62: | |
line 63: " ABAB/4 | |
line 64: au BufNewFile,BufRead *.abap^I^I^Isetf abap | |
line 65: | |
line 66: " ABC music notation | |
line 67: au BufNewFile,BufRead *.abc^I^I^Isetf abc | |
line 68: | |
line 69: " ABEL | |
line 70: au BufNewFile,BufRead *.abl^I^I^Isetf abel | |
line 71: | |
line 72: " AceDB | |
line 73: au BufNewFile,BufRead *.wrm^I^I^Isetf acedb | |
line 74: | |
line 75: " Ada (83, 9X, 95) | |
line 76: au BufNewFile,BufRead *.adb,*.ads,*.ada^I^Isetf ada | |
line 77: if has("vms") | |
line 78: au BufNewFile,BufRead *.gpr,*.ada_m,*.adc^Isetf ada | |
line 79: else | |
line 80: au BufNewFile,BufRead *.gpr^I^I^Isetf ada | |
line 81: endif | |
line 82: | |
line 83: " AHDL | |
line 84: au BufNewFile,BufRead *.tdf^I^I^Isetf ahdl | |
line 85: | |
line 86: " AMPL | |
line 87: au BufNewFile,BufRead *.run^I^I^Isetf ampl | |
line 88: | |
line 89: " Ant | |
line 90: au BufNewFile,BufRead build.xml^I^I^Isetf ant | |
line 91: | |
line 92: " Arduino | |
line 93: au BufNewFile,BufRead *.ino,*.pde^I^Isetf arduino | |
line 94: | |
line 95: " Apache style config file | |
line 96: au BufNewFile,BufRead proftpd.conf*^I^Icall s:StarSetf('apachestyle') | |
line 97: | |
line 98: " Apache config file | |
line 99: au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf^I^Isetf apache | |
line 100: au BufNewFile,BufRead */etc/apache2/sites-*/*.com^I^Isetf apache | |
line 101: | |
line 102: " XA65 MOS6510 cross assembler | |
line 103: au BufNewFile,BufRead *.a65^I^I^Isetf a65 | |
line 104: | |
line 105: " Applescript | |
line 106: au BufNewFile,BufRead *.scpt^I^I^Isetf applescript | |
line 107: | |
line 108: " Applix ELF | |
line 110: au BufNewFile,BufRead *.am if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif | |
line 111: | |
line 112: " ALSA configuration | |
line 113: au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf | |
line 114: | |
line 115: " Arc Macro Language | |
line 116: au BufNewFile,BufRead *.aml^I^I^Isetf aml | |
line 117: | |
line 118: " APT config file | |
line 119: au BufNewFile,BufRead apt.conf^I^I setf aptconf | |
line 120: au BufNewFile,BufRead */.aptitude/config setf aptconf | |
line 121: au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf | |
line 122: | |
line 123: " Arch Inventory file | |
line 124: au BufNewFile,BufRead .arch-inventory,=tagging-method^Isetf arch | |
line 125: | |
line 126: " ART*Enterprise (formerly ART-IM) | |
line 127: au BufNewFile,BufRead *.art^I^I^Isetf art | |
line 128: | |
line 129: " AsciiDoc | |
line 130: au BufNewFile,BufRead *.asciidoc,*.adoc^I^Isetf asciidoc | |
line 131: | |
line 132: " ASN.1 | |
line 133: au BufNewFile,BufRead *.asn,*.asn1^I^Isetf asn | |
line 134: | |
line 135: " Active Server Pages (with Visual Basic Script) | |
line 141: au BufNewFile,BufRead *.asa if exists("g:filetype_asa") | exe "setf " . g:filetype_asa | else | setf aspvbs | endif | |
line 142: | |
line 143: " Active Server Pages (with Perl or Visual Basic Script) | |
line 151: 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 | |
line 152: | |
line 153: " Grub (must be before catch *.lst) | |
line 154: au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub | |
line 155: | |
line 156: " Assembly (all kinds) | |
line 157: " *.lst is not pure assembly, it has two extra columns (address, byte codes) | |
line 158: au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst^Icall dist#ft#FTasm() | |
line 159: | |
line 160: " Macro (VAX) | |
line 161: au BufNewFile,BufRead *.mar^I^I^Isetf vmasm | |
line 162: | |
line 163: " Atlas | |
line 164: au BufNewFile,BufRead *.atl,*.as^I^Isetf atlas | |
line 165: | |
line 166: " Autoit v3 | |
line 167: au BufNewFile,BufRead *.au3^I^I^Isetf autoit | |
line 168: | |
line 169: " Autohotkey | |
line 170: au BufNewFile,BufRead *.ahk^I^I^Isetf autohotkey | |
line 171: | |
line 172: " Automake | |
line 173: au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am^Isetf automake | |
line 174: | |
line 175: " Autotest .at files are actually m4 | |
line 176: au BufNewFile,BufRead *.at^I^I^Isetf m4 | |
line 177: | |
line 178: " Avenue | |
line 179: au BufNewFile,BufRead *.ave^I^I^Isetf ave | |
line 180: | |
line 181: " Awk | |
line 182: au BufNewFile,BufRead *.awk^I^I^Isetf awk | |
line 183: | |
line 184: " B | |
line 185: au BufNewFile,BufRead *.mch,*.ref,*.imp^I^Isetf b | |
line 186: | |
line 187: " BASIC or Visual Basic | |
line 188: au BufNewFile,BufRead *.bas^I^I^Icall dist#ft#FTVB("basic") | |
line 189: | |
line 190: " Visual Basic Script (close to Visual Basic) or Visual Basic .NET | |
line 191: au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl^Isetf vb | |
line 192: | |
line 193: " IBasic file (similar to QBasic) | |
line 194: au BufNewFile,BufRead *.iba,*.ibi^I^Isetf ibasic | |
line 195: | |
line 196: " FreeBasic file (similar to QBasic) | |
line 197: au BufNewFile,BufRead *.fb,*.bi^I^I^Isetf freebasic | |
line 198: | |
line 199: " Batch file for MSDOS. | |
line 200: au BufNewFile,BufRead *.bat,*.sys^I^Isetf dosbatch | |
line 201: " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. | |
line 203: au BufNewFile,BufRead *.cmd if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif | |
line 204: | |
line 205: " Batch file for 4DOS | |
line 206: au BufNewFile,BufRead *.btm^I^I^Icall dist#ft#FTbtm() | |
line 207: | |
line 208: " BC calculator | |
line 209: au BufNewFile,BufRead *.bc^I^I^Isetf bc | |
line 210: | |
line 211: " BDF font | |
line 212: au BufNewFile,BufRead *.bdf^I^I^Isetf bdf | |
line 213: | |
line 214: " BibTeX bibliography database file | |
line 215: au BufNewFile,BufRead *.bib^I^I^Isetf bib | |
line 216: | |
line 217: " BibTeX Bibliography Style | |
line 218: au BufNewFile,BufRead *.bst^I^I^Isetf bst | |
line 219: | |
line 220: " BIND configuration | |
line 221: " sudoedit uses namedXXXX.conf | |
line 222: au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key^Isetf named | |
line 223: | |
line 224: " BIND zone | |
line 225: au BufNewFile,BufRead named.root^I^Isetf bindzone | |
line 226: au BufNewFile,BufRead *.db^I^I^Icall dist#ft#BindzoneCheck('') | |
line 227: | |
line 228: " Blank | |
line 229: au BufNewFile,BufRead *.bl^I^I^Isetf blank | |
line 230: | |
line 231: " Blkid cache file | |
line 232: au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml | |
line 233: | |
line 234: " Bazel (http://bazel.io) | |
line 235: autocmd BufRead,BufNewFile *.bzl,WORKSPACE,BUILD.bazel ^Isetf bzl | |
line 236: if has("fname_case") | |
line 237: " There is another check for BUILD further below. | |
line 238: autocmd BufRead,BufNewFile BUILD^I^I^Isetf bzl | |
line 239: endif | |
line 240: | |
line 241: " C or lpc | |
line 242: au BufNewFile,BufRead *.c^I^I^Icall dist#ft#FTlpc() | |
line 243: au BufNewFile,BufRead *.lpc,*.ulpc^I^Isetf lpc | |
line 244: | |
line 245: " Calendar | |
line 246: au BufNewFile,BufRead calendar^I^I^Isetf calendar | |
line 247: | |
line 248: " C# | |
line 249: au BufNewFile,BufRead *.cs^I^I^Isetf cs | |
line 250: | |
line 251: " CSDL | |
line 252: au BufNewFile,BufRead *.csdl^I^I^Isetf csdl | |
line 253: | |
line 254: " Cabal | |
line 255: au BufNewFile,BufRead *.cabal^I^I^Isetf cabal | |
line 256: | |
line 257: " Cdrdao TOC | |
line 258: au BufNewFile,BufRead *.toc^I^I^Isetf cdrtoc | |
line 259: | |
line 260: " Cdrdao config | |
line 261: au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao^Isetf cdrdaoconf | |
line 262: | |
line 263: " Cfengine | |
line 264: au BufNewFile,BufRead cfengine.conf^I^Isetf cfengine | |
line 265: | |
line 266: " ChaiScript | |
line 267: au BufRead,BufNewFile *.chai^I^I^Isetf chaiscript | |
line 268: | |
line 269: " Comshare Dimension Definition Language | |
line 270: au BufNewFile,BufRead *.cdl^I^I^Isetf cdl | |
line 271: | |
line 272: " Conary Recipe | |
line 273: au BufNewFile,BufRead *.recipe^I^I^Isetf conaryrecipe | |
line 274: | |
line 275: " Controllable Regex Mutilator | |
line 276: au BufNewFile,BufRead *.crm^I^I^Isetf crm | |
line 277: | |
line 278: " Cyn++ | |
line 279: au BufNewFile,BufRead *.cyn^I^I^Isetf cynpp | |
line 280: | |
line 281: " Cynlib | |
line 282: " .cc and .cpp files can be C++ or Cynlib. | |
line 284: au BufNewFile,BufRead *.cc if exists("cynlib_syntax_for_cc")|setf cynlib|else|setf cpp|endif | |
line 286: au BufNewFile,BufRead *.cpp if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif | |
line 287: | |
line 288: " C++ | |
line 289: au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp | |
line 290: if has("fname_case") | |
line 291: au BufNewFile,BufRead *.C,*.H setf cpp | |
line 292: endif | |
line 293: | |
line 294: " .h files can be C, Ch C++, ObjC or ObjC++. | |
line 295: " Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is | |
line 296: " detected automatically. | |
line 297: au BufNewFile,BufRead *.h^I^I^Icall dist#ft#FTheader() | |
line 298: | |
line 299: " Ch (CHscript) | |
line 300: au BufNewFile,BufRead *.chf^I^I^Isetf ch | |
line 301: | |
line 302: " TLH files are C++ headers generated by Visual C++'s #import from typelibs | |
line 303: au BufNewFile,BufRead *.tlh^I^I^Isetf cpp | |
line 304: | |
line 305: " Cascading Style Sheets | |
line 306: au BufNewFile,BufRead *.css^I^I^Isetf css | |
line 307: | |
line 308: " Century Term Command Scripts (*.cmd too) | |
line 309: au BufNewFile,BufRead *.con^I^I^Isetf cterm | |
line 310: | |
line 311: " Changelog | |
line 313: au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch^Isetf debchangelog | |
line 314: | |
line 320: au BufNewFile,BufRead [cC]hange[lL]og if getline(1) =~ '; urgency='| setf debchangelog| else| setf changelog| endif | |
line 321: | |
line 325: au BufNewFile,BufRead NEWS if getline(1) =~ '; urgency='| setf debchangelog| endif | |
line 326: | |
line 327: " CHILL | |
line 328: au BufNewFile,BufRead *..ch^I^I^Isetf chill | |
line 329: | |
line 330: " Changes for WEB and CWEB or CHILL | |
line 331: au BufNewFile,BufRead *.ch^I^I^Icall dist#ft#FTchange() | |
line 332: | |
line 333: " ChordPro | |
line 334: au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro^Isetf chordpro | |
line 335: | |
line 336: " Clean | |
line 337: au BufNewFile,BufRead *.dcl,*.icl^I^Isetf clean | |
line 338: | |
line 339: " Clever | |
line 340: au BufNewFile,BufRead *.eni^I^I^Isetf cl | |
line 341: | |
line 342: " Clever or dtd | |
line 343: au BufNewFile,BufRead *.ent^I^I^Icall dist#ft#FTent() | |
line 344: | |
line 345: " Clipper (or FoxPro; could also be eviews) | |
line 351: au BufNewFile,BufRead *.prg if exists("g:filetype_prg") | exe "setf " . g:filetype_prg | else | setf clipper | endif | |
line 352: | |
line 353: " Clojure | |
line 354: au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc^I^Isetf clojure | |
line 355: | |
line 356: " Cmake | |
line 357: au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in^I^Isetf cmake | |
line 358: | |
line 359: " Cmusrc | |
line 360: au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc | |
line 361: au BufNewFile,BufRead */cmus/{rc,*.theme}^I^I^Isetf cmusrc | |
line 362: | |
line 363: " Cobol | |
line 364: au BufNewFile,BufRead *.cbl,*.cob,*.lib^Isetf cobol | |
line 365: " cobol or zope form controller python script? (heuristic) | |
line 371: au BufNewFile,BufRead *.cpy if getline(1) =~ '^##' | setf python | else | setf cobol | endif | |
line 372: | |
line 373: " Coco/R | |
line 374: au BufNewFile,BufRead *.atg^I^I^Isetf coco | |
line 375: | |
line 376: " Cold Fusion | |
line 377: au BufNewFile,BufRead *.cfm,*.cfi,*.cfc^I^Isetf cf | |
line 378: | |
line 379: " Configure scripts | |
line 380: au BufNewFile,BufRead configure.in,configure.ac setf config | |
line 381: | |
line 382: " CUDA Cumpute Unified Device Architecture | |
line 383: au BufNewFile,BufRead *.cu,*.cuh^I^Isetf cuda | |
line 384: | |
line 385: " Dockerfile | |
line 386: au BufNewFile,BufRead Dockerfile,*.Dockerfile^Isetf dockerfile | |
line 387: | |
line 388: " WildPackets EtherPeek Decoder | |
line 389: au BufNewFile,BufRead *.dcd^I^I^Isetf dcd | |
line 390: | |
line 391: " Enlightenment configuration files | |
line 392: au BufNewFile,BufRead *enlightenment/*.cfg^Isetf c | |
line 393: | |
line 394: " Eterm | |
line 395: au BufNewFile,BufRead *Eterm/*.cfg^I^Isetf eterm | |
line 396: | |
line 397: " Euphoria 3 or 4 | |
line 398: au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck() | |
line 399: if has("fname_case") | |
line 400: au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck() | |
line 401: endif | |
line 402: | |
line 403: " Lynx config files | |
line 404: au BufNewFile,BufRead lynx.cfg^I^I^Isetf lynx | |
line 405: | |
line 406: " Quake | |
line 407: au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg^Isetf quake | |
line 408: au BufNewFile,BufRead *quake[1-3]/*.cfg^I^I^Isetf quake | |
line 409: | |
line 410: " Quake C | |
line 411: au BufNewFile,BufRead *.qc^I^I^Isetf c | |
line 412: | |
line 413: " Configure files | |
line 414: au BufNewFile,BufRead *.cfg^I^I^Isetf cfg | |
line 415: | |
line 416: " Cucumber | |
line 417: au BufNewFile,BufRead *.feature^I^I^Isetf cucumber | |
line 418: | |
line 419: " Communicating Sequential Processes | |
line 420: au BufNewFile,BufRead *.csp,*.fdr^I^Isetf csp | |
line 421: | |
line 422: " CUPL logic description and simulation | |
line 423: au BufNewFile,BufRead *.pld^I^I^Isetf cupl | |
line 424: au BufNewFile,BufRead *.si^I^I^Isetf cuplsim | |
line 425: | |
line 426: " Debian Control | |
line 427: au BufNewFile,BufRead */debian/control^I^Isetf debcontrol | |
line 431: au BufNewFile,BufRead control if getline(1) =~ '^Source:'| setf debcontrol| endif | |
line 432: | |
line 433: " Debian Copyright | |
line 434: au BufNewFile,BufRead */debian/copyright^Isetf debcopyright | |
line 438: au BufNewFile,BufRead copyright if getline(1) =~ '^Format:'| setf debcopyright| endif | |
line 439: | |
line 440: " Debian Sources.list | |
line 441: au BufNewFile,BufRead */etc/apt/sources.list^I^Isetf debsources | |
line 442: au BufNewFile,BufRead */etc/apt/sources.list.d/*.list^Isetf debsources | |
line 443: | |
line 444: " Deny hosts | |
line 445: au BufNewFile,BufRead denyhosts.conf^I^Isetf denyhosts | |
line 446: | |
line 447: " dnsmasq(8) configuration files | |
line 448: au BufNewFile,BufRead */etc/dnsmasq.conf^Isetf dnsmasq | |
line 449: | |
line 450: " ROCKLinux package description | |
line 451: au BufNewFile,BufRead *.desc^I^I^Isetf desc | |
line 452: | |
line 453: " the D language or dtrace | |
line 454: au BufNewFile,BufRead *.d^I^I^Icall dist#ft#DtraceCheck() | |
line 455: | |
line 456: " Desktop files | |
line 457: au BufNewFile,BufRead *.desktop,.directory^Isetf desktop | |
line 458: | |
line 459: " Dict config | |
line 460: au BufNewFile,BufRead dict.conf,.dictrc^I^Isetf dictconf | |
line 461: | |
line 462: " Dictd config | |
line 463: au BufNewFile,BufRead dictd.conf^I^Isetf dictdconf | |
line 464: | |
line 465: " Diff files | |
line 466: au BufNewFile,BufRead *.diff,*.rej^I^Isetf diff | |
line 472: au BufNewFile,BufRead *.patch if getline(1) =~ '^From [0-9a-f]\{40\} Mon Sep 17 00:00:00 2001$' | setf gitsendemail | else | setf diff | endif | |
line 473: | |
line 474: " Dircolors | |
line 475: au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS^Isetf dircolors | |
line 476: | |
line 477: " Diva (with Skill) or InstallShield | |
line 483: au BufNewFile,BufRead *.rul if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' | setf ishd | else | setf diva | endif | |
line 484: | |
line 485: " DCL (Digital Command Language - vms) or DNS zone file | |
line 486: au BufNewFile,BufRead *.com^I^I^Icall dist#ft#BindzoneCheck('dcl') | |
line 487: | |
line 488: " DOT | |
line 489: au BufNewFile,BufRead *.dot^I^I^Isetf dot | |
line 490: | |
line 491: " Dylan - lid files | |
line 492: au BufNewFile,BufRead *.lid^I^I^Isetf dylanlid | |
line 493: | |
line 494: " Dylan - intr files (melange) | |
line 495: au BufNewFile,BufRead *.intr^I^I^Isetf dylanintr | |
line 496: | |
line 497: " Dylan | |
line 498: au BufNewFile,BufRead *.dylan^I^I^Isetf dylan | |
line 499: | |
line 500: " Microsoft Module Definition | |
line 501: au BufNewFile,BufRead *.def^I^I^Isetf def | |
line 502: | |
line 503: " Dracula | |
line 504: au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe^Isetf dracula | |
line 505: | |
line 506: " Datascript | |
line 507: au BufNewFile,BufRead *.ds^I^I^Isetf datascript | |
line 508: | |
line 509: " dsl | |
line 510: au BufNewFile,BufRead *.dsl^I^I^Isetf dsl | |
line 511: | |
line 512: " DTD (Document Type Definition for XML) | |
line 513: au BufNewFile,BufRead *.dtd^I^I^Isetf dtd | |
line 514: | |
line 515: " DTS/DSTI (device tree files) | |
line 516: au BufNewFile,BufRead *.dts,*.dtsi^I^Isetf dts | |
line 517: | |
line 518: " EDIF (*.edf,*.edif,*.edn,*.edo) or edn | |
line 519: au BufNewFile,BufRead *.ed\(f\|if\|o\)^I^Isetf edif | |
line 525: au BufNewFile,BufRead *.edn if getline(1) =~ '^\s*(\s*edif\>' | setf edif | else | setf clojure | endif | |
line 526: | |
line 527: " EditorConfig (close enough to dosini) | |
line 528: au BufNewFile,BufRead .editorconfig^I^Isetf dosini | |
line 529: | |
line 530: " Embedix Component Description | |
line 531: au BufNewFile,BufRead *.ecd^I^I^Isetf ecd | |
line 532: | |
line 533: " Eiffel or Specman or Euphoria | |
line 534: au BufNewFile,BufRead *.e,*.E^I^I^Icall dist#ft#FTe() | |
line 535: | |
line 536: " Elinks configuration | |
line 537: au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf^Isetf elinks | |
line 538: | |
line 539: " ERicsson LANGuage; Yaws is erlang too | |
line 540: au BufNewFile,BufRead *.erl,*.hrl,*.yaws^Isetf erlang | |
line 541: | |
line 542: " Elm Filter Rules file | |
line 543: au BufNewFile,BufRead filter-rules^I^Isetf elmfilt | |
line 544: | |
line 545: " ESMTP rc file | |
line 546: au BufNewFile,BufRead *esmtprc^I^I^Isetf esmtprc | |
line 547: | |
line 548: " ESQL-C | |
line 549: au BufNewFile,BufRead *.ec,*.EC^I^I^Isetf esqlc | |
line 550: | |
line 551: " Esterel | |
line 552: au BufNewFile,BufRead *.strl^I^I^Isetf esterel | |
line 553: | |
line 554: " Essbase script | |
line 555: au BufNewFile,BufRead *.csc^I^I^Isetf csc | |
line 556: | |
line 557: " Exim | |
line 558: au BufNewFile,BufRead exim.conf^I^I^Isetf exim | |
line 559: | |
line 560: " Expect | |
line 561: au BufNewFile,BufRead *.exp^I^I^Isetf expect | |
line 562: | |
line 563: " Exports | |
line 564: au BufNewFile,BufRead exports^I^I^Isetf exports | |
line 565: | |
line 566: " Falcon | |
line 567: au BufNewFile,BufRead *.fal^I^I^Isetf falcon | |
line 568: | |
line 569: " Fantom | |
line 570: au BufNewFile,BufRead *.fan,*.fwt^I^Isetf fan | |
line 571: | |
line 572: " Factor | |
line 573: au BufNewFile,BufRead *.factor^I^I^Isetf factor | |
line 574: | |
line 575: " Fetchmail RC file | |
line 576: au BufNewFile,BufRead .fetchmailrc^I^Isetf fetchmail | |
line 577: | |
line 578: " FlexWiki - disabled, because it has side effects when a .wiki file | |
line 579: " is not actually FlexWiki | |
line 580: "au BufNewFile,BufRead *.wiki^I^I^Isetf flexwiki | |
line 581: | |
line 582: " Focus Executable | |
line 583: au BufNewFile,BufRead *.fex,*.focexec^I^Isetf focexec | |
line 584: | |
line 585: " Focus Master file (but not for auto.master) | |
line 586: au BufNewFile,BufRead auto.master^I^Isetf conf | |
line 587: au BufNewFile,BufRead *.mas,*.master^I^Isetf master | |
line 588: | |
line 589: " Forth | |
line 590: au BufNewFile,BufRead *.fs,*.ft,*.fth^I^Isetf forth | |
line 591: | |
line 592: " Reva Forth | |
line 593: au BufNewFile,BufRead *.frt^I^I^Isetf reva | |
line 594: | |
line 595: " Fortran | |
line 596: if has("fname_case") | |
line 597: au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08^I setf fortran | |
line 598: endif | |
line 599: au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran | |
line 600: | |
line 601: " Framescript | |
line 602: au BufNewFile,BufRead *.fsl^I^I^Isetf framescript | |
line 603: | |
line 604: " FStab | |
line 605: au BufNewFile,BufRead fstab,mtab^I^Isetf fstab | |
line 606: | |
line 607: " GDB command files | |
line 608: au BufNewFile,BufRead .gdbinit^I^I^Isetf gdb | |
line 609: | |
line 610: " GDMO | |
line 611: au BufNewFile,BufRead *.mo,*.gdmo^I^Isetf gdmo | |
line 612: | |
line 613: " Gedcom | |
line 614: au BufNewFile,BufRead *.ged,lltxxxxx.txt^Isetf gedcom | |
line 615: | |
line 616: " Git | |
line 617: au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG ^Isetf gitcommit | |
line 618: au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig ^Isetf gitconfig | |
line 619: au BufNewFile,BufRead */.config/git/config^I^I^Isetf gitconfig | |
line 620: au BufNewFile,BufRead .gitmodules,*.git/modules/*/config^Isetf gitconfig | |
line 621: if !empty($XDG_CONFIG_HOME) | |
line 622: au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config^I^Isetf gitconfig | |
line 623: endif | |
line 624: au BufNewFile,BufRead git-rebase-todo^I^Isetf gitrebase | |
line 625: au BufRead,BufNewFile .gitsendemail.msg.??????^Isetf gitsendemail | |
line 629: au BufNewFile,BufRead .msg.[0-9]* if getline(1) =~ '^From.*# This line is ignored.$' | setf gitsendemail | endif | |
line 633: au BufNewFile,BufRead *.git/* if getline(1) =~ '^\x\{40\}\>\|^ref: ' | setf git | endif | |
line 634: | |
line 635: " Gkrellmrc | |
line 636: au BufNewFile,BufRead gkrellmrc,gkrellmrc_?^Isetf gkrellmrc | |
line 637: | |
line 638: " GP scripts (2.0 and onward) | |
line 639: au BufNewFile,BufRead *.gp,.gprc^I^Isetf gp | |
line 640: | |
line 641: " GPG | |
line 642: au BufNewFile,BufRead */.gnupg/options^I^Isetf gpg | |
line 643: au BufNewFile,BufRead */.gnupg/gpg.conf^I^Isetf gpg | |
line 644: au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg | |
line 645: if !empty($GNUPGHOME) | |
line 646: au BufNewFile,BufRead $GNUPGHOME/options^Isetf gpg | |
line 647: au BufNewFile,BufRead $GNUPGHOME/gpg.conf^Isetf gpg | |
line 648: endif | |
line 649: | |
line 650: " gnash(1) configuration files | |
line 651: au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash | |
line 652: | |
line 653: " Gitolite | |
line 654: au BufNewFile,BufRead gitolite.conf^I^Isetf gitolite | |
line 655: au BufNewFile,BufRead */gitolite-admin/conf/*^Icall s:StarSetf('gitolite') | |
line 656: au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc^Isetf perl | |
line 657: | |
line 658: " Gnuplot scripts | |
line 659: au BufNewFile,BufRead *.gpi^I^I^Isetf gnuplot | |
line 660: | |
line 661: " Go (Google) | |
line 662: au BufNewFile,BufRead *.go^I^I^Isetf go | |
line 663: | |
line 664: " GrADS scripts | |
line 665: au BufNewFile,BufRead *.gs^I^I^Isetf grads | |
line 666: | |
line 667: " Gretl | |
line 668: au BufNewFile,BufRead *.gretl^I^I^Isetf gretl | |
line 669: | |
line 670: " Groovy | |
line 671: au BufNewFile,BufRead *.gradle,*.groovy^I^Isetf groovy | |
line 672: | |
line 673: " GNU Server Pages | |
line 674: au BufNewFile,BufRead *.gsp^I^I^Isetf gsp | |
line 675: | |
line 676: " Group file | |
line 677: 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 | |
line 678: | |
line 679: " GTK RC | |
line 680: au BufNewFile,BufRead .gtkrc,gtkrc^I^Isetf gtkrc | |
line 681: | |
line 682: " Haml | |
line 683: au BufNewFile,BufRead *.haml^I^I^Isetf haml | |
line 684: | |
line 685: " Hamster Classic | Playground files | |
line 686: au BufNewFile,BufRead *.hsc,*.hsm^I^Isetf hamster | |
line 687: | |
line 688: " Haskell | |
line 689: au BufNewFile,BufRead *.hs,*.hs-boot^I^Isetf haskell | |
line 690: au BufNewFile,BufRead *.lhs^I^I^Isetf lhaskell | |
line 691: au BufNewFile,BufRead *.chs^I^I^Isetf chaskell | |
line 692: | |
line 693: " Haste | |
line 694: au BufNewFile,BufRead *.ht^I^I^Isetf haste | |
line 695: au BufNewFile,BufRead *.htpp^I^I^Isetf hastepreproc | |
line 696: | |
line 697: " Hercules | |
line 698: au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum^Isetf hercules | |
line 699: | |
line 700: " HEX (Intel) | |
line 701: au BufNewFile,BufRead *.hex,*.h32^I^Isetf hex | |
line 702: | |
line 703: " Tilde (must be before HTML) | |
line 704: au BufNewFile,BufRead *.t.html^I^I^Isetf tilde | |
line 705: | |
line 706: " HTML (.shtml and .stm for server side) | |
line 707: au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() | |
line 708: | |
line 709: " HTML with Ruby - eRuby | |
line 710: au BufNewFile,BufRead *.erb,*.rhtml^I^Isetf eruby | |
line 711: | |
line 712: " HTML with M4 | |
line 713: au BufNewFile,BufRead *.html.m4^I^I^Isetf htmlm4 | |
line 714: | |
line 715: " HTML Cheetah template | |
line 716: au BufNewFile,BufRead *.tmpl^I^I^Isetf htmlcheetah | |
line 717: | |
line 718: " Host config | |
line 719: au BufNewFile,BufRead */etc/host.conf^I^Isetf hostconf | |
line 720: | |
line 721: " Hosts access | |
line 722: au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess | |
line 723: | |
line 724: " Hyper Builder | |
line 725: au BufNewFile,BufRead *.hb^I^I^Isetf hb | |
line 726: | |
line 727: " Httest | |
line 728: au BufNewFile,BufRead *.htt,*.htb^I^Isetf httest | |
line 729: | |
line 730: " Icon | |
line 731: au BufNewFile,BufRead *.icn^I^I^Isetf icon | |
line 732: | |
line 733: " IDL (Interface Description Language) | |
line 734: au BufNewFile,BufRead *.idl^I^I^Icall dist#ft#FTidl() | |
line 735: | |
line 736: " Microsoft IDL (Interface Description Language) Also *.idl | |
line 737: " MOF = WMI (Windows Management Instrumentation) Managed Object Format | |
line 738: au BufNewFile,BufRead *.odl,*.mof^I^Isetf msidl | |
line 739: | |
line 740: " Icewm menu | |
line 741: au BufNewFile,BufRead */.icewm/menu^I^Isetf icemenu | |
line 742: | |
line 743: " Indent profile (must come before IDL *.pro!) | |
line 744: au BufNewFile,BufRead .indent.pro^I^Isetf indent | |
line 745: au BufNewFile,BufRead indent.pro^I^Icall dist#ft#ProtoCheck('indent') | |
line 746: | |
line 747: " IDL (Interactive Data Language) | |
line 748: au BufNewFile,BufRead *.pro^I^I^Icall dist#ft#ProtoCheck('idlang') | |
line 749: | |
line 750: " Indent RC | |
line 751: au BufNewFile,BufRead indentrc^I^I^Isetf indent | |
line 752: | |
line 753: " Inform | |
line 754: au BufNewFile,BufRead *.inf,*.INF^I^Isetf inform | |
line 755: | |
line 756: " Initng | |
line 757: au BufNewFile,BufRead */etc/initng/*/*.i,*.ii^Isetf initng | |
line 758: | |
line 759: " Innovation Data Processing | |
line 760: au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c ^Isetf upstreamdat | |
line 761: au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c ^Isetf upstreamlog | |
line 762: au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog | |
line 763: au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c ^Isetf usserverlog | |
line 764: au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c ^Isetf usw2kagtlog | |
line 765: | |
line 766: " Ipfilter | |
line 767: au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules^Isetf ipfilter | |
line 768: | |
line 769: " Informix 4GL (source - canonical, include file, I4GL+M4 preproc.) | |
line 770: au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl^Isetf fgl | |
line 771: | |
line 772: " .INI file for MSDOS | |
line 773: au BufNewFile,BufRead *.ini^I^I^Isetf dosini | |
line 774: | |
line 775: " SysV Inittab | |
line 776: au BufNewFile,BufRead inittab^I^I^Isetf inittab | |
line 777: | |
line 778: " Inno Setup | |
line 779: au BufNewFile,BufRead *.iss^I^I^Isetf iss | |
line 780: | |
line 781: " J | |
line 782: au BufNewFile,BufRead *.ijs^I^I^Isetf j | |
line 783: | |
line 784: " JAL | |
line 785: au BufNewFile,BufRead *.jal,*.JAL^I^Isetf jal | |
line 786: | |
line 787: " Jam | |
line 788: au BufNewFile,BufRead *.jpl,*.jpr^I^Isetf jam | |
line 789: | |
line 790: " Java | |
line 791: au BufNewFile,BufRead *.java,*.jav^I^Isetf java | |
line 792: | |
line 793: " JavaCC | |
line 794: au BufNewFile,BufRead *.jj,*.jjt^I^Isetf javacc | |
line 795: | |
line 796: " JavaScript, ECMAScript | |
line 797: au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.mjs setf javascript | |
line 798: | |
line 799: " Java Server Pages | |
line 800: au BufNewFile,BufRead *.jsp^I^I^Isetf jsp | |
line 801: | |
line 802: " Java Properties resource file (note: doesn't catch font.properties.pl) | |
line 803: au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_??^Isetf jproperties | |
line 804: au BufNewFile,BufRead *.properties_??_??_*^Icall s:StarSetf('jproperties') | |
line 805: | |
line 806: " Jess | |
line 807: au BufNewFile,BufRead *.clp^I^I^Isetf jess | |
line 808: | |
line 809: " Jgraph | |
line 810: au BufNewFile,BufRead *.jgr^I^I^Isetf jgraph | |
line 811: | |
line 812: " Jovial | |
line 813: au BufNewFile,BufRead *.jov,*.j73,*.jovial^Isetf jovial | |
line 814: | |
line 815: " JSON | |
line 816: au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest^Isetf json | |
line 817: | |
line 818: " Kixtart | |
line 819: au BufNewFile,BufRead *.kix^I^I^Isetf kix | |
line 820: | |
line 821: " Kimwitu[++] | |
line 822: au BufNewFile,BufRead *.k^I^I^Isetf kwt | |
line 823: | |
line 824: " Kivy | |
line 825: au BufNewFile,BufRead *.kv^I^I^Isetf kivy | |
line 826: | |
line 827: " KDE script | |
line 828: au BufNewFile,BufRead *.ks^I^I^Isetf kscript | |
line 829: | |
line 830: " Kconfig | |
line 831: au BufNewFile,BufRead Kconfig,Kconfig.debug^Isetf kconfig | |
line 832: | |
line 833: " Lace (ISE) | |
line 834: au BufNewFile,BufRead *.ace,*.ACE^I^Isetf lace | |
line 835: | |
line 836: " Latte | |
line 837: au BufNewFile,BufRead *.latte,*.lte^I^Isetf latte | |
line 838: | |
line 839: " Limits | |
line 840: au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf^Isetf limits | |
line 841: | |
line 842: " LambdaProlog (*.mod too, see Modsim) | |
line 843: au BufNewFile,BufRead *.sig^I^I^Isetf lprolog | |
line 844: | |
line 845: " LDAP LDIF | |
line 846: au BufNewFile,BufRead *.ldif^I^I^Isetf ldif | |
line 847: | |
line 848: " Ld loader | |
line 849: au BufNewFile,BufRead *.ld^I^I^Isetf ld | |
line 850: | |
line 851: " Less | |
line 852: au BufNewFile,BufRead *.less^I^I^Isetf less | |
line 853: | |
line 854: " Lex | |
line 855: au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++^Isetf lex | |
line 856: | |
line 857: " Libao | |
line 858: au BufNewFile,BufRead */etc/libao.conf,*/.libao^Isetf libao | |
line 859: | |
line 860: " Libsensors | |
line 861: au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf^Isetf sensors | |
line 862: | |
line 863: " LFTP | |
line 864: au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc^Isetf lftp | |
line 865: | |
line 866: " Lifelines (or Lex for C++!) | |
line 867: au BufNewFile,BufRead *.ll^I^I^Isetf lifelines | |
line 868: | |
line 869: " Lilo: Linux loader | |
line 870: au BufNewFile,BufRead lilo.conf^I^I^Isetf lilo | |
line 871: | |
line 872: " Lisp (*.el = ELisp, *.cl = Common Lisp, *.jl = librep Lisp) | |
line 873: if has("fname_case") | |
line 874: au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,*.L,.emacs,.sawfishrc setf lisp | |
line 875: else | |
line 876: au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,.emacs,.sawfishrc setf lisp | |
line 877: endif | |
line 878: | |
line 879: " SBCL implementation of Common Lisp | |
line 880: au BufNewFile,BufRead sbclrc,.sbclrc^I^Isetf lisp | |
line 881: | |
line 882: " Liquid | |
line 883: au BufNewFile,BufRead *.liquid^I^I^Isetf liquid | |
line 884: | |
line 885: " Lite | |
line 886: au BufNewFile,BufRead *.lite,*.lt^I^Isetf lite | |
line 887: | |
line 888: " LiteStep RC files | |
line 889: au BufNewFile,BufRead */LiteStep/*/*.rc^I^Isetf litestep | |
line 890: | |
line 891: " Login access | |
line 892: au BufNewFile,BufRead */etc/login.access^Isetf loginaccess | |
line 893: | |
line 894: " Login defs | |
line 895: au BufNewFile,BufRead */etc/login.defs^I^Isetf logindefs | |
line 896: | |
line 897: " Logtalk | |
line 898: au BufNewFile,BufRead *.lgt^I^I^Isetf logtalk | |
line 899: | |
line 900: " LOTOS | |
line 901: au BufNewFile,BufRead *.lot,*.lotos^I^Isetf lotos | |
line 902: | |
line 903: " Lout (also: *.lt) | |
line 904: au BufNewFile,BufRead *.lou,*.lout^I^Isetf lout | |
line 905: | |
line 906: " Lua | |
line 907: au BufNewFile,BufRead *.lua^I^I^Isetf lua | |
line 908: | |
line 909: " Luarocks | |
line 910: au BufNewFile,BufRead *.rockspec^I^Isetf lua | |
line 911: | |
line 912: " Linden Scripting Language (Second Life) | |
line 913: au BufNewFile,BufRead *.lsl^I^I^Isetf lsl | |
line 914: | |
line 915: " Lynx style file (or LotusScript!) | |
line 916: au BufNewFile,BufRead *.lss^I^I^Isetf lss | |
line 917: | |
line 918: " M4 | |
line 920: au BufNewFile,BufRead *.m4 if expand("<afile>") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif | |
line 921: | |
line 922: " MaGic Point | |
line 923: au BufNewFile,BufRead *.mgp^I^I^Isetf mgp | |
line 924: | |
line 925: " Mail (for Elm, trn, mutt, muttng, rn, slrn, neomutt) | |
line 926: au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail | |
line 927: | |
line 928: " Mail aliases | |
line 929: au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases^Isetf mailaliases | |
line 930: | |
line 931: " Mailcap configuration file | |
line 932: au BufNewFile,BufRead .mailcap,mailcap^I^Isetf mailcap | |
line 933: | |
line 934: " Makefile | |
line 935: au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make | |
line 936: | |
line 937: " MakeIndex | |
line 938: au BufNewFile,BufRead *.ist,*.mst^I^Isetf ist | |
line 939: | |
line 940: " Mallard | |
line 941: au BufNewFile,BufRead *.page^I^I^Isetf mallard | |
line 942: | |
line 943: " Manpage | |
line 944: au BufNewFile,BufRead *.man^I^I^Isetf man | |
line 945: | |
line 946: " Man config | |
line 947: au BufNewFile,BufRead */etc/man.conf,man.config^Isetf manconf | |
line 948: | |
line 949: " Maple V | |
line 950: au BufNewFile,BufRead *.mv,*.mpl,*.mws^I^Isetf maple | |
line 951: | |
line 952: " Map (UMN mapserver config file) | |
line 953: au BufNewFile,BufRead *.map^I^I^Isetf map | |
line 954: | |
line 955: " Markdown | |
line 956: au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown | |
line 957: | |
line 958: " Mason | |
line 959: au BufNewFile,BufRead *.mason,*.mhtml,*.comp^Isetf mason | |
line 960: | |
line 961: " Mathematica, Matlab, Murphi or Objective C | |
line 962: au BufNewFile,BufRead *.m^I^I^Icall dist#ft#FTm() | |
line 963: | |
line 964: " Mathematica notebook | |
line 965: au BufNewFile,BufRead *.nb^I^I^Isetf mma | |
line 966: | |
line 967: " Maya Extension Language | |
line 968: au BufNewFile,BufRead *.mel^I^I^Isetf mel | |
line 969: | |
line 970: " Mercurial (hg) commit file | |
line 971: au BufNewFile,BufRead hg-editor-*.txt^I^Isetf hgcommit | |
line 972: | |
line 973: " Mercurial config (looks like generic config file) | |
line 974: au BufNewFile,BufRead *.hgrc,*hgrc^I^Isetf cfg | |
line 975: | |
line 976: " Messages (logs mostly) | |
line 977: 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 | |
line 978: | |
line 979: " Metafont | |
line 980: au BufNewFile,BufRead *.mf^I^I^Isetf mf | |
line 981: | |
line 982: " MetaPost | |
line 983: au BufNewFile,BufRead *.mp^I^I^Isetf mp | |
line 984: | |
line 985: " MGL | |
line 986: au BufNewFile,BufRead *.mgl^I^I^Isetf mgl | |
line 987: | |
line 988: " MIX - Knuth assembly | |
line 989: au BufNewFile,BufRead *.mix,*.mixal^I^Isetf mix | |
line 990: | |
line 991: " MMIX or VMS makefile | |
line 992: au BufNewFile,BufRead *.mms^I^I^Icall dist#ft#FTmms() | |
line 993: | |
line 994: " Symbian meta-makefile definition (MMP) | |
line 995: au BufNewFile,BufRead *.mmp^I^I^Isetf mmp | |
line 996: | |
line 997: " Modsim III (or LambdaProlog) | |
line 1003: au BufNewFile,BufRead *.mod if getline(1) =~ '\<module\>' | setf lprolog | else | setf modsim3 | endif | |
line 1004: | |
line 1005: " Modula 2 (.md removed in favor of Markdown) | |
line 1006: au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi^Isetf modula2 | |
line 1007: | |
line 1008: " Modula 3 (.m3, .i3, .mg, .ig) | |
line 1009: au BufNewFile,BufRead *.[mi][3g]^I^Isetf modula3 | |
line 1010: | |
line 1011: " Monk | |
line 1012: au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc^Isetf monk | |
line 1013: | |
line 1014: " MOO | |
line 1015: au BufNewFile,BufRead *.moo^I^I^Isetf moo | |
line 1016: | |
line 1017: " Modconf | |
line 1018: au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf | |
line 1019: | |
line 1020: " Mplayer config | |
line 1021: au BufNewFile,BufRead mplayer.conf,*/.mplayer/config^Isetf mplayerconf | |
line 1022: | |
line 1023: " Motorola S record | |
line 1024: au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec^Isetf srec | |
line 1025: | |
line 1026: " Mrxvtrc | |
line 1027: au BufNewFile,BufRead mrxvtrc,.mrxvtrc^I^Isetf mrxvtrc | |
line 1028: | |
line 1029: " Msql | |
line 1030: au BufNewFile,BufRead *.msql^I^I^Isetf msql | |
line 1031: | |
line 1032: " Mysql | |
line 1033: au BufNewFile,BufRead *.mysql^I^I^Isetf mysql | |
line 1034: | |
line 1035: " Mutt setup files (must be before catch *.rc) | |
line 1036: au BufNewFile,BufRead */etc/Muttrc.d/*^I^Icall s:StarSetf('muttrc') | |
line 1037: | |
line 1038: " M$ Resource files | |
line 1039: au BufNewFile,BufRead *.rc,*.rch^I^Isetf rc | |
line 1040: | |
line 1041: " MuPAD source | |
line 1042: au BufRead,BufNewFile *.mu^I^I^Isetf mupad | |
line 1043: | |
line 1044: " Mush | |
line 1045: au BufNewFile,BufRead *.mush^I^I^Isetf mush | |
line 1046: | |
line 1047: " Mutt setup file (also for Muttng) | |
line 1048: au BufNewFile,BufRead Mutt{ng,}rc^I^Isetf muttrc | |
line 1049: | |
line 1050: " N1QL | |
line 1051: au BufRead,BufNewfile *.n1ql,*.nql^I^Isetf n1ql | |
line 1052: | |
line 1053: " Nano | |
line 1054: au BufNewFile,BufRead */etc/nanorc,*.nanorc ^Isetf nanorc | |
line 1055: | |
line 1056: " Nastran input/DMAP | |
line 1057: "au BufNewFile,BufRead *.dat^I^I^Isetf nastran | |
line 1058: | |
line 1059: " Natural | |
line 1060: au BufNewFile,BufRead *.NS[ACGLMNPS]^I^Isetf natural | |
line 1061: | |
line 1062: " Noemutt setup file | |
line 1063: au BufNewFile,BufRead Neomuttrc^I^I^Isetf neomuttrc | |
line 1064: | |
line 1065: " Netrc | |
line 1066: au BufNewFile,BufRead .netrc^I^I^Isetf netrc | |
line 1067: | |
line 1068: " Ninja file | |
line 1069: au BufNewFile,BufRead *.ninja^I^I^Isetf ninja | |
line 1070: | |
line 1071: " Novell netware batch files | |
line 1072: au BufNewFile,BufRead *.ncf^I^I^Isetf ncf | |
line 1073: | |
line 1074: " Nroff/Troff (*.ms and *.t are checked below) | |
line 1078: au BufNewFile,BufRead *.me if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" | setf nroff | endif | |
line 1079: au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom^Isetf nroff | |
line 1080: au BufNewFile,BufRead *.[1-9]^I^I^Icall dist#ft#FTnroff() | |
line 1081: | |
line 1082: " Nroff or Objective C++ | |
line 1083: au BufNewFile,BufRead *.mm^I^I^Icall dist#ft#FTmm() | |
line 1084: | |
line 1085: " Not Quite C | |
line 1086: au BufNewFile,BufRead *.nqc^I^I^Isetf nqc | |
line 1087: | |
line 1088: " NSE - Nmap Script Engine - uses Lua syntax | |
line 1089: au BufNewFile,BufRead *.nse^I^I^Isetf lua | |
line 1090: | |
line 1091: " NSIS | |
line 1092: au BufNewFile,BufRead *.nsi,*.nsh^I^Isetf nsis | |
line 1093: | |
line 1094: " OCAML | |
line 1095: au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit^Isetf ocaml | |
line 1096: | |
line 1097: " Occam | |
line 1098: au BufNewFile,BufRead *.occ^I^I^Isetf occam | |
line 1099: | |
line 1100: " Omnimark | |
line 1101: au BufNewFile,BufRead *.xom,*.xin^I^Isetf omnimark | |
line 1102: | |
line 1103: " OpenROAD | |
line 1104: au BufNewFile,BufRead *.or^I^I^Isetf openroad | |
line 1105: | |
line 1106: " OPL | |
line 1107: au BufNewFile,BufRead *.[Oo][Pp][Ll]^I^Isetf opl | |
line 1108: | |
line 1109: " Oracle config file | |
line 1110: au BufNewFile,BufRead *.ora^I^I^Isetf ora | |
line 1111: | |
line 1112: " Packet filter conf | |
line 1113: au BufNewFile,BufRead pf.conf^I^I^Isetf pf | |
line 1114: | |
line 1115: " Pam conf | |
line 1116: au BufNewFile,BufRead */etc/pam.conf^I^Isetf pamconf | |
line 1117: | |
line 1118: " PApp | |
line 1119: au BufNewFile,BufRead *.papp,*.pxml,*.pxsl^Isetf papp | |
line 1120: | |
line 1121: " Password file | |
line 1122: 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 | |
line 1123: | |
line 1124: " Pascal (also *.p) | |
line 1125: au BufNewFile,BufRead *.pas^I^I^Isetf pascal | |
line 1126: | |
line 1127: " Delphi project file | |
line 1128: au BufNewFile,BufRead *.dpr^I^I^Isetf pascal | |
line 1129: | |
line 1130: " PDF | |
line 1131: au BufNewFile,BufRead *.pdf^I^I^Isetf pdf | |
line 1132: | |
line 1133: " PCMK - HAE - crm configure edit | |
line 1134: au BufNewFile,BufRead *.pcmk ^I^I^Isetf pcmk | |
line 1135: | |
line 1136: " Perl | |
line 1137: if has("fname_case") | |
line 1138: au BufNewFile,BufRead *.pl,*.PL^I^Icall dist#ft#FTpl() | |
line 1139: else | |
line 1140: au BufNewFile,BufRead *.pl^I^I^Icall dist#ft#FTpl() | |
line 1141: endif | |
line 1142: au BufNewFile,BufRead *.plx,*.al,*.psgi^I^Isetf perl | |
line 1143: au BufNewFile,BufRead *.p6,*.pm6,*.pl6^I^Isetf perl6 | |
line 1144: | |
line 1145: " Perl, XPM or XPM2 | |
line 1153: au BufNewFile,BufRead *.pm if getline(1) =~ "XPM2" | setf xpm2 | elseif getline(1) =~ "XPM" | setf xpm | else | setf perl | endif | |
line 1154: | |
line 1155: " Perl POD | |
line 1156: au BufNewFile,BufRead *.pod^I^I^Isetf pod | |
line 1157: au BufNewFile,BufRead *.pod6^I^I^Isetf pod6 | |
line 1158: | |
line 1159: " Php, php3, php4, etc. | |
line 1160: " Also Phtml (was used for PHP 2 in the past) | |
line 1161: " Also .ctp for Cake template file | |
line 1162: au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp^Isetf php | |
line 1163: | |
line 1164: " Pike and Cmod | |
line 1165: au BufNewFile,BufRead *.pike,*.pmod^I^Isetf pike | |
line 1166: au BufNewFile,BufRead *.cmod^I^I^Isetf cmod | |
line 1167: | |
line 1168: " Pinfo config | |
line 1169: au BufNewFile,BufRead */etc/pinforc,*/.pinforc^Isetf pinfo | |
line 1170: | |
line 1171: " Palm Resource compiler | |
line 1172: au BufNewFile,BufRead *.rcp^I^I^Isetf pilrc | |
line 1173: | |
line 1174: " Pine config | |
line 1175: au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex^I^Isetf pine | |
line 1176: | |
line 1177: " PL/1, PL/I | |
line 1178: au BufNewFile,BufRead *.pli,*.pl1^I^Isetf pli | |
line 1179: | |
line 1180: " PL/M (also: *.inp) | |
line 1181: au BufNewFile,BufRead *.plm,*.p36,*.pac^I^Isetf plm | |
line 1182: | |
line 1183: " PL/SQL | |
line 1184: au BufNewFile,BufRead *.pls,*.plsql^I^Isetf plsql | |
line 1185: | |
line 1186: " PLP | |
line 1187: au BufNewFile,BufRead *.plp^I^I^Isetf plp | |
line 1188: | |
line 1189: " PO and PO template (GNU gettext) | |
line 1190: au BufNewFile,BufRead *.po,*.pot^I^Isetf po | |
line 1191: | |
line 1192: " Postfix main config | |
line 1193: au BufNewFile,BufRead main.cf^I^I^Isetf pfmain | |
line 1194: | |
line 1195: " PostScript (+ font files, encapsulated PostScript, Adobe Illustrator) | |
line 1196: au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai^I setf postscr | |
line 1197: | |
line 1198: " PostScript Printer Description | |
line 1199: au BufNewFile,BufRead *.ppd^I^I^Isetf ppd | |
line 1200: | |
line 1201: " Povray | |
line 1202: au BufNewFile,BufRead *.pov^I^I^Isetf pov | |
line 1203: | |
line 1204: " Povray configuration | |
line 1205: au BufNewFile,BufRead .povrayrc^I^I^Isetf povini | |
line 1206: | |
line 1207: " Povray, PHP or assembly | |
line 1208: au BufNewFile,BufRead *.inc^I^I^Icall dist#ft#FTinc() | |
line 1209: | |
line 1210: " Printcap and Termcap | |
line 1212: au BufNewFile,BufRead *printcap let b:ptcap_type = "print" | setf ptcap | |
line 1214: au BufNewFile,BufRead *termcap let b:ptcap_type = "term" | setf ptcap | |
line 1215: | |
line 1216: " PCCTS / ANTRL | |
line 1217: "au BufNewFile,BufRead *.g^I^I^Isetf antrl | |
line 1218: au BufNewFile,BufRead *.g^I^I^Isetf pccts | |
line 1219: | |
line 1220: " PPWizard | |
line 1221: au BufNewFile,BufRead *.it,*.ih^I^I^Isetf ppwiz | |
line 1222: | |
line 1223: " Obj 3D file format | |
line 1224: " TODO: is there a way to avoid MS-Windows Object files? | |
line 1225: au BufNewFile,BufRead *.obj^I^I^Isetf obj | |
line 1226: | |
line 1227: " Oracle Pro*C/C++ | |
line 1228: au BufNewFile,BufRead *.pc^I^I^Isetf proc | |
line 1229: | |
line 1230: " Privoxy actions file | |
line 1231: au BufNewFile,BufRead *.action^I^I^Isetf privoxy | |
line 1232: | |
line 1233: " Procmail | |
line 1234: au BufNewFile,BufRead .procmail,.procmailrc^Isetf procmail | |
line 1235: | |
line 1236: " Progress or CWEB | |
line 1237: au BufNewFile,BufRead *.w^I^I^Icall dist#ft#FTprogress_cweb() | |
line 1238: | |
line 1239: " Progress or assembly | |
line 1240: au BufNewFile,BufRead *.i^I^I^Icall dist#ft#FTprogress_asm() | |
line 1241: | |
line 1242: " Progress or Pascal | |
line 1243: au BufNewFile,BufRead *.p^I^I^Icall dist#ft#FTprogress_pascal() | |
line 1244: | |
line 1245: " Software Distributor Product Specification File (POSIX 1387.2-1995) | |
line 1246: au BufNewFile,BufRead *.psf^I^I^Isetf psf | |
line 1250: au BufNewFile,BufRead INDEX,INFO if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' | setf psf | endif | |
line 1251: | |
line 1252: " Prolog | |
line 1253: au BufNewFile,BufRead *.pdb^I^I^Isetf prolog | |
line 1254: | |
line 1255: " Promela | |
line 1256: au BufNewFile,BufRead *.pml^I^I^Isetf promela | |
line 1257: | |
line 1258: " Google protocol buffers | |
line 1259: au BufNewFile,BufRead *.proto^I^I^Isetf proto | |
line 1260: | |
line 1261: " Protocols | |
line 1262: au BufNewFile,BufRead */etc/protocols^I^Isetf protocols | |
line 1263: | |
line 1264: " Pyrex | |
line 1265: au BufNewFile,BufRead *.pyx,*.pxd^I^Isetf pyrex | |
line 1266: | |
line 1267: " Python, Python Shell Startup and Python Stub Files | |
line 1268: " Quixote (Python-based web framework) | |
line 1269: au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python | |
line 1270: | |
line 1271: " Radiance | |
line 1272: au BufNewFile,BufRead *.rad,*.mat^I^Isetf radiance | |
line 1273: | |
line 1274: " Ratpoison config/command files | |
line 1275: au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc^Isetf ratpoison | |
line 1276: | |
line 1277: " RCS file | |
line 1278: au BufNewFile,BufRead *\,v^I^I^Isetf rcs | |
line 1279: | |
line 1280: " Readline | |
line 1281: au BufNewFile,BufRead .inputrc,inputrc^I^Isetf readline | |
line 1282: | |
line 1283: " Registry for MS-Windows | |
line 1285: au BufNewFile,BufRead *.reg if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif | |
line 1286: | |
line 1287: " Renderman Interface Bytestream | |
line 1288: au BufNewFile,BufRead *.rib^I^I^Isetf rib | |
line 1289: | |
line 1290: " Rexx | |
line 1291: au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit^Isetf rexx | |
line 1292: | |
line 1293: " R (Splus) | |
line 1294: if has("fname_case") | |
line 1295: au BufNewFile,BufRead *.s,*.S^I^I^Isetf r | |
line 1296: else | |
line 1297: au BufNewFile,BufRead *.s^I^I^Isetf r | |
line 1298: endif | |
line 1299: | |
line 1300: " R Help file | |
line 1301: if has("fname_case") | |
line 1302: au BufNewFile,BufRead *.rd,*.Rd^I^Isetf rhelp | |
line 1303: else | |
line 1304: au BufNewFile,BufRead *.rd^I^I^Isetf rhelp | |
line 1305: endif | |
line 1306: | |
line 1307: " R noweb file | |
line 1308: if has("fname_case") | |
line 1309: au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw^I^Isetf rnoweb | |
line 1310: else | |
line 1311: au BufNewFile,BufRead *.rnw,*.snw^I^I^Isetf rnoweb | |
line 1312: endif | |
line 1313: | |
line 1314: " R Markdown file | |
line 1315: if has("fname_case") | |
line 1316: au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd^I^Isetf rmd | |
line 1317: else | |
line 1318: au BufNewFile,BufRead *.rmd,*.smd^I^I^Isetf rmd | |
line 1319: endif | |
line 1320: | |
line 1321: " R reStructuredText file | |
line 1322: if has("fname_case") | |
line 1323: au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst^Isetf rrst | |
line 1324: else | |
line 1325: au BufNewFile,BufRead *.rrst,*.srst^I^I^Isetf rrst | |
line 1326: endif | |
line 1327: | |
line 1328: " Rexx, Rebol or R | |
line 1329: au BufNewFile,BufRead *.r,*.R^I^I^I^Icall dist#ft#FTr() | |
line 1330: | |
line 1331: " Remind | |
line 1332: au BufNewFile,BufRead .reminders,*.remind,*.rem^I^Isetf remind | |
line 1333: | |
line 1334: " Resolv.conf | |
line 1335: au BufNewFile,BufRead resolv.conf^I^Isetf resolv | |
line 1336: | |
line 1337: " Relax NG Compact | |
line 1338: au BufNewFile,BufRead *.rnc^I^I^Isetf rnc | |
line 1339: | |
line 1340: " Relax NG XML | |
line 1341: au BufNewFile,BufRead *.rng^I^I^Isetf rng | |
line 1342: | |
line 1343: " RPL/2 | |
line 1344: au BufNewFile,BufRead *.rpl^I^I^Isetf rpl | |
line 1345: | |
line 1346: " Robots.txt | |
line 1347: au BufNewFile,BufRead robots.txt^I^Isetf robots | |
line 1348: | |
line 1349: " Rpcgen | |
line 1350: au BufNewFile,BufRead *.x^I^I^Isetf rpcgen | |
line 1351: | |
line 1352: " reStructuredText Documentation Format | |
line 1353: au BufNewFile,BufRead *.rst^I^I^Isetf rst | |
line 1354: | |
line 1355: " RTF | |
line 1356: au BufNewFile,BufRead *.rtf^I^I^Isetf rtf | |
line 1357: | |
line 1358: " Interactive Ruby shell | |
line 1359: au BufNewFile,BufRead .irbrc,irbrc^I^Isetf ruby | |
line 1360: | |
line 1361: " Ruby | |
line 1362: au BufNewFile,BufRead *.rb,*.rbw^I^Isetf ruby | |
line 1363: | |
line 1364: " RubyGems | |
line 1365: au BufNewFile,BufRead *.gemspec^I^I^Isetf ruby | |
line 1366: | |
line 1367: " Rust | |
line 1368: au BufNewFile,BufRead *.rs^I^I^Isetf rust | |
line 1369: | |
line 1370: " Rackup | |
line 1371: au BufNewFile,BufRead *.ru^I^I^Isetf ruby | |
line 1372: | |
line 1373: " Bundler | |
line 1374: au BufNewFile,BufRead Gemfile^I^I^Isetf ruby | |
line 1375: | |
line 1376: " Ruby on Rails | |
line 1377: au BufNewFile,BufRead *.builder,*.rxml,*.rjs^Isetf ruby | |
line 1378: | |
line 1379: " Rantfile and Rakefile is like Ruby | |
line 1380: au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake^Isetf ruby | |
line 1381: | |
line 1382: " S-lang (or shader language, or SmallLisp) | |
line 1383: au BufNewFile,BufRead *.sl^I^I^Isetf slang | |
line 1384: | |
line 1385: " Samba config | |
line 1386: au BufNewFile,BufRead smb.conf^I^I^Isetf samba | |
line 1387: | |
line 1388: " SAS script | |
line 1389: au BufNewFile,BufRead *.sas^I^I^Isetf sas | |
line 1390: | |
line 1391: " Sass | |
line 1392: au BufNewFile,BufRead *.sass^I^I^Isetf sass | |
line 1393: | |
line 1394: " Sather | |
line 1395: au BufNewFile,BufRead *.sa^I^I^Isetf sather | |
line 1396: | |
line 1397: " Scala | |
line 1398: au BufNewFile,BufRead *.scala^I^I^Isetf scala | |
line 1399: | |
line 1400: " SBT - Scala Build Tool | |
line 1401: au BufNewFile,BufRead *.sbt^I^I^Isetf sbt | |
line 1402: | |
line 1403: " Scilab | |
line 1404: au BufNewFile,BufRead *.sci,*.sce^I^Isetf scilab | |
line 1405: | |
line 1406: " SCSS | |
line 1407: au BufNewFile,BufRead *.scss^I^I^Isetf scss | |
line 1408: | |
line 1409: " SD: Streaming Descriptors | |
line 1410: au BufNewFile,BufRead *.sd^I^I^Isetf sd | |
line 1411: | |
line 1412: " SDL | |
line 1413: au BufNewFile,BufRead *.sdl,*.pr^I^Isetf sdl | |
line 1414: | |
line 1415: " sed | |
line 1416: au BufNewFile,BufRead *.sed^I^I^Isetf sed | |
line 1417: | |
line 1418: " Sieve (RFC 3028, 5228) | |
line 1419: au BufNewFile,BufRead *.siv,*.sieve^I^Isetf sieve | |
line 1420: | |
line 1421: " Sendmail | |
line 1422: au BufNewFile,BufRead sendmail.cf^I^Isetf sm | |
line 1423: | |
line 1424: " Sendmail .mc files are actually m4. Could also be MS Message text file. | |
line 1425: au BufNewFile,BufRead *.mc^I^I^Icall dist#ft#McSetf() | |
line 1426: | |
line 1427: " Services | |
line 1428: au BufNewFile,BufRead */etc/services^I^Isetf services | |
line 1429: | |
line 1430: " Service Location config | |
line 1431: au BufNewFile,BufRead */etc/slp.conf^I^Isetf slpconf | |
line 1432: | |
line 1433: " Service Location registration | |
line 1434: au BufNewFile,BufRead */etc/slp.reg^I^Isetf slpreg | |
line 1435: | |
line 1436: " Service Location SPI | |
line 1437: au BufNewFile,BufRead */etc/slp.spi^I^Isetf slpspi | |
line 1438: | |
line 1439: " Setserial config | |
line 1440: au BufNewFile,BufRead */etc/serial.conf^I^Isetf setserial | |
line 1441: | |
line 1442: " SGML | |
line 1452: 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 | |
line 1453: | |
line 1454: " SGMLDECL | |
line 1458: au BufNewFile,BufRead *.decl,*.dcl,*.dec if getline(1).getline(2).getline(3) =~? '^<!SGML' | setf sgmldecl | endif | |
line 1459: | |
line 1460: " SGML catalog file | |
line 1461: au BufNewFile,BufRead catalog^I^I^Isetf catalog | |
line 1462: au BufNewFile,BufRead sgml.catalog*^I^Icall s:StarSetf('catalog') | |
line 1463: | |
line 1464: " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. | |
line 1465: " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts | |
line 1466: " NOTE: Patterns ending in a star are further down, these have lower priority. | |
line 1467: au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash") | |
line 1468: au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh") | |
line 1469: au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1)) | |
line 1470: | |
line 1471: | |
line 1472: " Shell script (Arch Linux) or PHP file (Drupal) | |
line 1478: au BufNewFile,BufRead *.install if getline(1) =~ '<?php' | setf php | else | call dist#ft#SetFileTypeSH("bash") | endif | |
line 1479: | |
line 1480: " tcsh scripts (patterns ending in a star further below) | |
line 1481: au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login^Icall dist#ft#SetFileTypeShell("tcsh") | |
line 1482: | |
line 1483: " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh) | |
line 1484: " (patterns ending in a start further below) | |
line 1485: au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH() | |
line 1486: | |
line 1487: " Z-Shell script (patterns ending in a star further below) | |
line 1488: au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh | |
line 1489: au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh | |
line 1490: au BufNewFile,BufRead *.zsh^I^I^Isetf zsh | |
line 1491: | |
line 1492: " Scheme | |
line 1493: au BufNewFile,BufRead *.scm,*.ss,*.rkt^I^Isetf scheme | |
line 1494: | |
line 1495: " Screen RC | |
line 1496: au BufNewFile,BufRead .screenrc,screenrc^Isetf screen | |
line 1497: | |
line 1498: " Simula | |
line 1499: au BufNewFile,BufRead *.sim^I^I^Isetf simula | |
line 1500: | |
line 1501: " SINDA | |
line 1502: au BufNewFile,BufRead *.sin,*.s85^I^Isetf sinda | |
line 1503: | |
line 1504: " SiSU | |
line 1505: au BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst,*._sst setf sisu | |
line 1506: au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu | |
line 1507: | |
line 1508: " SKILL | |
line 1509: au BufNewFile,BufRead *.il,*.ils,*.cdf^I^Isetf skill | |
line 1510: | |
line 1511: " SLRN | |
line 1512: au BufNewFile,BufRead .slrnrc^I^I^Isetf slrnrc | |
line 1513: au BufNewFile,BufRead *.score^I^I^Isetf slrnsc | |
line 1514: | |
line 1515: " Smalltalk (and TeX) | |
line 1516: au BufNewFile,BufRead *.st^I^I^Isetf st | |
line 1524: au BufNewFile,BufRead *.cls if getline(1) =~ '^%' | setf tex | elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' | setf rexx | else | setf st | endif | |
line 1525: | |
line 1526: " Smarty templates | |
line 1527: au BufNewFile,BufRead *.tpl^I^I^Isetf smarty | |
line 1528: | |
line 1529: " SMIL or XML | |
line 1535: au BufNewFile,BufRead *.smil if getline(1) =~ '<?\s*xml.*?>' | setf xml | else | setf smil | endif | |
line 1536: | |
line 1537: " SMIL or SNMP MIB file | |
line 1543: au BufNewFile,BufRead *.smi if getline(1) =~ '\<smil\>' | setf smil | else | setf mib | endif | |
line 1544: | |
line 1545: " SMITH | |
line 1546: au BufNewFile,BufRead *.smt,*.smith^I^Isetf smith | |
line 1547: | |
line 1548: " Snobol4 and spitbol | |
line 1549: au BufNewFile,BufRead *.sno,*.spt^I^Isetf snobol4 | |
line 1550: | |
line 1551: " SNMP MIB files | |
line 1552: au BufNewFile,BufRead *.mib,*.my^I^Isetf mib | |
line 1553: | |
line 1554: " Snort Configuration | |
line 1555: au BufNewFile,BufRead *.hog,snort.conf,vision.conf^Isetf hog | |
line 1556: au BufNewFile,BufRead *.rules^I^I^Icall dist#ft#FTRules() | |
line 1557: | |
line 1558: " Spec (Linux RPM) | |
line 1559: au BufNewFile,BufRead *.spec^I^I^Isetf spec | |
line 1560: | |
line 1561: " Speedup (AspenTech plant simulator) | |
line 1562: au BufNewFile,BufRead *.speedup,*.spdata,*.spd^Isetf spup | |
line 1563: | |
line 1564: " Slice | |
line 1565: au BufNewFile,BufRead *.ice^I^I^Isetf slice | |
line 1566: | |
line 1567: " Spice | |
line 1568: au BufNewFile,BufRead *.sp,*.spice^I^Isetf spice | |
line 1569: | |
line 1570: " Spyce | |
line 1571: au BufNewFile,BufRead *.spy,*.spi^I^Isetf spyce | |
line 1572: | |
line 1573: " Squid | |
line 1574: au BufNewFile,BufRead squid.conf^I^Isetf squid | |
line 1575: | |
line 1576: " SQL for Oracle Designer | |
line 1577: au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks^Isetf sql | |
line 1578: | |
line 1579: " SQL | |
line 1580: au BufNewFile,BufRead *.sql^I^I^Icall dist#ft#SQL() | |
line 1581: | |
line 1582: " SQLJ | |
line 1583: au BufNewFile,BufRead *.sqlj^I^I^Isetf sqlj | |
line 1584: | |
line 1585: " SQR | |
line 1586: au BufNewFile,BufRead *.sqr,*.sqi^I^Isetf sqr | |
line 1587: | |
line 1588: " OpenSSH configuration | |
line 1589: au BufNewFile,BufRead ssh_config,*/.ssh/config^Isetf sshconfig | |
line 1590: | |
line 1591: " OpenSSH server configuration | |
line 1592: au BufNewFile,BufRead sshd_config^I^Isetf sshdconfig | |
line 1593: | |
line 1594: " Stata | |
line 1595: au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata^Isetf stata | |
line 1596: " Also *.class, but not when it's a Java bytecode file | |
line 1598: au BufNewFile,BufRead *.class if getline(1) !~ "^\xca\xfe\xba\xbe" | setf stata | endif | |
line 1599: | |
line 1600: " SMCL | |
line 1601: au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl^Isetf smcl | |
line 1602: | |
line 1603: " Stored Procedures | |
line 1604: au BufNewFile,BufRead *.stp^I^I^Isetf stp | |
line 1605: | |
line 1606: " Standard ML | |
line 1607: au BufNewFile,BufRead *.sml^I^I^Isetf sml | |
line 1608: | |
line 1609: " Sratus VOS command macro | |
line 1610: au BufNewFile,BufRead *.cm^I^I^Isetf voscm | |
line 1611: | |
line 1612: " Sysctl | |
line 1613: au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf^Isetf sysctl | |
line 1614: | |
line 1615: " Systemd unit files | |
line 1616: au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer}^Isetf systemd | |
line 1617: | |
line 1618: " Synopsys Design Constraints | |
line 1619: au BufNewFile,BufRead *.sdc^I^I^Isetf sdc | |
line 1620: | |
line 1621: " Sudoers | |
line 1622: au BufNewFile,BufRead */etc/sudoers,sudoers.tmp^Isetf sudoers | |
line 1623: | |
line 1624: " SVG (Scalable Vector Graphics) | |
line 1625: au BufNewFile,BufRead *.svg^I^I^Isetf svg | |
line 1626: | |
line 1627: " Tads (or Nroff or Perl test file) | |
line 1629: au BufNewFile,BufRead *.t if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif | |
line 1630: | |
line 1631: " Tags | |
line 1632: au BufNewFile,BufRead tags^I^I^Isetf tags | |
line 1633: | |
line 1634: " TAK | |
line 1635: au BufNewFile,BufRead *.tak^I^I^Isetf tak | |
line 1636: | |
line 1637: " Task | |
line 1638: au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata | |
line 1639: au BufRead,BufNewFile *.task^I^I^Isetf taskedit | |
line 1640: | |
line 1641: " Tcl (JACL too) | |
line 1642: au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl^Isetf tcl | |
line 1643: | |
line 1644: " TealInfo | |
line 1645: au BufNewFile,BufRead *.tli^I^I^Isetf tli | |
line 1646: | |
line 1647: " Telix Salt | |
line 1648: au BufNewFile,BufRead *.slt^I^I^Isetf tsalt | |
line 1649: | |
line 1650: " Tera Term Language | |
line 1651: au BufRead,BufNewFile *.ttl^I^I^Isetf teraterm | |
line 1652: | |
line 1653: " Terminfo | |
line 1654: au BufNewFile,BufRead *.ti^I^I^Isetf terminfo | |
line 1655: | |
line 1656: " TeX | |
line 1657: au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl^Isetf tex | |
line 1658: au BufNewFile,BufRead *.tex^I^I^Icall dist#ft#FTtex() | |
line 1659: | |
line 1660: " ConTeXt | |
line 1661: au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context | |
line 1662: | |
line 1663: " Texinfo | |
line 1664: au BufNewFile,BufRead *.texinfo,*.texi,*.txi^Isetf texinfo | |
line 1665: | |
line 1666: " TeX configuration | |
line 1667: au BufNewFile,BufRead texmf.cnf^I^I^Isetf texmf | |
line 1668: | |
line 1669: " Tidy config | |
line 1670: au BufNewFile,BufRead .tidyrc,tidyrc^I^Isetf tidy | |
line 1671: | |
line 1672: " TF mud client | |
line 1673: au BufNewFile,BufRead *.tf,.tfrc,tfrc^I^Isetf tf | |
line 1674: | |
line 1675: " tmux configuration | |
line 1676: au BufNewFile,BufRead {.,}tmux*.conf^I^Isetf tmux | |
line 1677: | |
line 1678: " TPP - Text Presentation Program | |
line 1679: au BufNewFile,BufReadPost *.tpp^I^I^Isetf tpp | |
line 1680: | |
line 1681: " Treetop | |
line 1682: au BufRead,BufNewFile *.treetop^I^I^Isetf treetop | |
line 1683: | |
line 1684: " Trustees | |
line 1685: au BufNewFile,BufRead trustees.conf^I^Isetf trustees | |
line 1686: | |
line 1687: " TSS - Geometry | |
line 1688: au BufNewFile,BufReadPost *.tssgm^I^Isetf tssgm | |
line 1689: | |
line 1690: " TSS - Optics | |
line 1691: au BufNewFile,BufReadPost *.tssop^I^Isetf tssop | |
line 1692: | |
line 1693: " TSS - Command Line (temporary) | |
line 1694: au BufNewFile,BufReadPost *.tsscl^I^Isetf tsscl | |
line 1695: | |
line 1696: " TWIG files | |
line 1697: au BufNewFile,BufReadPost *.twig^I^Isetf twig | |
line 1698: | |
line 1699: " Motif UIT/UIL files | |
line 1700: au BufNewFile,BufRead *.uit,*.uil^I^Isetf uil | |
line 1701: | |
line 1702: " Udev conf | |
line 1703: au BufNewFile,BufRead */etc/udev/udev.conf^Isetf udevconf | |
line 1704: | |
line 1705: " Udev permissions | |
line 1706: au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm | |
line 1707: " | |
line 1708: " Udev symlinks config | |
line 1709: au BufNewFile,BufRead */etc/udev/cdsymlinks.conf^Isetf sh | |
line 1710: | |
line 1711: " UnrealScript | |
line 1712: au BufNewFile,BufRead *.uc^I^I^Isetf uc | |
line 1713: | |
line 1714: " Updatedb | |
line 1715: au BufNewFile,BufRead */etc/updatedb.conf^Isetf updatedb | |
line 1716: | |
line 1717: " Upstart (init(8)) config files | |
line 1718: au BufNewFile,BufRead */usr/share/upstart/*.conf^I setf upstart | |
line 1719: au BufNewFile,BufRead */usr/share/upstart/*.override^I setf upstart | |
line 1720: au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart | |
line 1721: au BufNewFile,BufRead */.init/*.conf,*/.init/*.override^I setf upstart | |
line 1722: au BufNewFile,BufRead */.config/upstart/*.conf^I^I setf upstart | |
line 1723: au BufNewFile,BufRead */.config/upstart/*.override^I setf upstart | |
line 1724: | |
line 1725: " Vera | |
line 1726: au BufNewFile,BufRead *.vr,*.vri,*.vrh^I^Isetf vera | |
line 1727: | |
line 1728: " Verilog HDL | |
line 1729: au BufNewFile,BufRead *.v^I^I^Isetf verilog | |
line 1730: | |
line 1731: " Verilog-AMS HDL | |
line 1732: au BufNewFile,BufRead *.va,*.vams^I^Isetf verilogams | |
line 1733: | |
line 1734: " SystemVerilog | |
line 1735: au BufNewFile,BufRead *.sv,*.svh^I^Isetf systemverilog | |
line 1736: | |
line 1737: " VHDL | |
line 1738: au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl | |
line 1739: au BufNewFile,BufRead *.vhdl_[0-9]*^I^Icall s:StarSetf('vhdl') | |
line 1740: | |
line 1741: " Vim script | |
line 1742: au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc^Isetf vim | |
line 1743: | |
line 1744: " Viminfo file | |
line 1745: au BufNewFile,BufRead .viminfo,_viminfo^I^Isetf viminfo | |
line 1746: | |
line 1747: " Virata Config Script File or Drupal module | |
line 1753: au BufRead,BufNewFile *.hw,*.module,*.pkg if getline(1) =~ '<?php' | setf php | else | setf virata | endif | |
line 1754: | |
line 1755: " Visual Basic (also uses *.bas) or FORM | |
line 1756: au BufNewFile,BufRead *.frm^I^I^Icall dist#ft#FTVB("form") | |
line 1757: | |
line 1758: " SaxBasic is close to Visual Basic | |
line 1759: au BufNewFile,BufRead *.sba^I^I^Isetf vb | |
line 1760: | |
line 1761: " Vgrindefs file | |
line 1762: au BufNewFile,BufRead vgrindefs^I^I^Isetf vgrindefs | |
line 1763: | |
line 1764: " VRML V1.0c | |
line 1765: au BufNewFile,BufRead *.wrl^I^I^Isetf vrml | |
line 1766: | |
line 1767: " Vroom (vim testing and executable documentation) | |
line 1768: au BufNewFile,BufRead *.vroom^I^I^Isetf vroom | |
line 1769: | |
line 1770: " Webmacro | |
line 1771: au BufNewFile,BufRead *.wm^I^I^Isetf webmacro | |
line 1772: | |
line 1773: " WebAssembly | |
line 1774: au BufNewFile,BufRead *.wast,*.wat^I^Isetf wast | |
line 1775: | |
line 1776: " Wget config | |
line 1777: au BufNewFile,BufRead .wgetrc,wgetrc^I^Isetf wget | |
line 1778: | |
line 1779: " Website MetaLanguage | |
line 1780: au BufNewFile,BufRead *.wml^I^I^Isetf wml | |
line 1781: | |
line 1782: " Winbatch | |
line 1783: au BufNewFile,BufRead *.wbt^I^I^Isetf winbatch | |
line 1784: | |
line 1785: " WSML | |
line 1786: au BufNewFile,BufRead *.wsml^I^I^Isetf wsml | |
line 1787: | |
line 1788: " WPL | |
line 1789: au BufNewFile,BufRead *.wpl^I^I^Isetf xml | |
line 1790: | |
line 1791: " WvDial | |
line 1792: au BufNewFile,BufRead wvdial.conf,.wvdialrc^Isetf wvdial | |
line 1793: | |
line 1794: " CVS RC file | |
line 1795: au BufNewFile,BufRead .cvsrc^I^I^Isetf cvsrc | |
line 1796: | |
line 1797: " CVS commit file | |
line 1798: au BufNewFile,BufRead cvs\d\+^I^I^Isetf cvs | |
line 1799: | |
line 1800: " WEB (*.web is also used for Winbatch: Guess, based on expecting "%" comment | |
line 1801: " lines in a WEB file). | |
line 1807: 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 | |
line 1808: | |
line 1809: " Windows Scripting Host and Windows Script Component | |
line 1810: au BufNewFile,BufRead *.ws[fc]^I^I^Isetf wsh | |
line 1811: | |
line 1812: " XHTML | |
line 1813: au BufNewFile,BufRead *.xhtml,*.xht^I^Isetf xhtml | |
line 1814: | |
line 1815: " X Pixmap (dynamically sets colors, use BufEnter to make it work better) | |
line 1821: au BufEnter *.xpm if getline(1) =~ "XPM2" | setf xpm2 | else | setf xpm | endif | |
line 1822: au BufEnter *.xpm2^I^I^I^Isetf xpm2 | |
line 1823: | |
line 1824: " XFree86 config | |
line 1829: au BufNewFile,BufRead XF86Config if getline(1) =~ '\<XConfigurator\>' | let b:xf86conf_xfree86_version = 3 | endif | setf xf86conf | |
line 1832: au BufNewFile,BufRead */xorg.conf.d/*.conf let b:xf86conf_xfree86_version = 4 | setf xf86conf | |
line 1833: | |
line 1834: " Xorg config | |
line 1835: au BufNewFile,BufRead xorg.conf,xorg.conf-4^Ilet b:xf86conf_xfree86_version = 4 | setf xf86conf | |
line 1836: | |
line 1837: " Xinetd conf | |
line 1838: au BufNewFile,BufRead */etc/xinetd.conf^I^Isetf xinetd | |
line 1839: | |
line 1840: " XS Perl extension interface language | |
line 1841: au BufNewFile,BufRead *.xs^I^I^Isetf xs | |
line 1842: | |
line 1843: " X resources file | |
line 1844: au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults | |
line 1845: | |
line 1846: " Xmath | |
line 1847: au BufNewFile,BufRead *.msc,*.msf^I^Isetf xmath | |
line 1849: au BufNewFile,BufRead *.ms if !dist#ft#FTnroff() | setf xmath | endif | |
line 1850: | |
line 1851: " XML specific variants: docbk and xbl | |
line 1852: au BufNewFile,BufRead *.xml^I^I^Icall dist#ft#FTxml() | |
line 1853: | |
line 1854: " XMI (holding UML models) is also XML | |
line 1855: au BufNewFile,BufRead *.xmi^I^I^Isetf xml | |
line 1856: | |
line 1857: " CSPROJ files are Visual Studio.NET's XML-based project config files | |
line 1858: au BufNewFile,BufRead *.csproj,*.csproj.user^Isetf xml | |
line 1859: | |
line 1860: " Qt Linguist translation source and Qt User Interface Files are XML | |
line 1861: au BufNewFile,BufRead *.ts,*.ui^I^I^Isetf xml | |
line 1862: | |
line 1863: " TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull) | |
line 1864: au BufNewFile,BufRead *.tpm^I^I^Isetf xml | |
line 1865: | |
line 1866: " Xdg menus | |
line 1867: au BufNewFile,BufRead */etc/xdg/menus/*.menu^Isetf xml | |
line 1868: | |
line 1869: " ATI graphics driver configuration | |
line 1870: au BufNewFile,BufRead fglrxrc^I^I^Isetf xml | |
line 1871: | |
line 1872: " Web Services Description Language (WSDL) | |
line 1873: au BufNewFile,BufRead *.wsdl^I^I^Isetf xml | |
line 1874: | |
line 1875: " XLIFF (XML Localisation Interchange File Format) is also XML | |
line 1876: au BufNewFile,BufRead *.xlf^I^I^Isetf xml | |
line 1877: au BufNewFile,BufRead *.xliff^I^I^Isetf xml | |
line 1878: | |
line 1879: " XML User Interface Language | |
line 1880: au BufNewFile,BufRead *.xul^I^I^Isetf xml | |
line 1881: | |
line 1882: " X11 xmodmap (also see below) | |
line 1883: au BufNewFile,BufRead *Xmodmap^I^I^Isetf xmodmap | |
line 1884: | |
line 1885: " Xquery | |
line 1886: au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy^Isetf xquery | |
line 1887: | |
line 1888: " XSD | |
line 1889: au BufNewFile,BufRead *.xsd^I^I^Isetf xsd | |
line 1890: | |
line 1891: " Xslt | |
line 1892: au BufNewFile,BufRead *.xsl,*.xslt^I^Isetf xslt | |
line 1893: | |
line 1894: " Yacc | |
line 1895: au BufNewFile,BufRead *.yy,*.yxx,*.y++^I^Isetf yacc | |
line 1896: | |
line 1897: " Yacc or racc | |
line 1898: au BufNewFile,BufRead *.y^I^I^Icall dist#ft#FTy() | |
line 1899: | |
line 1900: " Yaml | |
line 1901: au BufNewFile,BufRead *.yaml,*.yml^I^Isetf yaml | |
line 1902: | |
line 1903: " Raml | |
line 1904: au BufNewFile,BufRead *.raml^I^I^Isetf raml | |
line 1905: | |
line 1906: " yum conf (close enough to dosini) | |
line 1907: au BufNewFile,BufRead */etc/yum.conf^I^Isetf dosini | |
line 1908: | |
line 1909: " Zimbu | |
line 1910: au BufNewFile,BufRead *.zu^I^I^Isetf zimbu | |
line 1911: " Zimbu Templates | |
line 1912: au BufNewFile,BufRead *.zut^I^I^Isetf zimbutempl | |
line 1913: | |
line 1914: " Zope | |
line 1915: " dtml (zope dynamic template markup language), pt (zope page template), | |
line 1916: " cpt (zope form controller page template) | |
line 1917: au BufNewFile,BufRead *.dtml,*.pt,*.cpt^I^Icall dist#ft#FThtml() | |
line 1918: " zsql (zope sql method) | |
line 1919: au BufNewFile,BufRead *.zsql^I^I^Icall dist#ft#SQL() | |
line 1920: | |
line 1921: " Z80 assembler asz80 | |
line 1922: au BufNewFile,BufRead *.z8a^I^I^Isetf z8a | |
line 1923: | |
line 1924: augroup END | |
line 1925: | |
line 1926: | |
line 1927: " Source the user-specified filetype file, for backwards compatibility with | |
line 1928: " Vim 5.x. | |
line 1929: if exists("myfiletypefile") && filereadable(expand(myfiletypefile)) | |
line 1930: execute "source " . myfiletypefile | |
line 1931: endif | |
line 1932: | |
line 1933: | |
line 1934: " Check for "*" after loading myfiletypefile, so that scripts.vim is only used | |
line 1935: " when there are no matching file name extensions. | |
line 1936: " Don't do this for compressed files. | |
line 1937: augroup filetypedetect | |
line 1940: au BufNewFile,BufRead * if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat | runtime! scripts.vim | endif | |
line 1941: au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif | |
line 1942: | |
line 1943: | |
line 1944: " Extra checks for when no filetype has been detected now. Mostly used for | |
line 1945: " patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim | |
line 1946: " script file. | |
line 1947: " Most of these should call s:StarSetf() to avoid names ending in .gz and the | |
line 1948: " like are used. | |
line 1949: | |
line 1950: " More Apache style config files | |
line 1951: au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/*^Icall s:StarSetf('apachestyle') | |
line 1952: | |
line 1953: " More Apache config files | |
line 1954: au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf*^Icall s:StarSetf('apache') | |
line 1955: au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf*^I^Icall s:StarSetf('apache') | |
line 1956: | |
line 1957: " Asterisk config file | |
line 1958: au BufNewFile,BufRead *asterisk/*.conf*^I^Icall s:StarSetf('asterisk') | |
line 1959: au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') | |
line 1960: | |
line 1961: " Bazaar version control | |
line 1962: au BufNewFile,BufRead bzr_log.*^I^I^Isetf bzr | |
line 1963: | |
line 1964: " Bazel build file | |
line 1965: if !has("fname_case") | |
line 1966: au BufNewFile,BufRead BUILD^I^I^Isetf bzl | |
line 1967: endif | |
line 1968: | |
line 1969: " BIND zone | |
line 1970: au BufNewFile,BufRead */named/db.*,*/bind/db.*^Icall s:StarSetf('bindzone') | |
line 1971: | |
line 1972: " Calendar | |
line 1975: au BufNewFile,BufRead */.calendar/*,*/share/calendar/*/calendar.*,*/share/calendar/calendar.*^I^I^I^I^Icall s:StarSetf('calendar') | |
line 1976: | |
line 1977: " Changelog | |
line 1983: au BufNewFile,BufRead [cC]hange[lL]og* if getline(1) =~ '; urgency='| call s:StarSetf('debchangelog')|else| call s:StarSetf('changelog')|endif | |
line 1984: | |
line 1985: " Crontab | |
line 1986: au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/*^I^Icall s:StarSetf('crontab') | |
line 1987: | |
line 1988: " dnsmasq(8) configuration | |
line 1989: au BufNewFile,BufRead */etc/dnsmasq.d/*^I^Icall s:StarSetf('dnsmasq') | |
line 1990: | |
line 1991: " Dracula | |
line 1992: au BufNewFile,BufRead drac.*^I^I^Icall s:StarSetf('dracula') | |
line 1993: | |
line 1994: " Fvwm | |
line 1995: au BufNewFile,BufRead */.fvwm/*^I^I^Icall s:StarSetf('fvwm') | |
line 1997: au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook let b:fvwm_version = 1 | call s:StarSetf('fvwm') | |
line 2003: au BufNewFile,BufRead *fvwm2rc* if expand("<afile>:e") == "m4"| call s:StarSetf('fvwm2m4')|else| let b:fvwm_version = 2 | call s:StarSetf('fvwm')|endif | |
line 2004: | |
line 2005: " Gedcom | |
line 2006: au BufNewFile,BufRead */tmp/lltmp*^I^Icall s:StarSetf('gedcom') | |
line 2007: | |
line 2008: " GTK RC | |
line 2009: au BufNewFile,BufRead .gtkrc*,gtkrc*^I^Icall s:StarSetf('gtkrc') | |
line 2010: | |
line 2011: " Jam | |
line 2012: au BufNewFile,BufRead Prl*.*,JAM*.*^I^Icall s:StarSetf('jam') | |
line 2013: | |
line 2014: " Jargon | |
line 2018: 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 | |
line 2019: | |
line 2020: " Kconfig | |
line 2021: au BufNewFile,BufRead Kconfig.*^I^I^Icall s:StarSetf('kconfig') | |
line 2022: | |
line 2023: " Lilo: Linux loader | |
line 2024: au BufNewFile,BufRead lilo.conf*^I^Icall s:StarSetf('lilo') | |
line 2025: | |
line 2026: " Logcheck | |
line 2027: au BufNewFile,BufRead */etc/logcheck/*.d*/*^Icall s:StarSetf('logcheck') | |
line 2028: | |
line 2029: " Makefile | |
line 2030: au BufNewFile,BufRead [mM]akefile*^I^Icall s:StarSetf('make') | |
line 2031: | |
line 2032: " Ruby Makefile | |
line 2033: au BufNewFile,BufRead [rR]akefile*^I^Icall s:StarSetf('ruby') | |
line 2034: | |
line 2035: " Mail (also matches muttrc.vim, so this is below the other checks) | |
line 2036: au BufNewFile,BufRead {neo,}mutt[[:alnum:]._-]\\\{6\}^Isetf mail | |
line 2037: | |
line 2038: au BufNewFile,BufRead reportbug-*^I^Icall s:StarSetf('mail') | |
line 2039: | |
line 2040: " Modconf | |
line 2044: au BufNewFile,BufRead */etc/modutils/* if executable(expand("<afile>")) != 1| call s:StarSetf('modconf')|endif | |
line 2045: au BufNewFile,BufRead */etc/modprobe.*^I^Icall s:StarSetf('modconf') | |
line 2046: | |
line 2047: " Mutt setup file | |
line 2048: au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc*^Icall s:StarSetf('muttrc') | |
line 2049: au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc*^I^Icall s:StarSetf('muttrc') | |
line 2050: | |
line 2051: " Neomutt setup file | |
line 2052: au BufNewFile,BufRead .neomuttrc*,*/.neomutt/neomuttrc*^Icall s:StarSetf('neomuttrc') | |
line 2053: au BufNewFile,BufRead neomuttrc*,Neomuttrc*^I^Icall s:StarSetf('neomuttrc') | |
line 2054: | |
line 2055: " Nroff macros | |
line 2056: au BufNewFile,BufRead tmac.*^I^I^Icall s:StarSetf('nroff') | |
line 2057: | |
line 2058: " OpenBSD hostname.if | |
line 2059: au BufNewFile,BufRead /etc/hostname.*^I^Icall s:StarSetf('config') | |
line 2060: | |
line 2061: " Pam conf | |
line 2062: au BufNewFile,BufRead */etc/pam.d/*^I^Icall s:StarSetf('pamconf') | |
line 2063: | |
line 2064: " Printcap and Termcap | |
line 2068: au BufNewFile,BufRead *printcap* if !did_filetype()| let b:ptcap_type = "print" | call s:StarSetf('ptcap')|endif | |
line 2072: au BufNewFile,BufRead *termcap* if !did_filetype()| let b:ptcap_type = "term" | call s:StarSetf('ptcap')|endif | |
line 2073: | |
line 2074: " ReDIF | |
line 2075: " Only used when the .rdf file was not detected to be XML. | |
line 2076: au BufRead,BufNewFile *.rdf^I^I^Icall dist#ft#Redif() | |
line 2077: | |
line 2078: " Remind | |
line 2079: au BufNewFile,BufRead .reminders*^I^Icall s:StarSetf('remind') | |
line 2080: | |
line 2081: " Shell scripts ending in a star | |
line 2082: au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash") | |
line 2083: au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh") | |
line 2084: au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1)) | |
line 2085: | |
line 2086: " tcsh scripts ending in a star | |
line 2087: au BufNewFile,BufRead .tcshrc*^Icall dist#ft#SetFileTypeShell("tcsh") | |
line 2088: | |
line 2089: " csh scripts ending in a star | |
line 2090: au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH() | |
line 2091: | |
line 2092: " Vim script | |
line 2093: au BufNewFile,BufRead *vimrc*^I^I^Icall s:StarSetf('vim') | |
line 2094: | |
line 2095: " Subversion commit file | |
line 2096: au BufNewFile,BufRead svn-commit*.tmp^I^Isetf svn | |
line 2097: | |
line 2098: " X resources file | |
line 2099: au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults') | |
line 2100: | |
line 2101: " XFree86 config | |
line 2103: au BufNewFile,BufRead XF86Config-4* let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf') | |
line 2108: au BufNewFile,BufRead XF86Config* if getline(1) =~ '\<XConfigurator\>'| let b:xf86conf_xfree86_version = 3|endif|call s:StarSetf('xf86conf') | |
line 2109: | |
line 2110: " X11 xmodmap | |
line 2111: au BufNewFile,BufRead *xmodmap*^I^I^Icall s:StarSetf('xmodmap') | |
line 2112: | |
line 2113: " Xinetd conf | |
line 2114: au BufNewFile,BufRead */etc/xinetd.d/*^I^Icall s:StarSetf('xinetd') | |
line 2115: | |
line 2116: " yum conf (close enough to dosini) | |
line 2117: au BufNewFile,BufRead */etc/yum.repos.d/*^Icall s:StarSetf('dosini') | |
line 2118: | |
line 2119: " Z-Shell script ending in a star | |
line 2120: au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') | |
line 2121: au BufNewFile,BufRead zsh*,zlog*^I^Icall s:StarSetf('zsh') | |
line 2122: | |
line 2123: | |
line 2124: " Plain text files, needs to be far down to not override others. This avoids | |
line 2125: " the "conf" type being used if there is a line starting with '#'. | |
line 2126: au BufNewFile,BufRead *.text,README^I^Isetf text | |
line 2127: | |
line 2128: " Help files match *.txt but should have a last line that is a modeline. | |
line 2132: au BufNewFile,BufRead *.txt if getline('$') !~ 'vim:.*ft=help'| setf text| endif | |
line 2133: | |
line 2134: | |
line 2135: " Use the filetype detect plugins. They may overrule any of the previously | |
line 2136: " detected filetypes. | |
line 2137: runtime! ftdetect/*.vim | |
Searching for "ftdetect/*.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/ftdetect/*.vim" | |
chdir(/home/migacz/.vim/bundle/vim-fugitive/ftdetect) | |
fchdir() to previous dir | |
line 2137: sourcing "/home/migacz/.vim/bundle/vim-fugitive/ftdetect/fugitive.vim" | |
line 1: autocmd BufReadPost *.fugitiveblame setfiletype fugitiveblame | |
finished sourcing /home/migacz/.vim/bundle/vim-fugitive/ftdetect/fugitive.vim | |
continuing in /usr/share/vim/vim81/filetype.vim | |
Searching for "/home/migacz/.vim/bundle/L9/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/ftdetect/*.vim" | |
Searching for "/usr/share/vim/vimfiles/ftdetect/*.vim" | |
chdir(/usr/share/vim/vimfiles/ftdetect) | |
fchdir() to previous dir | |
line 2137: sourcing "/usr/share/vim/vimfiles/ftdetect/PKGBUILD.vim" | |
line 1: au BufNewFile,BufRead PKGBUILD set filetype=PKGBUILD | |
finished sourcing /usr/share/vim/vimfiles/ftdetect/PKGBUILD.vim | |
continuing in /usr/share/vim/vim81/filetype.vim | |
chdir(/usr/share/vim/vimfiles/ftdetect) | |
fchdir() to previous dir | |
line 2137: sourcing "/usr/share/vim/vimfiles/ftdetect/conkyrc.vim" | |
line 1: " Vim filetype detection file for Conky config files | |
line 2: " | |
line 3: | |
line 4: au BufNewFile,BufRead *conkyrc set filetype=conkyrc | |
line 5: au BufNewFile,BufRead conky.conf set filetype=conkyrc | |
finished sourcing /usr/share/vim/vimfiles/ftdetect/conkyrc.vim | |
continuing in /usr/share/vim/vim81/filetype.vim | |
Searching for "/usr/share/vim/vim81/ftdetect/*.vim" | |
Searching for "/usr/share/vim/vimfiles/after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/ftdetect/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/ftdetect/*.vim" | |
line 2138: | |
line 2139: " NOTE: The above command could have ended the filetypedetect autocmd group | |
line 2140: " and started another one. Let's make sure it has ended to get to a consistent | |
line 2141: " state. | |
line 2142: augroup END | |
line 2143: | |
line 2144: " Generic configuration file. Use FALLBACK, it's just guessing! | |
line 2150: au filetypedetect BufNewFile,BufRead,StdinReadPost * if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'^I|| getline(4) =~ '^#' || getline(5) =~ '^#') | setf FALLBACK conf | endif | |
line 2151: | |
line 2152: | |
line 2153: " If the GUI is already running, may still need to install the Syntax menu. | |
line 2154: " Don't do it when the 'M' flag is included in 'guioptions'. | |
line 2156: if has("menu") && has("gui_running") && !exists("did_install_syntax_menu") && &guioptions !~# "M" | |
line 2157: source <sfile>:p:h/menu.vim | |
line 2158: endif | |
line 2159: | |
line 2160: " Function called for testing all functions defined here. These are | |
line 2161: " script-local, thus need to be executed here. | |
line 2162: " Returns a string with error messages (hopefully empty). | |
line 2163: func! TestFiletypeFuncs(testlist) | |
line 2174: | |
line 2175: " Restore 'cpoptions' | |
line 2176: let &cpo = s:cpo_save | |
line 2177: unlet s:cpo_save | |
finished sourcing /usr/share/vim/vim81/filetype.vim | |
continuing in /home/migacz/.vimrc | |
Searching for "/usr/share/vim/vimfiles/after/filetype.vim" | |
Searching for "/home/migacz/.vim/after/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/filetype.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/filetype.vim" | |
Searching for "ftplugin.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/ftplugin.vim" | |
Searching for "/usr/share/vim/vimfiles/ftplugin.vim" | |
Searching for "/usr/share/vim/vim81/ftplugin.vim" | |
chdir(/usr/share/vim/vim81) | |
fchdir() to previous dir | |
line 80: sourcing "/usr/share/vim/vim81/ftplugin.vim" | |
line 1: " Vim support file to switch on loading plugins for file types | |
line 2: " | |
line 3: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 4: " Last change:^I2006 Apr 30 | |
line 5: | |
line 6: if exists("did_load_ftplugin") | |
line 7: finish | |
line 8: endif | |
line 9: let did_load_ftplugin = 1 | |
line 10: | |
line 11: augroup filetypeplugin | |
line 12: au FileType * call s:LoadFTPlugin() | |
line 13: | |
line 14: func! s:LoadFTPlugin() | |
line 35: augroup END | |
finished sourcing /usr/share/vim/vim81/ftplugin.vim | |
continuing in /home/migacz/.vimrc | |
Searching for "/usr/share/vim/vimfiles/after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/ftplugin.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/ftplugin.vim" | |
Searching for "indent.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/indent.vim" | |
Searching for "/usr/share/vim/vimfiles/indent.vim" | |
Searching for "/usr/share/vim/vim81/indent.vim" | |
chdir(/usr/share/vim/vim81) | |
fchdir() to previous dir | |
line 80: sourcing "/usr/share/vim/vim81/indent.vim" | |
line 1: " Vim support file to switch on loading indent files for file types | |
line 2: " | |
line 3: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 4: " Last Change:^I2008 Feb 22 | |
line 5: | |
line 6: if exists("did_indent_on") | |
line 7: finish | |
line 8: endif | |
line 9: let did_indent_on = 1 | |
line 10: | |
line 11: augroup filetypeindent | |
line 12: au FileType * call s:LoadIndent() | |
line 13: func! s:LoadIndent() | |
line 31: augroup END | |
finished sourcing /usr/share/vim/vim81/indent.vim | |
continuing in /home/migacz/.vimrc | |
Searching for "/usr/share/vim/vimfiles/after/indent.vim" | |
Searching for "/home/migacz/.vim/after/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/indent.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/indent.vim" | |
line 81: | |
line 82: "To ignore plugin indent changes, instead use: | |
line 83: "filetype plugin on | |
line 84: | |
line 85: " Brief help | |
line 86: " :PluginList - lists configured plugins | |
line 87: " :PluginInstall - installs plugins; append `!` to update or | |
line 88: " :PluginSearch foo - searches for foo; append `!` to refresh lo | |
line 89: " :PluginClean - confirms removal of unused plugins; append | |
line 90: " | |
line 91: " see :h vundle for more details or wiki for FAQ | |
line 92: " Put your non-Plugin stuff after this line | |
line 93: """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
line 94: " - VUNDLE END - | |
line 95: """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
line 96: | |
line 97: nmap zuz <Plug>(FastFoldUpdate) | |
line 98: let g:fastfold_savehook = 1 | |
line 99: let g:fastfold_fold_command_suffixes = ['x','X','a','A','o','O','c','C'] | |
line 100: let g:fastfold_fold_movement_commands = [']z', '[z', 'zj', 'zk'] | |
line 101: let g:fastfold_fold_command_suffixes = ['x','X','a','A','o','O','c','C','r','R','m','M','i','n','N'] | |
line 102: | |
line 103: let g:markdown_folding = 1 | |
line 104: let g:tex_fold_enabled = 1 | |
line 105: let g:vimsyn_folding = 'af' | |
line 106: let g:xml_syntax_folding = 1 | |
line 107: let g:javascript_fold = 1 | |
line 108: let g:sh_fold_enabled= 7 | |
line 109: let g:ruby_fold = 1 | |
line 110: let g:perl_fold = 1 | |
line 111: let g:perl_fold_blocks = 1 | |
line 112: let g:r_syntax_folding = 1 | |
line 113: let g:rust_fold = 1 | |
line 114: let g:php_folding = 1 | |
line 115: | |
line 116: """""""""""""""" | |
line 117: " vim settings " | |
line 118: """""""""""""""" | |
line 119: let mapleader = "\<space>" | |
line 120: | |
line 121: """""""""""""""" | |
line 122: " nnoremap | |
line 123: """""""""""""""" | |
line 124: | |
line 125: " tabs | |
line 126: nnoremap tn :tabnew<cr> | |
line 127: nnoremap tk :tabnext<cr> | |
line 128: nnoremap tj :tabprev<cr> | |
line 129: nnoremap th :tabfirst<cr> | |
line 130: nnoremap tl :tablast<cr> | |
line 131: nnoremap tc :tabclose<cr> | |
line 132: | |
line 133: " open vimrc file | |
line 134: nnoremap <leader>v :edit $home/.vimrc<cr> | |
line 135: | |
line 136: " resize window | |
line 137: nnoremap <leader>0 :vertical resize +10<cr> | |
line 138: nnoremap <leader>9 :vertical resize -10<cr> | |
line 139: | |
line 140: " dirs | |
line 141: nnoremap <leader>gh :cd /home/migacz<cr> | |
line 142: nnoremap <leader>gd :cd /home/migacz/downloads<cr> | |
line 143: nnoremap <leader>gp :cd /home/migacz/coding/www/4project<cr> | |
line 144: nnoremap <leader>gw :cd /home/migacz/coding/www<cr> | |
line 145: nnoremap <leader>gs :cd /home/migacz/.scripts<cr> | |
line 146: | |
line 147: " reload vim configuration file | |
line 148: nnoremap <leader>rv :source $HOME/.vimrc<cr> | |
line 149: nnoremap <leader>lh :set hls<cr> | |
line 150: nnoremap <leader>ln :set nohls<cr> | |
line 151: " improved browsing old files. press enter for open the file | |
line 152: nnoremap <leader>tb :call Browseoldfiles()<cr> | |
line 153: nnoremap <leader>rb :call Vbrowseoldfiles()<cr> | |
line 154: nnoremap <leader>cw :call Closebrowseoldfiles()<cr> | |
line 155: nnoremap <leader>wb :call Writebrowseoldfiles()<cr> | |
line 156: | |
line 157: " move cursor to c - (current) mark | |
line 158: " normal `c | |
line 159: " | |
line 160: " write current file and browse throught old files | |
line 161: | |
line 162: fun! Writebrowseoldfiles() | |
line 166: | |
line 167: " close current file and browse throught old files | |
line 168: fun! Closebrowseoldfiles() | |
line 172: | |
line 173: fun! Vbrowseoldfiles() | |
line 177: | |
line 178: fun! Browseoldfiles() | |
line 182: | |
line 183: | |
line 184: """""""""""""""" | |
line 185: " running scripts when saving/opening file | |
line 186: """""""""""""""" | |
line 187: " autocmd bufwritepost * !run_tests.sh <afile> | |
line 188: " read more here | |
line 189: " https://vim-jp.org/vimdoc-en/autocmd.html#autocmd-buflocal | |
line 190: | |
line 191: " autocmd BufReadPre * !xdotool key "ctrl+Down" key "ctrl+Up" | |
line 192: " if you have viminfo set, it will save local marks (a-z) by default. the '100 | |
line 193: | |
line 194: """""""""""""""" | |
line 195: " md files | |
line 196: """""""""""""""" | |
line 197: " turn on spelcheck automatically when editing .md files | |
line 198: autocmd bufread,bufnewfile *.md setlocal spell | |
line 199: autocmd bufread,bufnewfile *.tmp setlocal spell | |
line 200: " turn on spellcheck when writing git commits | |
line 201: autocmd filetype gitcommit setlocal spell | |
line 202: autocmd bufread,bufnewfile *.md !qutebrowser | |
line 203: | |
line 204: """""""""""""""" | |
line 205: " appearance/colors | |
line 206: """""""""""""""" | |
line 207: " colorfull syntax | |
line 208: syntax on | |
line 208: so $VIMRUNTIME/syntax/syntax.vim | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 208: sourcing "/usr/share/vim/vim81/syntax/syntax.vim" | |
line 1: " Vim syntax support file | |
line 2: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 3: " Last Change:^I2001 Sep 04 | |
line 4: | |
line 5: " This file is used for ":syntax on". | |
line 6: " It installs the autocommands and starts highlighting for all buffers. | |
line 7: | |
line 8: if !has("syntax") | |
line 9: finish | |
line 10: endif | |
line 11: | |
line 12: " If Syntax highlighting appears to be on already, turn it off first, so that | |
line 13: " any leftovers are cleared. | |
line 14: if exists("syntax_on") || exists("syntax_manual") | |
line 15: so <sfile>:p:h/nosyntax.vim | |
line 16: endif | |
line 17: | |
line 18: " Load the Syntax autocommands and set the default methods for highlighting. | |
line 19: runtime syntax/synload.vim | |
Searching for "syntax/synload.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/synload.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/synload.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/synload.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/synload.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/synload.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/synload.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/synload.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/synload.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/synload.vim" | |
Searching for "/usr/share/vim/vim81/syntax/synload.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 19: sourcing "/usr/share/vim/vim81/syntax/synload.vim" | |
line 1: " Vim syntax support file | |
line 2: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 3: " Last Change:^I2016 Nov 04 | |
line 4: | |
line 5: " This file sets up for syntax highlighting. | |
line 6: " It is loaded from "syntax.vim" and "manual.vim". | |
line 7: " 1. Set the default highlight groups. | |
line 8: " 2. Install Syntax autocommands for all the available syntax files. | |
line 9: | |
line 10: if !has("syntax") | |
line 11: finish | |
line 12: endif | |
line 13: | |
line 14: " let others know that syntax has been switched on | |
line 15: let syntax_on = 1 | |
line 16: | |
line 17: " Set the default highlighting colors. Use a color scheme if specified. | |
line 18: if exists("colors_name") | |
line 19: exe "colors " . colors_name | |
line 20: else | |
line 21: runtime! syntax/syncolor.vim | |
Searching for "syntax/syncolor.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/syncolor.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/syncolor.vim" | |
Searching for "/usr/share/vim/vim81/syntax/syncolor.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 21: sourcing "/usr/share/vim/vim81/syntax/syncolor.vim" | |
line 1: " Vim syntax support file | |
line 2: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 3: " Last Change:^I2001 Sep 12 | |
line 4: | |
line 5: " This file sets up the default methods for highlighting. | |
line 6: " It is loaded from "synload.vim" and from Vim for ":syntax reset". | |
line 7: " Also used from init_highlight(). | |
line 8: | |
line 9: if !exists("syntax_cmd") || syntax_cmd == "on" | |
line 10: " ":syntax on" works like in Vim 5.7: set colors but keep links | |
line 11: command -nargs=* SynColor hi <args> | |
line 12: command -nargs=* SynLink hi link <args> | |
line 13: else | |
line 14: if syntax_cmd == "enable" | |
line 15: " ":syntax enable" keeps any existing colors | |
line 16: command -nargs=* SynColor hi def <args> | |
line 17: command -nargs=* SynLink hi def link <args> | |
line 18: elseif syntax_cmd == "reset" | |
line 19: " ":syntax reset" resets all colors to the default | |
line 20: command -nargs=* SynColor hi <args> | |
line 21: command -nargs=* SynLink hi! link <args> | |
line 22: else | |
line 23: " User defined syncolor file has already set the colors. | |
line 24: finish | |
line 25: endif | |
line 26: endif | |
line 27: | |
line 28: " Many terminals can only use six different colors (plus black and white). | |
line 29: " Therefore the number of colors used is kept low. It doesn't look nice with | |
line 30: " too many colors anyway. | |
line 31: " Careful with "cterm=bold", it changes the color to bright for some terminals. | |
line 32: " There are two sets of defaults: for a dark and a light background. | |
line 33: if &background == "dark" | |
line 34: SynColor Comment^Iterm=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE | |
line 35: SynColor Constant^Iterm=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE | |
line 36: SynColor Special^Iterm=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE | |
line 37: SynColor Identifier^Iterm=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE | |
line 38: SynColor Statement^Iterm=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE | |
line 39: SynColor PreProc^Iterm=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE | |
line 40: SynColor Type^I^Iterm=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE | |
line 41: SynColor Underlined^Iterm=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff | |
line 42: SynColor Ignore^Iterm=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE | |
line 43: else | |
line 44: SynColor Comment^Iterm=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE | |
line 44: hi Comment^Iterm=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE | |
line 45: SynColor Constant^Iterm=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE | |
line 45: hi Constant^Iterm=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE | |
line 46: SynColor Special^Iterm=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=SlateBlue guibg=NONE | |
line 46: hi Special^Iterm=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=SlateBlue guibg=NONE | |
line 47: SynColor Identifier^Iterm=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE | |
line 47: hi Identifier^Iterm=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE | |
line 48: SynColor Statement^Iterm=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE | |
line 48: hi Statement^Iterm=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE | |
line 49: SynColor PreProc^Iterm=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE | |
line 49: hi PreProc^Iterm=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE | |
line 50: SynColor Type^I^Iterm=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE | |
line 50: hi Type^I^Iterm=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE | |
line 51: SynColor Underlined^Iterm=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue | |
line 51: hi Underlined^Iterm=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue | |
line 52: SynColor Ignore^Iterm=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE | |
line 52: hi Ignore^Iterm=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE | |
line 53: endif | |
line 54: SynColor Error^I^Iterm=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red | |
line 54: hi Error^I^Iterm=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red | |
line 55: SynColor Todo^I^Iterm=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow | |
line 55: hi Todo^I^Iterm=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow | |
line 56: | |
line 57: " Common groups that link to default highlighting. | |
line 58: " You can specify other highlighting easily. | |
line 59: SynLink String^I^IConstant | |
line 59: hi link String^I^IConstant | |
line 60: SynLink Character^IConstant | |
line 60: hi link Character^IConstant | |
line 61: SynLink Number^I^IConstant | |
line 61: hi link Number^I^IConstant | |
line 62: SynLink Boolean^I^IConstant | |
line 62: hi link Boolean^I^IConstant | |
line 63: SynLink Float^I^INumber | |
line 63: hi link Float^I^INumber | |
line 64: SynLink Function^IIdentifier | |
line 64: hi link Function^IIdentifier | |
line 65: SynLink Conditional^IStatement | |
line 65: hi link Conditional^IStatement | |
line 66: SynLink Repeat^I^IStatement | |
line 66: hi link Repeat^I^IStatement | |
line 67: SynLink Label^I^IStatement | |
line 67: hi link Label^I^IStatement | |
line 68: SynLink Operator^IStatement | |
line 68: hi link Operator^IStatement | |
line 69: SynLink Keyword^I^IStatement | |
line 69: hi link Keyword^I^IStatement | |
line 70: SynLink Exception^IStatement | |
line 70: hi link Exception^IStatement | |
line 71: SynLink Include^I^IPreProc | |
line 71: hi link Include^I^IPreProc | |
line 72: SynLink Define^I^IPreProc | |
line 72: hi link Define^I^IPreProc | |
line 73: SynLink Macro^I^IPreProc | |
line 73: hi link Macro^I^IPreProc | |
line 74: SynLink PreCondit^IPreProc | |
line 74: hi link PreCondit^IPreProc | |
line 75: SynLink StorageClass^IType | |
line 75: hi link StorageClass^IType | |
line 76: SynLink Structure^IType | |
line 76: hi link Structure^IType | |
line 77: SynLink Typedef^I^IType | |
line 77: hi link Typedef^I^IType | |
line 78: SynLink Tag^I^ISpecial | |
line 78: hi link Tag^I^ISpecial | |
line 79: SynLink SpecialChar^ISpecial | |
line 79: hi link SpecialChar^ISpecial | |
line 80: SynLink Delimiter^ISpecial | |
line 80: hi link Delimiter^ISpecial | |
line 81: SynLink SpecialComment^ISpecial | |
line 81: hi link SpecialComment^ISpecial | |
line 82: SynLink Debug^I^ISpecial | |
line 82: hi link Debug^I^ISpecial | |
line 83: | |
line 84: delcommand SynColor | |
line 85: delcommand SynLink | |
finished sourcing /usr/share/vim/vim81/syntax/syncolor.vim | |
continuing in /usr/share/vim/vim81/syntax/synload.vim | |
Searching for "/usr/share/vim/vimfiles/after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/syncolor.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/syncolor.vim" | |
line 22: endif | |
line 23: | |
line 24: " Line continuation is used here, remove 'C' from 'cpoptions' | |
line 25: let s:cpo_save = &cpo | |
line 26: set cpo&vim | |
line 27: | |
line 28: " First remove all old syntax autocommands. | |
line 29: au! Syntax | |
line 30: | |
line 31: au Syntax *^I^Icall s:SynSet() | |
line 32: | |
line 33: fun! s:SynSet() | |
line 61: | |
line 62: | |
line 63: " Handle adding doxygen to other languages (C, C++, C#, IDL, java, php, DataScript) | |
line 68: au Syntax c,cpp,cs,idl,java,php,datascript if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax)^I|| (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax) | runtime! syntax/doxygen.vim | endif | |
line 69: | |
line 70: | |
line 71: " Source the user-specified syntax highlighting file | |
line 72: if exists("mysyntaxfile") | |
line 73: let s:fname = expand(mysyntaxfile) | |
line 74: if filereadable(s:fname) | |
line 75: execute "source " . fnameescape(s:fname) | |
line 76: endif | |
line 77: endif | |
line 78: | |
line 79: " Restore 'cpoptions' | |
line 80: let &cpo = s:cpo_save | |
line 81: unlet s:cpo_save | |
finished sourcing /usr/share/vim/vim81/syntax/synload.vim | |
continuing in /usr/share/vim/vim81/syntax/syntax.vim | |
line 20: | |
line 21: " Load the FileType autocommands if not done yet. | |
line 22: if exists("did_load_filetypes") | |
line 23: let s:did_ft = 1 | |
line 24: else | |
line 25: filetype on | |
line 26: let s:did_ft = 0 | |
line 27: endif | |
line 28: | |
line 29: " Set up the connection between FileType and Syntax autocommands. | |
line 30: " This makes the syntax automatically set when the file type is detected. | |
line 31: augroup syntaxset | |
line 32: au! FileType *^Iexe "set syntax=" . expand("<amatch>") | |
line 33: augroup END | |
line 34: | |
line 35: | |
line 36: " Execute the syntax autocommands for the each buffer. | |
line 37: " If the filetype wasn't detected yet, do that now. | |
line 38: " Always do the syntaxset autocommands, for buffers where the 'filetype' | |
line 39: " already was set manually (e.g., help buffers). | |
line 40: doautoall syntaxset FileType | |
line 41: if !s:did_ft | |
line 42: doautoall filetypedetect BufRead | |
line 43: endif | |
finished sourcing /usr/share/vim/vim81/syntax/syntax.vim | |
continuing in /home/migacz/.vimrc | |
line 209: colorscheme wal | |
Searching for "colors/wal.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/colors/wal.vim" | |
Searching for "/usr/share/vim/vimfiles/colors/wal.vim" | |
Searching for "/usr/share/vim/vim81/colors/wal.vim" | |
Searching for "/usr/share/vim/vimfiles/after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/colors/wal.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/colors/wal.vim" | |
not found in 'runtimepath': "colors/wal.vim" | |
Searching for "pack/*/start/*/colors/wal.vim" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after" | |
Searching for "/home/migacz/.vim/pack/*/start/*/colors/wal.vim" | |
Searching for "/usr/share/vim/vimfiles/pack/*/start/*/colors/wal.vim" | |
Searching for "/usr/share/vim/vim81/pack/*/start/*/colors/wal.vim" | |
Searching for "/usr/share/vim/vimfiles/after/pack/*/start/*/colors/wal.vim" | |
Searching for "/home/migacz/.vim/after/pack/*/start/*/colors/wal.vim" | |
not found in 'packpath': "pack/*/start/*/colors/wal.vim" | |
Searching for "pack/*/opt/*/colors/wal.vim" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after" | |
Searching for "/home/migacz/.vim/pack/*/opt/*/colors/wal.vim" | |
Searching for "/usr/share/vim/vimfiles/pack/*/opt/*/colors/wal.vim" | |
Searching for "/usr/share/vim/vim81/pack/*/opt/*/colors/wal.vim" | |
Searching for "/usr/share/vim/vimfiles/after/pack/*/opt/*/colors/wal.vim" | |
Searching for "/home/migacz/.vim/after/pack/*/opt/*/colors/wal.vim" | |
not found in 'packpath': "pack/*/opt/*/colors/wal.vim" | |
Error detected while processing /home/migacz/.vimrc: | |
line 209: | |
E185: Cannot find colour scheme 'wal' | |
line 210: " syntax and lines | |
line 211: set nowrap | |
line 212: set relativenumber " show relative number, instead of normal linenumbers | |
line 213: set number " line number | |
line 214: " status line | |
line 215: set showcmd " show running commands | |
line 216: " add to status line current git info | |
line 217: set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%v%)\ %p | |
line 218: set wildmenu^I | |
line 219: | |
line 220: " code | |
line 221: " for folding html | |
line 222: " set foldmethod=indent "syntax | |
line 223: | |
line 224: " Help window on right | |
line 225: cnoremap help vert help | |
line 226: cabbrev h vert h | |
line 227: autocmd FileType help wincmd L | |
line 228: autocmd FileType snippets wincmd L | |
line 229: | |
line 230: """""""""""""""" | |
line 231: " set | |
line 232: """""""""""""""" | |
line 233: " for :find command look for specified file in every subdirectory | |
line 234: set path+=** | |
line 235: set ignorecase | |
line 236: | |
line 237: " if window is opend verticaly put in on the right | |
line 238: set splitright | |
line 239: | |
line 240: " plugins configuration: | |
line 241: " tells vim to save marks and other information for up to 100 files. the f1 | |
line 242: " directive tells vim to also save global marks (a-z) when it exits. if you | |
line 243: " don't want vim to do this, set it to f0 instead. | |
line 244: set viminfo='100,f1 | |
line 245: | |
line 246: " you can undo/redo changes you made to the file even if | |
line 247: " you closed the file you are editing! | |
line 248: " be sure to create the directory first | |
line 249: if has('persistent_undo') "check if your vim version supports it | |
line 250: set undofile "turn on the feature | |
line 251: set undodir=$home/.vim/undo "directory where the undo files will be stored | |
line 252: endif | |
line 253: | |
line 254: | |
line 255: " | |
line 256: """""""""""""""" | |
line 257: " plugins settings | |
line 258: """""""""""""""" | |
line 259: | |
line 260: " let commandTAlwaysShowDotFiles 1 | |
line 261: | |
line 262: " jsbeautify^I | |
line 263: " /settings how code should be prettify is in .editorconfig | |
line 264: " map <c-f> :call htmlbeautify()<cr> | |
line 265: | |
line 266: " or | |
line 267: autocmd FileType javascript nnoremap <buffer> <c-f> :call JsBeautify()<cr> | |
line 268: " for json | |
line 269: autocmd FileType json noremap <buffer> <c-f> :call Jsonbeautify()<cr> | |
line 270: " for jsx | |
line 271: autocmd FileType jsx noremap <buffer> <c-f> :call JsBeautify()<cr> | |
line 272: " for html | |
line 273: autocmd FileType html nnoremap <buffer> <c-f> :call HtmlBeautify()<cr> | |
line 274: " for css or scss | |
line 275: autocmd FileType css noremap <buffer> <c-f> :call CssBeautify()<cr> | |
line 276: " For visual sellection | |
line 277: | |
line 278: autocmd FileType javascript vnoremap <buffer> <c-f> :call RangeJsBeautify()<cr> | |
line 279: autocmd FileType json vnoremap <buffer> <c-f> :call RangeJsonBeautify()<cr> | |
line 280: autocmd FileType jsx vnoremap <buffer> <c-f> :call RangeJsxBeautify()<cr> | |
line 281: autocmd FileType html vnoremap <buffer> <c-f> :call RangeHtmlBeautify()<cr> | |
line 282: autocmd FileType css vnoremap <buffer> <c-f> :call RangeCSSBeautify()<cr> | |
line 283: | |
line 284: " FUGITIVE | |
line 285: | |
line 286: " Press .. take you back in to folder structure when browsing. | |
line 290: autocmd User fugitive if fugitive#buffer().type() =~# '^\%(tree\|blob\)$' | nnoremap <buffer> .. :edit %:h<CR> | endif | |
line 291: | |
line 292: | |
line 293: " Clean buffers from fugitive | |
line 294: autocmd BufReadPost fugitive://* set bufhidden=delete | |
line 295: | |
line 296: " NERD | |
line 297: " open/close for file browsing | |
line 298: map <C-n> :NERDTreeToggle<CR> | |
line 299: | |
line 300: " Ctrlp don't close current file, and search in hidden files also | |
line 301: let g:ctrlp_match_current_file = 1 | |
line 302: let g:ctrlp_show_hidden = 1 | |
line 303: | |
line 304: set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*/.tmp/*,*/.sass-cache/*,*/node_modules/*,*.keep,*.DS_Store,*/.git/* | |
line 305: | |
line 306: " Set directory for ctrlp | |
line 307: " :CtrlPDir ~/another_workspace | |
line 308: | |
line 309: " SYNTASTIC | |
line 310: " set statusline+=%#warningmsg# | |
line 311: " set statusline+=%{SyntasticStatuslineFlag()} | |
line 312: " set statusline+=%* | |
line 313: " let g:syntastic_always_populate_loc_list = 1 | |
line 314: " let g:syntastic_auto_loc_list = 1 | |
line 315: " let g:syntastic_check_on_open = 1 | |
line 316: " let g:syntastic_check_on_wq = 0 | |
line 317: " let g:syntastic_tex_checkers = ['lacheck', 'text/language_check'] | |
line 318: " " let g:syntastic_html_checkers = ['html/validator'] | |
line 319: | |
line 320: " Jump to next warning/error | |
line 321: nnoremap <leader>] :lne<CR> | |
line 322: nnoremap <leader>[ :lp<CR> | |
line 323: | |
line 324: "LATEX | |
line 325: " g:livepreview_engine = 'xelatex' | |
line 326: let g:livepreview_previewer = 'okular' | |
line 327: autocmd Filetype tex setl updatetime=1 | |
line 328: let g:livepreview_cursorhold_recompile = 0 | |
line 329: | |
line 330: " GRAMMA CHECK | |
line 331: let g:grammarous#use_vim_spelllang = 0 | |
line 332: let g:grammarous#enable_spell_check = 1 | |
line 333: | |
line 334: " PYTHON MODE | |
line 335: let g:pymode_lint_ignore = "W0611" | |
line 336: " For autocompletion | |
line 337: " let g:pymode_rope = 1 | |
line 338: let g:pymode_rope_completion = 1 | |
line 339: let g:pymode_rope_completion_bind = '<C-Space>' | |
line 340: " set completeopt-=preview | |
line 341: | |
line 342: autocmd CursorMovedI * if pumvisible() == 0|pclose|endif | |
finished sourcing $HOME/.vimrc | |
Searching for "pack/*/start/*" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after" | |
Searching for "/home/migacz/.vim/pack/*/start/*" | |
Searching for "/usr/share/vim/vimfiles/pack/*/start/*" | |
Searching for "/usr/share/vim/vim81/pack/*/start/*" | |
Searching for "/usr/share/vim/vimfiles/after/pack/*/start/*" | |
Searching for "/home/migacz/.vim/after/pack/*/start/*" | |
not found in 'packpath': "pack/*/start/*" | |
Searching for "plugin/**/*.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/plugin/**/*.vim" | |
chdir(/home/migacz/.vim/bundle/vim-fugitive/plugin) | |
fchdir() to previous dir | |
sourcing "/home/migacz/.vim/bundle/vim-fugitive/plugin/fugitive.vim" | |
line 1: " fugitive.vim - A Git wrapper so awesome, it should be illegal | |
line 2: " Maintainer: Tim Pope <http://tpo.pe/> | |
line 3: " Version: 2.5 | |
line 4: " GetLatestVimScripts: 2975 1 :AutoInstall: fugitive.vim | |
line 5: | |
line 6: if exists('g:loaded_fugitive') | |
line 7: finish | |
line 8: endif | |
line 9: let g:loaded_fugitive = 1 | |
line 10: | |
line 11: function! FugitiveGitDir(...) abort | |
line 22: | |
line 23: function! FugitiveCommonDir(...) abort | |
line 30: | |
line 31: function! FugitiveWorkTree(...) abort | |
line 34: | |
line 35: function! FugitiveReal(...) abort | |
line 45: | |
line 46: function! FugitiveFind(...) abort | |
line 49: | |
line 50: function! FugitivePath(...) abort | |
line 57: | |
line 58: function! FugitiveParse(...) abort | |
line 70: | |
line 71: function! FugitivePrepare(...) abort | |
line 74: | |
line 75: function! FugitiveConfig(...) abort | |
line 84: | |
line 85: function! FugitiveRemoteUrl(...) abort | |
line 88: | |
line 89: function! FugitiveHead(...) abort | |
line 96: | |
line 97: function! FugitiveStatusline(...) abort | |
line 103: | |
line 104: function! FugitiveIsGitDir(path) abort | |
line 110: | |
line 111: let s:worktree_for_dir = {} | |
line 112: let s:dir_for_worktree = {} | |
line 113: function! FugitiveTreeForGitDir(path) abort | |
line 146: | |
line 147: function! FugitiveExtractGitDir(path) abort | |
line 202: | |
line 203: function! FugitiveDetect(path) abort | |
line 217: | |
line 218: function! s:Slash(path) abort | |
line 225: | |
line 226: function! s:ProjectionistDetect() abort | |
line 240: | |
line 241: augroup fugitive | |
line 242: autocmd! | |
line 243: | |
line 244: autocmd BufNewFile,BufReadPost * call FugitiveDetect(expand('<amatch>:p')) | |
line 245: autocmd FileType netrw call FugitiveDetect(fnamemodify(get(b:, 'netrw_curdir', expand('<amatch>')), ':p')) | |
line 249: autocmd User NERDTreeInit,NERDTreeNewRoot if exists('b:NERDTree.root.path.str') | call FugitiveDetect(b:NERDTree.root.path.str()) | endif | |
line 250: autocmd VimEnter * if empty(expand('<amatch>'))|call FugitiveDetect(getcwd())|endif | |
line 251: autocmd CmdWinEnter * call FugitiveDetect(expand('#:p')) | |
line 252: | |
line 257: autocmd FileType git if exists('b:git_dir') | call fugitive#MapJumps() | call fugitive#MapCfile() | endif | |
line 261: autocmd FileType gitcommit if exists('b:git_dir') | call fugitive#MapCfile('fugitive#MessageCfile()') | endif | |
line 265: autocmd FileType fugitive if exists('b:git_dir') | call fugitive#MapCfile('fugitive#StatusCfile()') | endif | |
line 272: autocmd FileType gitrebase let &l:include = '^\%(pick\|squash\|edit\|reword\|fixup\|drop\|[pserfd]\)\>' | if exists('b:git_dir') | let &l:includeexpr = 'v:fname =~# ''^\x\{4,40\}$'' ? FugitiveFind(v:fname) : ' . (len(&l:includeexpr) ? &l:includeexpr : 'v:fname') | endif | let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') . '|setl inex= inc=' | |
line 273: | |
line 281: autocmd BufReadCmd index{,.lock} if FugitiveIsGitDir(expand('<amatch>:p:h')) | let b:git_dir = s:Slash(expand('<amatch>:p:h')) | exe fugitive#BufReadStatus() | elseif filereadable(expand('<amatch>')) | read <amatch> | 1delete_ | endif | |
line 282: autocmd BufReadCmd fugitive://*//* exe fugitive#BufReadCmd() | |
line 283: autocmd BufWriteCmd fugitive://*//[0-3]/* exe fugitive#BufWriteCmd() | |
line 284: autocmd FileReadCmd fugitive://*//* exe fugitive#FileReadCmd() | |
line 285: autocmd FileWriteCmd fugitive://*//[0-3]/* exe fugitive#FileWriteCmd() | |
line 286: if exists('##SourceCmd') | |
line 287: autocmd SourceCmd fugitive://*//* nested exe fugitive#SourceCmd() | |
line 288: endif | |
line 289: | |
line 290: autocmd User Flags call Hoist('buffer', function('FugitiveStatusline')) | |
line 291: | |
line 292: autocmd User ProjectionistDetect call s:ProjectionistDetect() | |
line 293: augroup END | |
finished sourcing /home/migacz/.vim/bundle/vim-fugitive/plugin/fugitive.vim | |
Searching for "/home/migacz/.vim/bundle/L9/plugin/**/*.vim" | |
chdir(/home/migacz/.vim/bundle/L9/plugin) | |
fchdir() to previous dir | |
sourcing "/home/migacz/.vim/bundle/L9/plugin/l9.vim" | |
line 1: "============================================================================= | |
line 2: " Copyright (C) 2009-2010 Takeshi NISHIDA | |
line 3: " | |
line 4: " GetLatestVimScripts: 3252 1 :AutoInstall: L9 | |
line 5: "============================================================================= | |
line 6: " LOAD GUARD {{{1 | |
line 7: | |
line 8: if !l9#guardScriptLoading(expand('<sfile>:p'), 702, 0, []) | |
Searching for "autoload/l9.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/autoload/l9.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/l9.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/autoload/l9.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/autoload/l9.vim" | |
chdir(/home/migacz/.vim/bundle/L9/autoload) | |
fchdir() to previous dir | |
line 8: sourcing "/home/migacz/.vim/bundle/L9/autoload/l9.vim" | |
line 1: "============================================================================= | |
line 2: " Copyright (c) 2009-2010 Takeshi NISHIDA | |
line 3: " | |
line 4: "============================================================================= | |
line 5: " LOAD GUARD {{{1 | |
line 6: | |
line 7: if exists('g:loaded_autoload_l9') | |
line 8: finish | |
line 9: endif | |
line 10: let g:loaded_autoload_l9 = 1 | |
line 11: | |
line 12: " }}}1 | |
line 13: "============================================================================= | |
line 14: " COMPATIBILITY TEST {{{1 | |
line 15: | |
line 16: " | |
line 17: let s:L9_VERSION_CURRENT = 101 | |
line 18: let s:L9_VERSION_PASSABLE = 101 | |
line 19: | |
line 20: " returns true if given version is compatible. | |
line 21: function l9#isCompatible(ver) | |
line 24: | |
line 25: let s:VERSION_FACTOR = str2float('0.01') | |
line 26: | |
line 27: " returns false if the caller script should finish. | |
line 28: " a:vimVersion: if 0, don't check vim version | |
line 29: " a:l9Version: same rule as v:version | |
line 30: function l9#guardScriptLoading(path, vimVersion, l9Version, exprs) | |
line 51: | |
line 52: " | |
line 53: function l9#getVersion() | |
line 56: | |
line 57: " }}}1 | |
line 58: "============================================================================= | |
line 59: " LIST {{{1 | |
line 60: | |
line 61: " Removes duplicates (unstable) | |
line 62: " This function doesn't change the list of argument. | |
line 63: function l9#unique(items) | |
line 78: | |
line 79: " Removes duplicates (stable) | |
line 80: " This function doesn't change the list of argument. | |
line 81: function l9#uniqueStably(items) | |
line 90: | |
line 91: " [ [0], [1,2], [3] ] -> [ 0, 1, 2, 3 ] | |
line 92: " This function doesn't change the list of argument. | |
line 93: function l9#concat(items) | |
line 100: | |
line 101: " [ [0,1,2], [3,4], [5,6,7,8] ] -> [ [0,3,5],[1,4,6] ] | |
line 102: " This function doesn't change the list of argument. | |
line 103: function l9#zip(items) | |
line 110: | |
line 111: " filter() with the maximum number of items | |
line 112: " This function doesn't change the list of argument. | |
line 113: function l9#filterWithLimit(items, expr, limit) | |
line 127: | |
line 128: " Removes if a:expr is evaluated as non-zero and returns removed items. | |
line 129: " This function change the list of argument. | |
line 130: function l9#removeIf(items, expr) | |
line 135: | |
line 136: " }}}1 | |
line 137: "============================================================================= | |
line 138: " NUMERIC {{{1 | |
line 139: | |
line 140: " }}}1 | |
line 141: "============================================================================= | |
line 142: " STRING {{{1 | |
line 143: | |
line 144: " Snips a:str and add a:mask if the length of a:str is more than a:len | |
line 145: function l9#snipHead(str, len, mask) | |
line 153: | |
line 154: " Snips a:str and add a:mask if the length of a:str is more than a:len | |
line 155: function l9#snipTail(str, len, mask) | |
line 163: | |
line 164: " Snips a:str and add a:mask if the length of a:str is more than a:len | |
line 165: function l9#snipMid(str, len, mask) | |
line 176: | |
line 177: " | |
line 178: function l9#hash224(str) | |
line 190: | |
line 191: " wildcard -> regexp | |
line 192: function l9#convertWildcardToRegexp(expr) | |
line 199: | |
line 200: " }}}1 | |
line 201: "============================================================================= | |
line 202: " LINES {{{1 | |
line 203: | |
line 204: " Removes from the line matching with a:begin first to the line matching with | |
line 205: " a:end next and returns removed lines. | |
line 206: " If matching range is not found, returns [] | |
line 207: function l9#removeLinesBetween(lines, begin, end) | |
line 221: | |
line 222: " }}}1 | |
line 223: "============================================================================= | |
line 224: " PATH {{{1 | |
line 225: | |
line 226: " returns the path separator charactor. | |
line 227: function l9#getPathSeparator() | |
line 230: | |
line 231: " [ 'a', 'b/', '/c' ] -> 'a/b/c' | |
line 232: function l9#concatPaths(paths) | |
line 246: | |
line 247: " path: '/a/b/c/d', dir: '/a/b' => 'c/d' | |
line 248: function l9#modifyPathRelativeToDir(path, dir) | |
line 256: | |
line 257: " }}}1 | |
line 258: "============================================================================= | |
line 259: " FILE {{{1 | |
line 260: | |
line 261: " Almost same as readfile(). | |
line 262: function l9#readFile(...) | |
line 271: | |
line 272: " Almost same as writefile(). | |
line 273: function l9#writeFile(...) | |
line 286: | |
line 287: " }}}1 | |
line 288: "============================================================================= | |
line 289: " BUFFER {{{1 | |
line 290: | |
line 291: " :wall/:wall! wrapper. Useful for writing readonly buffers. | |
line 292: function l9#writeAll() | |
line 303: | |
line 304: " Loads given files with :edit command | |
line 305: function l9#loadFilesToBuffers(files) | |
line 316: | |
line 317: " Deletes all buffers except given files with :bdelete command | |
line 318: function l9#deleteAllBuffersExcept(files) | |
line 326: | |
line 327: " }}}1 | |
line 328: "============================================================================= | |
line 329: " WINDOW {{{1 | |
line 330: | |
line 331: " move current window to next tabpage. | |
line 332: function l9#shiftWinNextTabpage() | |
line 347: | |
line 348: " move current window to previous tabpage. | |
line 349: function l9#shiftWinPrevTabpage() | |
line 360: | |
line 361: " move to a window containing specified buffer. | |
line 362: " returns 0 if the buffer is not found. | |
line 363: function l9#moveToBufferWindowInCurrentTabpage(bufNr) | |
line 372: | |
line 373: " returns 0 if the buffer is not found. | |
line 374: function s:moveToOtherTabpageOpeningBuffer(bufNr) | |
line 383: | |
line 384: " move to a window containing specified buffer. | |
line 385: " returns 0 if the buffer is not found. | |
line 386: function l9#moveToBufferWindowInOtherTabpage(bufNr) | |
line 392: | |
line 393: " }}}1 | |
line 394: "============================================================================= | |
line 395: " COMMAND LINE {{{1 | |
line 396: | |
line 397: " echo/echomsg with highlighting. | |
line 398: function l9#echoHl(hl, msg, prefix, addingHistory) | |
line 409: | |
line 410: " input() with highlighting. | |
line 411: " This function can take list as {completion} argument. | |
line 412: function l9#inputHl(hl, ...) | |
line 428: | |
line 429: " only called by l9#inputHl() for completion. | |
line 430: function l9#completeForInputHl(lead, line, pos) | |
line 433: | |
line 434: " }}}1 | |
line 435: "============================================================================= | |
line 436: " VISUAL MODE {{{1 | |
line 437: | |
line 438: " returns last selected text in Visual mode. | |
line 439: function l9#getSelectedText() | |
line 454: | |
line 455: | |
line 456: " }}}1 | |
line 457: "============================================================================= | |
line 458: " EVAL {{{1 | |
line 459: | |
line 460: " loads given text as Vim script with :source command | |
line 461: function l9#loadScript(text) | |
line 468: | |
line 469: | |
line 470: " }}}1 | |
line 471: "============================================================================= | |
line 472: " VARIABLES {{{1 | |
line 473: | |
line 474: " | |
line 475: function l9#defineVariableDefault(name, default) | |
line 480: | |
line 481: " }}}1 | |
line 482: "============================================================================= | |
line 483: " GREP {{{1 | |
line 484: | |
line 485: " Execute :vimgrep and opens the quickfix window if matches are found. | |
line 486: " | |
line 487: " a:pattern: search pattern. If ommitted, last search pattern (@/) is used. | |
line 488: " a:files: List of files | |
line 489: function l9#grepFiles(pattern, files) | |
line 501: | |
line 502: " Execute :vimgrep for buffers using l9#grepFiles() | |
line 503: " See also: :L9GrepBuffer :L9GrepBufferAll | |
line 504: function l9#grepBuffers(pattern, bufNrs) | |
line 508: | |
line 509: " }}}1 | |
line 510: "============================================================================= | |
line 511: " SIGN {{{1 | |
line 512: | |
line 513: " Highlights lines using :sign define and :sign place. | |
line 514: " | |
line 515: " a:linehl, a:text, a:texthl: See |signs|. Ignored if empty string. | |
line 516: " a:locations: List of [{buffer number}, {line number}] for highlighting | |
line 517: function l9#placeSign(linehl, text, texthl, locations) | |
line 528: | |
line 529: " }}}1 | |
line 530: "============================================================================= | |
line 531: " NOTIFY EXTERNALLY {{{1 | |
line 532: | |
line 533: " Notify a message using an external program. | |
line 534: " Currently supports Balloonly, Screen, and Tmux. | |
line 535: function l9#notifyExternally(msg) | |
line 540: | |
line 541: " | |
line 542: function l9#notifyBalloonly(msg) | |
line 549: | |
line 550: " | |
line 551: function l9#notifyScreen(msg) | |
line 558: | |
line 559: " | |
line 560: function l9#notifyTmux(msg) | |
line 567: | |
line 568: " }}}1 | |
line 569: "============================================================================= | |
line 570: " vim: set fdm=marker: | |
finished sourcing /home/migacz/.vim/bundle/L9/autoload/l9.vim | |
continuing in /home/migacz/.vim/bundle/L9/plugin/l9.vim | |
calling function l9#guardScriptLoading('/home/migacz/.vim/bundle/L9/plugin/l9.vim', 702, 0, []) | |
line 1: let loadedVarName = 'g:loaded_' . substitute(a:path, '\W', '_', 'g') | |
line 2: if exists(loadedVarName) | |
line 3: return 0 | |
line 4: elseif a:vimVersion > 0 && a:vimVersion > v:version | |
line 5: echoerr a:path . ' requires Vim version ' . string(a:vimVersion * s:VERSION_FACTOR) | |
line 6: return 0 | |
line 7: elseif a:l9Version > 0 && (a:l9Version > s:L9_VERSION_CURRENT || a:l9Version < s:L9_VERSION_PASSABLE) | |
line 9: echoerr a:path . ' requires L9 library version ' . string(a:l9Version * s:VERSION_FACTOR) | |
line 10: return 0 | |
line 11: endif | |
line 12: for expr in a:exprs | |
line 13: if !eval(expr) | |
line 14: echoerr a:path . ' requires: ' . expr | |
line 15: return 0 | |
line 16: endif | |
line 17: endfor | |
line 18: let {loadedVarName} = 1 | |
line 19: return 1 | |
function l9#guardScriptLoading returning #1 | |
continuing in /home/migacz/.vim/bundle/L9/plugin/l9.vim | |
line 9: finish | |
line 10: endif | |
line 11: | |
line 12: " }}}1 | |
line 13: "============================================================================= | |
line 14: " OPTIONS: {{{1 | |
line 15: | |
line 16: call l9#defineVariableDefault('g:l9_balloonly', 'balloonly.exe') | |
calling function l9#defineVariableDefault('g:l9_balloonly', 'balloonly.exe') | |
line 1: if !exists(a:name) | |
line 2: let {a:name} = a:default | |
line 3: endif | |
function l9#defineVariableDefault returning #0 | |
continuing in /home/migacz/.vim/bundle/L9/plugin/l9.vim | |
line 17: | |
line 18: " }}}1 | |
line 19: "============================================================================= | |
line 20: " ASSERTION: {{{1 | |
line 21: | |
line 22: " This command has effect only if $L9_DEBUG is non-zero. | |
line 23: " Used as follows: | |
line 24: " L9Assert a:i > 0 | |
line 25: " This command can't interpret script-local variables directly. | |
line 26: " NG: L9Assert s:a == 1 | |
line 27: " OK: execute 'L9Assert ' . s:a . ' == 1' | |
line 28: " | |
line 29: if $L9_DEBUG | |
line 30: command -nargs=* L9Assert call eval((<args>) ? 0 : s:handleFailedAssersion(<q-args>)) | |
line 31: | |
line 32: function s:handleFailedAssersion(expr) | |
line 38: | |
line 39: else | |
line 40: command -nargs=* L9Assert : | |
line 41: endif | |
line 42: | |
line 43: " }}}1 | |
line 44: "============================================================================= | |
line 45: " TIMER: {{{1 | |
line 46: | |
line 47: " These commands have effect only if $L9_TIMER is non-zero. | |
line 48: " Used as follows: | |
line 49: " L9Timer foo | |
line 50: " ... (1) | |
line 51: " L9Timer bar | |
line 52: " ... (2) | |
line 53: " L9TimerStop | |
line 54: " ... | |
line 55: " L9TimerDump <- shows each elapsed time of (1) and (2) | |
line 56: " | |
line 57: if $L9_TIMER | |
line 58: command -nargs=1 L9Timer call s:timerBegin(<q-args>) | |
line 59: command -nargs=0 L9TimerStop call s:timerStop() | |
line 60: command -nargs=0 L9TimerDump call s:timerDump() | |
line 61: | |
line 62: let s:timerData = [] | |
line 63: let s:timerTagMaxLen = 0 | |
line 64: | |
line 65: function s:timerBegin(tag) | |
line 70: | |
line 71: function s:timerStop() | |
line 79: | |
line 80: function s:timerDump() | |
line 87: | |
line 88: else | |
line 89: command -nargs=1 L9Timer : | |
line 90: command -nargs=0 L9TimerStop : | |
line 91: command -nargs=0 L9TimerDump : | |
line 92: endif | |
line 93: | |
line 94: " }}}1 | |
line 95: "============================================================================= | |
line 96: " GREP BUFFER: {{{1 | |
line 97: | |
line 98: " Grep for current buffer by l9#grepBuffers() | |
line 99: " Used as :L9GrepBuffer/pattern | |
line 100: command -nargs=? L9GrepBuffer call l9#grepBuffers(<q-args>, [bufnr('%')]) | |
line 101: | |
line 102: " Grep for all buffers by l9#grepBuffers() | |
line 103: " Used as :L9GrepBufferAll/pattern | |
line 104: command -nargs=? L9GrepBufferAll call l9#grepBuffers(<q-args>, range(1, bufnr('$'))) | |
line 105: | |
line 106: " }}}1 | |
line 107: "============================================================================= | |
line 108: " vim: set fdm=marker: | |
finished sourcing /home/migacz/.vim/bundle/L9/plugin/l9.vim | |
Searching for "/home/migacz/.vim/bundle/command-t/plugin/**/*.vim" | |
chdir(/home/migacz/.vim/bundle/command-t/plugin) | |
fchdir() to previous dir | |
sourcing "/home/migacz/.vim/bundle/command-t/plugin/command-t.vim" | |
line 1: " Copyright 2010-present Greg Hurrell. All rights reserved. | |
line 2: " Licensed under the terms of the BSD 2-clause license. | |
line 3: | |
line 4: if exists('g:command_t_loaded') || &compatible | |
line 5: finish | |
line 6: endif | |
line 7: let g:command_t_loaded = 1 | |
line 8: | |
line 9: command! -nargs=+ CommandTOpen call commandt#GotoOrOpen(<q-args>) | |
line 10: | |
line 11: if empty(&switchbuf) | |
line 12: set switchbuf=usetab | |
line 13: endif | |
line 14: | |
line 15: " HACK: use both old and new during early development | |
line 16: if has('patch-7-4-1829') && get(g:, 'CommandTEngine', 'mirkwood') ==? 'isengard' | |
line 17: call commandt#isengard#init() | |
line 18: endif | |
line 19: call commandt#mirkwood#init() | |
Searching for "autoload/commandt/mirkwood.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/autoload/commandt/mirkwood.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/commandt/mirkwood.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/autoload/commandt/mirkwood.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/autoload/commandt/mirkwood.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/autoload/commandt/mirkwood.vim" | |
chdir(/home/migacz/.vim/bundle/command-t/autoload/commandt) | |
fchdir() to previous dir | |
line 19: sourcing "/home/migacz/.vim/bundle/command-t/autoload/commandt/mirkwood.vim" | |
line 1: " Copyright 2010-present Greg Hurrell. All rights reserved. | |
line 2: " Licensed under the terms of the BSD 2-clause license. | |
line 3: | |
line 4: " Set up the original implementation Command-T engine, codenamed "mirkwood". | |
line 5: function! commandt#mirkwood#init() abort | |
finished sourcing /home/migacz/.vim/bundle/command-t/autoload/commandt/mirkwood.vim | |
continuing in /home/migacz/.vim/bundle/command-t/plugin/command-t.vim | |
calling function commandt#mirkwood#init() | |
line 1: command! CommandTBuffer call commandt#BufferFinder() | |
line 2: command! CommandTCommand call commandt#CommandFinder() | |
line 3: command! CommandTHelp call commandt#HelpFinder() | |
line 4: command! CommandTHistory call commandt#HistoryFinder() | |
line 5: command! CommandTJump call commandt#JumpFinder() | |
line 6: command! CommandTLine call commandt#LineFinder() | |
line 7: command! CommandTMRU call commandt#MRUFinder() | |
line 8: command! CommandTSearch call commandt#SearchFinder() | |
line 9: command! CommandTTag call commandt#TagFinder() | |
line 10: command! -nargs=? -complete=dir CommandT call commandt#FileFinder(<q-args>) | |
line 11: command! CommandTFlush call commandt#Flush() | |
line 12: command! CommandTLoad call commandt#Load() | |
line 13: | |
line 14: if !hasmapto('<Plug>(CommandT)') && maparg('<Leader>t', 'n') ==# '' | |
line 15: nmap <unique> <Leader>t <Plug>(CommandT) | |
line 16: endif | |
line 17: nnoremap <silent> <Plug>(CommandT) :CommandT<CR> | |
line 18: | |
line 19: if !hasmapto('<Plug>(CommandTBuffer)') && maparg('<Leader>b', 'n') ==# '' | |
line 20: nmap <unique> <Leader>b <Plug>(CommandTBuffer) | |
line 21: endif | |
line 22: nnoremap <silent> <Plug>(CommandTBuffer) :CommandTBuffer<CR> | |
line 23: | |
line 24: nnoremap <silent> <Plug>(CommandTHelp) :CommandTHelp<CR> | |
line 25: nnoremap <silent> <Plug>(CommandTHistory) :CommandTHistory<CR> | |
line 26: | |
line 27: if has('jumplist') | |
line 28: if !hasmapto('<Plug>(CommandTJump)') && maparg('<Leader>j', 'n') ==# '' | |
line 29: nmap <unique> <Leader>j <Plug>(CommandTJump) | |
line 30: endif | |
line 31: nnoremap <silent> <Plug>(CommandTJump) :CommandTJump<CR> | |
line 32: endif | |
line 33: | |
line 34: nnoremap <silent> <Plug>(CommandTCommand) :CommandTCommand<CR> | |
line 35: nnoremap <silent> <Plug>(CommandTLine) :CommandTLine<CR> | |
line 36: nnoremap <silent> <Plug>(CommandTMRU) :CommandTMRU<CR> | |
line 37: nnoremap <silent> <Plug>(CommandTSearch) :CommandTSearch<CR> | |
line 38: nnoremap <silent> <Plug>(CommandTTag) :CommandTTag<CR> | |
function commandt#mirkwood#init returning #0 | |
continuing in /home/migacz/.vim/bundle/command-t/plugin/command-t.vim | |
line 20: finish | |
finished sourcing /home/migacz/.vim/bundle/command-t/plugin/command-t.vim | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/plugin/**/*.vim" | |
chdir(/home/migacz/.vim/bundle/ranger.vim/plugin) | |
fchdir() to previous dir | |
sourcing "/home/migacz/.vim/bundle/ranger.vim/plugin/ranger.vim" | |
line 1: " Copyright (c) 2015 François Cabrol | |
line 2: " | |
line 3: " MIT License | |
line 4: " | |
line 5: " Permission is hereby granted, free of charge, to any person obtaining | |
line 6: " a copy of this software and associated documentation files (the | |
line 7: " "Software"), to deal in the Software without restriction, including | |
line 8: " without limitation the rights to use, copy, modify, merge, publish, | |
line 9: " distribute, sublicense, and/or sell copies of the Software, and to | |
line 10: " permit persons to whom the Software is furnished to do so, subject to | |
line 11: " the following conditions: | |
line 12: " | |
line 13: " The above copyright notice and this permission notice shall be | |
line 14: " included in all copies or substantial portions of the Software. | |
line 15: " | |
line 16: " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
line 17: " EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
line 18: " MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
line 19: " NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
line 20: " LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
line 21: " OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
line 22: " WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
line 23: | |
line 24: | |
line 25: " ================ Ranger ======================= | |
line 26: if exists('g:ranger_choice_file') | |
line 27: if empty(glob(g:ranger_choice_file)) | |
line 28: let s:choice_file_path = g:ranger_choice_file | |
line 29: else | |
line 30: echom "Message from *Ranger.vim* :" | |
line 31: echom "You've set the g:ranger_choice_file variable." | |
line 32: echom "Please use the path for a file that does not already exist." | |
line 33: echom "Using /tmp/chosenfile for now..." | |
line 34: endif | |
line 35: endif | |
line 36: | |
line 37: if exists('g:ranger_command_override') | |
line 38: let s:ranger_command = g:ranger_command_override | |
line 39: else | |
line 40: let s:ranger_command = 'ranger' | |
line 41: endif | |
line 42: | |
line 43: if !exists('s:choice_file_path') | |
line 44: let s:choice_file_path = '/tmp/chosenfile' | |
line 45: endif | |
line 46: | |
line 47: if has('nvim') | |
line 48: function! OpenRangerIn(path, edit_cmd) | |
line 72: else | |
line 73: function! OpenRangerIn(path, edit_cmd) | |
line 91: endif | |
line 92: | |
line 93: " For backwards-compatibility (deprecated) | |
line 94: if exists('g:ranger_open_new_tab') && g:ranger_open_new_tab | |
line 95: let s:default_edit_cmd='tabedit ' | |
line 96: else | |
line 97: let s:default_edit_cmd='edit ' | |
line 98: endif | |
line 99: | |
line 100: command! RangerCurrentFile call OpenRangerIn("%", s:default_edit_cmd) | |
line 101: command! RangerCurrentDirectory call OpenRangerIn("%:p:h", s:default_edit_cmd) | |
line 102: command! RangerWorkingDirectory call OpenRangerIn(".", s:default_edit_cmd) | |
line 103: command! Ranger RangerCurrentFile | |
line 104: | |
line 105: " To open the selected file in a new tab | |
line 106: command! RangerCurrentFileNewTab call OpenRangerIn("%", 'tabedit ') | |
line 107: command! RangerCurrentDirectoryNewTab call OpenRangerIn("%:p:h", 'tabedit ') | |
line 108: command! RangerWorkingDirectoryNewTab call OpenRangerIn(".", 'tabedit ') | |
line 109: command! RangerNewTab RangerCurrentDirectoryNewTab | |
line 110: | |
line 111: " For retro-compatibility | |
line 112: function! OpenRanger() | |
line 115: | |
line 116: " Open Ranger in the directory passed by argument | |
line 117: function! OpenRangerOnVimLoadDir(argv_path) | |
line 126: | |
line 127: " To open ranger when vim load a directory | |
line 128: if exists('g:ranger_replace_netrw') && g:ranger_replace_netrw | |
line 129: augroup ReplaceNetrwByRangerVim | |
line 130: autocmd VimEnter * silent! autocmd! FileExplorer | |
line 131: autocmd BufEnter * if isdirectory(expand("%")) | call OpenRangerOnVimLoadDir("%") | endif | |
line 132: augroup END | |
line 133: endif | |
line 134: | |
line 135: if !exists('g:ranger_map_keys') || g:ranger_map_keys | |
line 136: map <leader>f :Ranger<CR> | |
line 137: endif | |
line 138: | |
finished sourcing /home/migacz/.vim/bundle/ranger.vim/plugin/ranger.vim | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/plugin/**/*.vim" | |
chdir(/home/migacz/.vim/bundle/vim-jsbeautify/plugin) | |
fchdir() to previous dir | |
sourcing "/home/migacz/.vim/bundle/vim-jsbeautify/plugin/beautifier.vim" | |
line 1: "% Preliminary validation of global variables | |
line 2: " and version of the editor. | |
line 3: | |
line 4: if v:version < 700 | |
line 5: finish | |
line 6: endif | |
line 7: | |
line 8: " check whether this script is already loaded | |
line 9: if exists('g:loaded_Beautifier') | |
line 10: finish | |
line 11: endif | |
line 12: | |
line 13: let g:loaded_Beautifier = 1 | |
line 14: | |
line 15: if !exists('g:config_Beautifier') | |
line 16: let g:config_Beautifier = {} | |
line 17: endif | |
line 18: | |
line 19: if !exists('g:editorconfig_Beautifier') | |
line 20: let g:editorconfig_Beautifier = '' | |
line 21: endif | |
line 22: | |
line 23: " temporary file for content | |
line 24: if !exists('g:tmp_file_Beautifier') | |
line 25: let g:tmp_file_Beautifier = fnameescape(tempname()) | |
line 26: endif | |
line 27: | |
line 28: " Which file types supported vim plugin | |
line 29: " Default settings for this file types you can see | |
line 30: " in file plugin/.editorconfig | |
line 31: let s:supportedFileTypes = ['js', 'css', 'html', 'jsx', 'json'] | |
line 32: | |
line 33: "% Helper functions and variables | |
line 34: let s:plugin_Root_directory = fnamemodify(expand("<sfile>"), ":h") | |
line 35: let s:paths_Editorconfig = map(['$HOME/.editorconfig', '$HOME/.vim/.editorconfig', '$HOME/.config/nvim/.editorconfig', s:plugin_Root_directory.'/.editorconfig'], 'expand(v:val)') | |
line 36: | |
line 37: " Function for debugging | |
line 38: " @param {Any} content Any type which will be converted | |
line 39: " to string and write to tmp file | |
line 40: func! s:console(content) | |
line 45: | |
line 46: " Output warning message | |
line 47: " @param {Any} message The warning message | |
line 48: fun! WarningMsg(message) | |
line 52: | |
line 53: " Output error message | |
line 54: " @param {Any} message The error message | |
line 55: fun! ErrorMsg(message) | |
line 58: | |
line 59: " Check type of files | |
line 60: " @param {String} type The verified type | |
line 61: " @param {[List]} The list of allowed types | |
line 62: " | |
line 63: " @return {Boolean} Is the type in list of allowed types | |
line 64: func! s:isAllowedType(type, ...) | |
line 71: | |
line 72: " Quoting string | |
line 73: " @param {String} str Any string | |
line 74: " @return {String} The quoted string | |
line 75: func! s:quote(str) | |
line 78: | |
line 79: " convert string to JSON | |
line 80: " @param {String} str Any string | |
line 81: " @return {String} The JSON string | |
line 82: func! s:toJSON(str) | |
line 93: | |
line 94: " @param {String} The content of .editorconfig file | |
line 95: " @return {Dict} The configuration object based | |
line 96: " on content the file. | |
line 97: func! s:processingEditconfigFile(content) | |
line 163: | |
line 164: " Convert some property from editorconfig | |
line 165: " to js-beautifier. For example `tab`. | |
line 166: " | |
line 167: " param {Dict} value The configuration object. | |
line 168: " return {Dict} Return the same configuration object. | |
line 169: function s:treatConfig(config) | |
line 188: | |
line 189: " Метод которые обновляет | |
line 190: " скриптовой 'приватный' объект | |
line 191: " конфигурации | |
line 192: " | |
line 193: " param {Dict} value The configuration object. | |
line 194: " return {Dict} Return copy of configuration obect with link on | |
line 195: " old config or empty object. | |
line 196: function s:updateConfig(value) | |
line 214: | |
line 215: " Get default path | |
line 216: " @param {String} type Some of the types js, html or css | |
line 217: func s:getPathByType(type) | |
line 230: | |
line 231: | |
line 232: | |
line 233: " Helper functions for restoring mark and cursor position | |
line 234: function! s:getNumberOfNonSpaceCharactersFromTheStartOfFile(position) | |
line 257: | |
line 258: | |
line 259: | |
line 260: "Converts number of non blank characters to cursor position (line and column) | |
line 261: function! s:getCursorPosition(numberOfNonBlankCharactersFromTheStartOfFile) | |
line 284: | |
line 285: | |
line 286: | |
line 287: "Restoring current position by number of non blank characters | |
line 288: function! s:setNumberOfNonSpaceCharactersBeforeCursor(mark,numberOfNonBlankCharactersFromTheStartOfFile) | |
line 295: | |
line 296: | |
line 297: | |
line 298: function! s:getCursorAndMarksPositions() | |
line 311: | |
line 312: | |
line 313: | |
line 314: | |
line 315: "% Declaring global variables and functions | |
line 316: | |
line 317: " Apply settings from 'editorconfig' file to beautifier. | |
line 318: " @param {String} filepath path to configuration 'editorconfig' file. | |
line 319: " @return {Number} If apply was success then return '0' else '1' | |
line 320: function BeautifierApplyConfig(...) | |
line 352: | |
line 353: | |
line 354: " Common function for beautify | |
line 355: " @param {String} type The type of file js, css, html | |
line 356: " @param {[String]} line1 The start line from which will start | |
line 357: " formating text, by default '1' | |
line 358: " @param {[String]} line2 The end line on which stop formating, | |
line 359: " by default '$' | |
line 360: func! Beautifier(...) | |
line 446: | |
line 447: " editorconfig hook | |
line 448: " Intergration with editorconfig. | |
line 449: " https://github.com/editorconfig/editorconfig-vim.git | |
line 450: func! BeautifierEditorconfigHook(config) | |
line 483: | |
line 484: " @param {[Number|String]} a:0 Default value '1' | |
line 485: " @param {[Number|String]} a:1 Default value '$' | |
line 486: fun! RangeJsBeautify() range | |
line 489: | |
line 490: fun! JsBeautify(...) | |
line 493: | |
line 494: fun! JsxBeautify(...) | |
line 497: | |
line 498: fun! RangeJsxBeautify() range | |
line 501: | |
line 502: fun! JsonBeautify(...) | |
line 505: | |
line 506: fun! RangeJsonBeautify() range | |
line 509: | |
line 510: fun! RangeHtmlBeautify() range | |
line 513: | |
line 514: fun! HtmlBeautify(...) | |
line 517: | |
line 518: fun! RangeCSSBeautify() range | |
line 521: | |
line 522: fun! CSSBeautify(...) | |
line 525: | |
line 526: " Check if installed editorconfig plugin | |
line 527: " then add hook on change | |
line 528: try | |
line 529: let BeautifierHook = function('BeautifierEditorconfigHook') | |
line 530: call editorconfig#AddNewHook(BeautifierHook) | |
Searching for "autoload/editorconfig.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/autoload/editorconfig.vim" | |
Searching for "/usr/share/vim/vimfiles/autoload/editorconfig.vim" | |
Searching for "/usr/share/vim/vim81/autoload/editorconfig.vim" | |
Searching for "/usr/share/vim/vimfiles/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/autoload/editorconfig.vim" | |
not found in 'runtimepath': "autoload/editorconfig.vim" | |
Searching for "autoload/editorconfig.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/autoload/editorconfig.vim" | |
Searching for "/usr/share/vim/vimfiles/autoload/editorconfig.vim" | |
Searching for "/usr/share/vim/vim81/autoload/editorconfig.vim" | |
Searching for "/usr/share/vim/vimfiles/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/autoload/editorconfig.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/autoload/editorconfig.vim" | |
not found in 'runtimepath': "autoload/editorconfig.vim" | |
Exception thrown: Vim(call):E117: Unknown function: editorconfig#AddNewHook | |
line 531: catch | |
Exception caught: Vim(call):E117: Unknown function: editorconfig#AddNewHook | |
line 532: endt | |
Exception finished: Vim(call):E117: Unknown function: editorconfig#AddNewHook | |
line 533: | |
line 534: "XXX: legacy block code | |
line 535: "yet retain support old config | |
line 536: fun! LegacyMsg() | |
line 539: | |
line 540: if exists('g:jsbeautify') | |
line 541: let g:config_Beautifier['js'] = g:jsbeautify | |
line 542: if exists('g:jsbeautify_file') | |
line 543: let g:config_Beautifier['js']['path'] = g:jsbeautify_file | |
line 544: endif | |
line 545: call LegacyMsg() | |
line 546: endif | |
line 547: | |
line 548: if exists('g:htmlbeautify') | |
line 549: let g:config_Beautifier['html'] = g:htmlbeautify | |
line 550: if exists('g:htmlbeautify_file') | |
line 551: let g:config_Beautifier['html']['path'] = g:htmlbeautify_file | |
line 552: endif | |
line 553: call LegacyMsg() | |
line 554: endif | |
line 555: | |
line 556: if exists('g:htmlbeautify') | |
line 557: let g:config_Beautifier['css'] = g:cssbeautify | |
line 558: if exists('g:cssbeautify_file') | |
line 559: let g:config_Beautifier['css']['path'] = g:cssbeautify_file | |
line 560: endif | |
line 561: call LegacyMsg() | |
line 562: endif | |
line 563: "XXX: end | |
line 564: | |
line 565: " If user doesn't set config_Beautifier in | |
line 566: " .vimrc then look up it in .editorconfig | |
line 567: if empty(g:config_Beautifier) | |
line 568: call BeautifierApplyConfig(g:editorconfig_Beautifier) | |
calling function BeautifierApplyConfig('') | |
line 1: | |
line 2: " Получаем путь который нам передали | |
line 3: let l:filepath = expand(get(a:000, 0)) | |
line 4: | |
line 5: " Проходимся по дефолтным путям только если | |
line 6: " оказалось что нам не передали путь | |
line 7: " | |
line 8: " Если нам передали путь то не стоит его | |
line 9: " тут проверять на сушествование | |
line 10: if empty(l:filepath) | |
line 11: let l:filepath = get(filter(copy(s:paths_Editorconfig),'filereadable(v:val)'), 0) | |
line 12: endif | |
line 13: | |
line 14: if !filereadable(l:filepath) | |
line 15: " File doesn't exist then return '1' | |
line 16: call WarningMsg('Can not find global .editorconfig file!') | |
line 17: return 1 | |
line 18: endif | |
line 19: | |
line 20: | |
line 21: let l:content = readfile(l:filepath) | |
line 22: | |
line 23: " Process .editorconfig file | |
line 24: let opts = s:processingEditconfigFile(l:content) | |
calling function BeautifierApplyConfig[24]..<SNR>22_processingEditconfigFile([';.editorconfig', '', 'root = true', ...ent_size = 1', 'max_char = 68', '', '']) | |
line 1: let opts = {} | |
line 2: let content = a:content | |
line 3: | |
line 4: for type in s:supportedFileTypes | |
line 5: " Get settings for javascript files | |
line 6: " collect all data after [**.js] to | |
line 7: " empty string | |
line 8: let index = index(content, '[**.'.type.']') | |
line 9: let l:value = {} | |
line 10: | |
line 11: if index == -1 | |
line 12: " If section doesn't define then set it how | |
line 13: " empty object | |
line 14: " @fix issue-25 | |
line 15: let opts[type] = l:value | |
line 16: continue | |
line 17: endif | |
line 18: | |
line 19: " line with declaration [**.type] | |
line 20: " we shoul skip. | |
line 21: let index = index + 1 | |
line 22: let line = get(content, index) | |
line 23: | |
line 24: " if string start with bracket | |
line 25: " then we assumes that it's | |
line 26: " start new logical section | |
line 27: " and break processing | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 60: | |
line 61: let opts[type] = l:value | |
line 62: endfor | |
line 4: for type in s:supportedFileTypes | |
line 5: " Get settings for javascript files | |
line 6: " collect all data after [**.js] to | |
line 7: " empty string | |
line 8: let index = index(content, '[**.'.type.']') | |
line 9: let l:value = {} | |
line 10: | |
line 11: if index == -1 | |
line 12: " If section doesn't define then set it how | |
line 13: " empty object | |
line 14: " @fix issue-25 | |
line 15: let opts[type] = l:value | |
line 16: continue | |
line 17: endif | |
line 18: | |
line 19: " line with declaration [**.type] | |
line 20: " we shoul skip. | |
line 21: let index = index + 1 | |
line 22: let line = get(content, index) | |
line 23: | |
line 24: " if string start with bracket | |
line 25: " then we assumes that it's | |
line 26: " start new logical section | |
line 27: " and break processing | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 60: | |
line 61: let opts[type] = l:value | |
line 62: endfor | |
line 4: for type in s:supportedFileTypes | |
line 5: " Get settings for javascript files | |
line 6: " collect all data after [**.js] to | |
line 7: " empty string | |
line 8: let index = index(content, '[**.'.type.']') | |
line 9: let l:value = {} | |
line 10: | |
line 11: if index == -1 | |
line 12: " If section doesn't define then set it how | |
line 13: " empty object | |
line 14: " @fix issue-25 | |
line 15: let opts[type] = l:value | |
line 16: continue | |
line 17: endif | |
line 18: | |
line 19: " line with declaration [**.type] | |
line 20: " we shoul skip. | |
line 21: let index = index + 1 | |
line 22: let line = get(content, index) | |
line 23: | |
line 24: " if string start with bracket | |
line 25: " then we assumes that it's | |
line 26: " start new logical section | |
line 27: " and break processing | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 60: | |
line 61: let opts[type] = l:value | |
line 62: endfor | |
line 4: for type in s:supportedFileTypes | |
line 5: " Get settings for javascript files | |
line 6: " collect all data after [**.js] to | |
line 7: " empty string | |
line 8: let index = index(content, '[**.'.type.']') | |
line 9: let l:value = {} | |
line 10: | |
line 11: if index == -1 | |
line 12: " If section doesn't define then set it how | |
line 13: " empty object | |
line 14: " @fix issue-25 | |
line 15: let opts[type] = l:value | |
line 16: continue | |
line 17: endif | |
line 18: | |
line 19: " line with declaration [**.type] | |
line 20: " we shoul skip. | |
line 21: let index = index + 1 | |
line 22: let line = get(content, index) | |
line 23: | |
line 24: " if string start with bracket | |
line 25: " then we assumes that it's | |
line 26: " start new logical section | |
line 27: " and break processing | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 60: | |
line 61: let opts[type] = l:value | |
line 62: endfor | |
line 4: for type in s:supportedFileTypes | |
line 5: " Get settings for javascript files | |
line 6: " collect all data after [**.js] to | |
line 7: " empty string | |
line 8: let index = index(content, '[**.'.type.']') | |
line 9: let l:value = {} | |
line 10: | |
line 11: if index == -1 | |
line 12: " If section doesn't define then set it how | |
line 13: " empty object | |
line 14: " @fix issue-25 | |
line 15: let opts[type] = l:value | |
line 16: continue | |
line 17: endif | |
line 18: | |
line 19: " line with declaration [**.type] | |
line 20: " we shoul skip. | |
line 21: let index = index + 1 | |
line 22: let line = get(content, index) | |
line 23: | |
line 24: " if string start with bracket | |
line 25: " then we assumes that it's | |
line 26: " start new logical section | |
line 27: " and break processing | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 60: | |
line 61: let opts[type] = l:value | |
line 62: endfor | |
line 4: for type in s:supportedFileTypes | |
line 5: " Get settings for javascript files | |
line 6: " collect all data after [**.js] to | |
line 7: " empty string | |
line 8: let index = index(content, '[**.'.type.']') | |
line 9: let l:value = {} | |
line 10: | |
line 11: if index == -1 | |
line 12: " If section doesn't define then set it how | |
line 13: " empty object | |
line 14: " @fix issue-25 | |
line 15: let opts[type] = l:value | |
line 16: continue | |
line 17: endif | |
line 18: | |
line 19: " line with declaration [**.type] | |
line 20: " we shoul skip. | |
line 21: let index = index + 1 | |
line 22: let line = get(content, index) | |
line 23: | |
line 24: " if string start with bracket | |
line 25: " then we assumes that it's | |
line 26: " start new logical section | |
line 27: " and break processing | |
line 28: while (strpart(line, 0, 1) != '[' && index <= len(content)) | |
line 29: | |
line 30: if (!empty(matchstr(line, ';\(vim:\)\@!')) || empty(line)) | |
line 31: " if we meet comment which is don't | |
line 32: " special comment or empty string | |
line 33: " then stop processing this line | |
line 34: let index = index + 1 | |
line 35: let line = get(content, index) | |
line 36: continue | |
line 37: endif | |
line 38: | |
line 39: " special comment should look like | |
line 40: " ';vim:key=value:second=value' | |
line 41: if strpart(line, 0, 1) == ';' | |
line 42: " if it's special comment then procesisng | |
line 43: " it separate and continue processing | |
line 44: let l:copts = split(strpart(line, 5), ':') | |
line 45: | |
line 46: for part in l:copts | |
line 47: let data = split(part, '\s*=\s*') | |
line 48: let l:value[get(data, 0)] = get(data, 1) | |
line 49: endfor | |
line 50: else | |
line 51: " else we assumes that it is | |
line 52: " .editorconfig setting | |
line 53: let data = split(line, '\s*=\s*') | |
line 54: let l:value[get(data, 0)] = get(data, 1) | |
line 55: endif | |
line 56: | |
line 57: let index = index + 1 | |
line 58: let line = get(content, index) | |
line 59: endwhile | |
line 60: | |
line 61: let opts[type] = l:value | |
line 62: endfor | |
line 63: | |
line 64: return opts | |
function BeautifierApplyConfig[24]..<SNR>22_processingEditconfigFile returning {'jsx': {'e4x': 'true', 'indent_style'...t_style': 'space', 'indent_size': '3'}} | |
continuing in function BeautifierApplyConfig | |
line 25: | |
line 26: let g:config_Beautifier = opts | |
line 27: call s:updateConfig(opts) | |
calling function BeautifierApplyConfig[27]..<SNR>22_updateConfig({'jsx': {'e4x': 'true', 'indent_style'...t_style': 'space', 'indent_size': '3'}}) | |
line 1: if empty(a:value) | |
line 2: return a:value | |
line 3: endif | |
line 4: | |
line 5: let config = deepcopy(a:value) | |
line 6: | |
line 7: for type in s:supportedFileTypes | |
line 8: if has_key(config, type) | |
line 9: call s:treatConfig(config[type]) | |
calling function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig({'indent_style': 'space', 'indent_size': '4'}) | |
line 1: let config = a:config | |
line 2: | |
line 3: if has_key(config, 'indent_style') | |
line 4: if config["indent_style"] == 'space' | |
line 5: let config["indent_char"] = ' ' | |
line 6: elseif config["indent_style"] == 'tab' | |
line 7: let config["indent_char"] = '\t' | |
line 8: " When the indent_char is tab, we always want to use 1 tab | |
line 9: let config["indent_size"] = 1 | |
line 10: endif | |
line 11: endif | |
line 12: | |
line 13: if has_key(config, 'insert_final_newline') | |
line 14: let config["end_with_newline"] = config["insert_final_newline"] | |
line 15: endif | |
line 16: | |
line 17: return config | |
function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig returning {'indent_char': ' ', 'indent_style': 'space', 'indent_size': '4'} | |
continuing in function BeautifierApplyConfig[27]..<SNR>22_updateConfig | |
line 10: endif | |
line 11: endfor | |
line 7: for type in s:supportedFileTypes | |
line 8: if has_key(config, type) | |
line 9: call s:treatConfig(config[type]) | |
calling function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig({'indent_style': 'space', 'indent_size': '3'}) | |
line 1: let config = a:config | |
line 2: | |
line 3: if has_key(config, 'indent_style') | |
line 4: if config["indent_style"] == 'space' | |
line 5: let config["indent_char"] = ' ' | |
line 6: elseif config["indent_style"] == 'tab' | |
line 7: let config["indent_char"] = '\t' | |
line 8: " When the indent_char is tab, we always want to use 1 tab | |
line 9: let config["indent_size"] = 1 | |
line 10: endif | |
line 11: endif | |
line 12: | |
line 13: if has_key(config, 'insert_final_newline') | |
line 14: let config["end_with_newline"] = config["insert_final_newline"] | |
line 15: endif | |
line 16: | |
line 17: return config | |
function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig returning {'indent_char': ' ', 'indent_style': 'space', 'indent_size': '3'} | |
continuing in function BeautifierApplyConfig[27]..<SNR>22_updateConfig | |
line 10: endif | |
line 11: endfor | |
line 7: for type in s:supportedFileTypes | |
line 8: if has_key(config, type) | |
line 9: call s:treatConfig(config[type]) | |
calling function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig({'indent_style': 'space', 'indent_size': '1', 'max_char': '68'}) | |
line 1: let config = a:config | |
line 2: | |
line 3: if has_key(config, 'indent_style') | |
line 4: if config["indent_style"] == 'space' | |
line 5: let config["indent_char"] = ' ' | |
line 6: elseif config["indent_style"] == 'tab' | |
line 7: let config["indent_char"] = '\t' | |
line 8: " When the indent_char is tab, we always want to use 1 tab | |
line 9: let config["indent_size"] = 1 | |
line 10: endif | |
line 11: endif | |
line 12: | |
line 13: if has_key(config, 'insert_final_newline') | |
line 14: let config["end_with_newline"] = config["insert_final_newline"] | |
line 15: endif | |
line 16: | |
line 17: return config | |
function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig returning {'indent_char': ' ', 'indent_style': '..., 'indent_size': '1', 'max_char': '68'} | |
continuing in function BeautifierApplyConfig[27]..<SNR>22_updateConfig | |
line 10: endif | |
line 11: endfor | |
line 7: for type in s:supportedFileTypes | |
line 8: if has_key(config, type) | |
line 9: call s:treatConfig(config[type]) | |
calling function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig({'e4x': 'true', 'indent_style': 'space', 'indent_size': '4'}) | |
line 1: let config = a:config | |
line 2: | |
line 3: if has_key(config, 'indent_style') | |
line 4: if config["indent_style"] == 'space' | |
line 5: let config["indent_char"] = ' ' | |
line 6: elseif config["indent_style"] == 'tab' | |
line 7: let config["indent_char"] = '\t' | |
line 8: " When the indent_char is tab, we always want to use 1 tab | |
line 9: let config["indent_size"] = 1 | |
line 10: endif | |
line 11: endif | |
line 12: | |
line 13: if has_key(config, 'insert_final_newline') | |
line 14: let config["end_with_newline"] = config["insert_final_newline"] | |
line 15: endif | |
line 16: | |
line 17: return config | |
function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig returning {'indent_char': ' ', 'e4x': 'true', 'indent_style': 'space', 'indent_size': '4'} | |
continuing in function BeautifierApplyConfig[27]..<SNR>22_updateConfig | |
line 10: endif | |
line 11: endfor | |
line 7: for type in s:supportedFileTypes | |
line 8: if has_key(config, type) | |
line 9: call s:treatConfig(config[type]) | |
calling function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig({'indent_style': 'space', 'indent_size': '4'}) | |
line 1: let config = a:config | |
line 2: | |
line 3: if has_key(config, 'indent_style') | |
line 4: if config["indent_style"] == 'space' | |
line 5: let config["indent_char"] = ' ' | |
line 6: elseif config["indent_style"] == 'tab' | |
line 7: let config["indent_char"] = '\t' | |
line 8: " When the indent_char is tab, we always want to use 1 tab | |
line 9: let config["indent_size"] = 1 | |
line 10: endif | |
line 11: endif | |
line 12: | |
line 13: if has_key(config, 'insert_final_newline') | |
line 14: let config["end_with_newline"] = config["insert_final_newline"] | |
line 15: endif | |
line 16: | |
line 17: return config | |
function BeautifierApplyConfig[27]..<SNR>22_updateConfig[9]..<SNR>22_treatConfig returning {'indent_char': ' ', 'indent_style': 'space', 'indent_size': '4'} | |
continuing in function BeautifierApplyConfig[27]..<SNR>22_updateConfig | |
line 10: endif | |
line 11: endfor | |
line 7: for type in s:supportedFileTypes | |
line 8: if has_key(config, type) | |
line 9: call s:treatConfig(config[type]) | |
line 10: endif | |
line 11: endfor | |
line 12: | |
line 13: " Делаем копию объекта | |
line 14: let b:config_Beautifier = config | |
line 15: | |
line 16: return b:config_Beautifier | |
function BeautifierApplyConfig[27]..<SNR>22_updateConfig returning {'jsx': {'indent_char': ' ', 'e4x': 't...t_style': 'space', 'indent_size': '3'}} | |
continuing in function BeautifierApplyConfig | |
line 28: | |
line 29: " All Ok! return '0' | |
line 30: return 0 | |
function BeautifierApplyConfig returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-jsbeautify/plugin/beautifier.vim | |
line 569: endif | |
finished sourcing /home/migacz/.vim/bundle/vim-jsbeautify/plugin/beautifier.vim | |
Searching for "/usr/share/vim/vimfiles/plugin/**/*.vim" | |
Searching for "/usr/share/vim/vim81/plugin/**/*.vim" | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/getscriptPlugin.vim" | |
line 1: " --------------------------------------------------------------------- | |
line 2: " getscriptPlugin.vim | |
line 3: " Author:^ICharles E. Campbell | |
line 4: " Date:^INov 29, 2013 | |
line 5: " Installing:^I:help glvs-install | |
line 6: " Usage:^I:help glvs | |
line 7: " | |
line 8: " GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim | |
line 9: " | |
line 10: " (Rom 15:11 WEB) Again, "Praise the Lord, all you Gentiles! Let | |
line 11: " all the peoples praise Him." | |
line 12: " --------------------------------------------------------------------- | |
line 13: " Initialization:^I{{{1 | |
line 14: " if you're sourcing this file, surely you can't be | |
line 15: " expecting vim to be in its vi-compatible mode | |
line 16: if exists("g:loaded_getscriptPlugin") | |
line 17: finish | |
line 18: endif | |
line 19: if &cp | |
line 20: if &verbose | |
line 21: echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" | |
line 22: endif | |
line 23: finish | |
line 24: endif | |
line 25: let g:loaded_getscriptPlugin = "v36" | |
line 26: let s:keepcpo = &cpo | |
line 27: set cpo&vim | |
line 28: | |
line 29: " --------------------------------------------------------------------- | |
line 30: " Public Interface: {{{1 | |
line 31: com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts() | |
line 32: com! -nargs=0 GetScripts call getscript#GetLatestVimScripts() | |
line 33: silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts() | |
line 34: | |
line 35: " --------------------------------------------------------------------- | |
line 36: " Restore Options: {{{1 | |
line 37: let &cpo= s:keepcpo | |
line 38: unlet s:keepcpo | |
line 39: | |
line 40: " --------------------------------------------------------------------- | |
line 41: " vim: ts=8 sts=2 fdm=marker nowrap | |
finished sourcing /usr/share/vim/vim81/plugin/getscriptPlugin.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/gzip.vim" | |
line 1: " Vim plugin for editing compressed files. | |
line 2: " Maintainer: Bram Moolenaar <[email protected]> | |
line 3: " Last Change: 2016 Oct 30 | |
line 4: | |
line 5: " Exit quickly when: | |
line 6: " - this plugin was already loaded | |
line 7: " - when 'compatible' is set | |
line 8: " - some autocommands are already taking care of compressed files | |
line 9: if exists("loaded_gzip") || &cp || exists("#BufReadPre#*.gz") | |
line 10: finish | |
line 11: endif | |
line 12: let loaded_gzip = 1 | |
line 13: | |
line 14: augroup gzip | |
line 15: " Remove all gzip autocommands | |
line 16: au! | |
line 17: | |
line 18: " Enable editing of gzipped files. | |
line 19: " The functions are defined in autoload/gzip.vim. | |
line 20: " | |
line 21: " Set binary mode before reading the file. | |
line 22: " Use "gzip -d", gunzip isn't always available. | |
line 23: autocmd BufReadPre,FileReadPre^I*.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst setlocal bin | |
line 24: autocmd BufReadPost,FileReadPost^I*.gz call gzip#read("gzip -dn") | |
line 25: autocmd BufReadPost,FileReadPost^I*.bz2 call gzip#read("bzip2 -d") | |
line 26: autocmd BufReadPost,FileReadPost^I*.Z call gzip#read("uncompress") | |
line 27: autocmd BufReadPost,FileReadPost^I*.lzma call gzip#read("lzma -d") | |
line 28: autocmd BufReadPost,FileReadPost^I*.xz call gzip#read("xz -d") | |
line 29: autocmd BufReadPost,FileReadPost^I*.lz call gzip#read("lzip -d") | |
line 30: autocmd BufReadPost,FileReadPost^I*.zst call gzip#read("zstd -d --rm") | |
line 31: autocmd BufWritePost,FileWritePost^I*.gz call gzip#write("gzip") | |
line 32: autocmd BufWritePost,FileWritePost^I*.bz2 call gzip#write("bzip2") | |
line 33: autocmd BufWritePost,FileWritePost^I*.Z call gzip#write("compress -f") | |
line 34: autocmd BufWritePost,FileWritePost^I*.lzma call gzip#write("lzma -z") | |
line 35: autocmd BufWritePost,FileWritePost^I*.xz call gzip#write("xz -z") | |
line 36: autocmd BufWritePost,FileWritePost^I*.lz call gzip#write("lzip") | |
line 37: autocmd BufWritePost,FileWritePost^I*.zst call gzip#write("zstd --rm") | |
line 38: autocmd FileAppendPre^I^I^I*.gz call gzip#appre("gzip -dn") | |
line 39: autocmd FileAppendPre^I^I^I*.bz2 call gzip#appre("bzip2 -d") | |
line 40: autocmd FileAppendPre^I^I^I*.Z call gzip#appre("uncompress") | |
line 41: autocmd FileAppendPre^I^I^I*.lzma call gzip#appre("lzma -d") | |
line 42: autocmd FileAppendPre^I^I^I*.xz call gzip#appre("xz -d") | |
line 43: autocmd FileAppendPre^I^I^I*.lz call gzip#appre("lzip -d") | |
line 44: autocmd FileAppendPre^I^I^I*.zst call gzip#appre("zstd -d --rm") | |
line 45: autocmd FileAppendPost^I^I*.gz call gzip#write("gzip") | |
line 46: autocmd FileAppendPost^I^I*.bz2 call gzip#write("bzip2") | |
line 47: autocmd FileAppendPost^I^I*.Z call gzip#write("compress -f") | |
line 48: autocmd FileAppendPost^I^I*.lzma call gzip#write("lzma -z") | |
line 49: autocmd FileAppendPost^I^I*.xz call gzip#write("xz -z") | |
line 50: autocmd FileAppendPost^I^I*.lz call gzip#write("lzip") | |
line 51: autocmd FileAppendPost^I^I*.zst call gzip#write("zstd --rm") | |
line 52: augroup END | |
finished sourcing /usr/share/vim/vim81/plugin/gzip.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/logiPat.vim" | |
line 1: " LogiPat: Boolean logical pattern matcher | |
line 2: " Author: Charles E. Campbell | |
line 3: " Date: Apr 04, 2016 | |
line 4: " Version: 4 | |
line 5: " Purpose: to do Boolean-logic based regular expression pattern matching | |
line 6: " Copyright: Copyright (C) 1999-2011 Charles E. Campbell {{{1 | |
line 7: " Permission is hereby granted to use and distribute this code, | |
line 8: " with or without modifications, provided that this copyright | |
line 9: " notice is copied with it. Like most anything else that's free, | |
line 10: " LogiPat.vim is provided *as is* and comes with no warranty | |
line 11: " of any kind, either expressed or implied. By using this | |
line 12: " plugin, you agree that in no event will the copyright | |
line 13: " holder be liable for any damages resulting from the use | |
line 14: " of this software. | |
line 15: " | |
line 16: " Usage: {{{1 | |
line 17: " :LogiPat ... | |
line 18: " | |
line 19: " Boolean logic supported: | |
line 20: " () grouping operators | |
line 21: " ! not the following pattern | |
line 22: " | logical or | |
line 23: " & logical and | |
line 24: " "..pattern.." | |
line 25: "^IExample: {{{1 | |
line 26: "^I^I:LogiPat !("january"|"february") | |
line 27: "^I^I would match all strings not containing the strings january | |
line 28: "^I^I or february | |
line 29: "^IGetLatestVimScripts: 1290 1 :AutoInstall: LogiPat.vim | |
line 30: " | |
line 31: " Behold, you will conceive in your womb, and bring forth a son, {{{1 | |
line 32: " and will call his name Jesus. He will be great, and will be | |
line 33: " called the Son of the Most High. The Lord God will give him the | |
line 34: " throne of his father, David, and he will reign over the house of | |
line 35: " Jacob forever. There will be no end to his kingdom. (Luke 1:31-33 WEB) | |
line 36: | |
line 37: " --------------------------------------------------------------------- | |
line 38: " Load Once: {{{1 | |
line 39: if &cp || exists("loaded_logiPat") | |
line 40: finish | |
line 41: endif | |
line 42: let g:loaded_logiPat = "v4" | |
line 43: let s:keepcpo = &cpo | |
line 44: set cpo&vim | |
line 45: "DechoRemOn | |
line 46: | |
line 47: " --------------------------------------------------------------------- | |
line 48: " Public Interface: {{{1 | |
line 49: com! -nargs=* LogiPat^I^Icall LogiPat(<q-args>,1) | |
line 50: sil! com -nargs=* LP^I^I^Icall LogiPat(<q-args>,1) | |
line 51: sil! com -nargs=* LPR^I^I^Icall LogiPat(<q-args>,1,"r") | |
line 52: com! -nargs=+ LPE^I^I^Iechomsg LogiPat(<q-args>) | |
line 53: com! -nargs=+ LogiPatFlags^Ilet s:LogiPatFlags="<args>" | |
line 54: sil! com -nargs=+ LPF^I^I^Ilet s:LogiPatFlags="<args>" | |
line 55: | |
line 56: " ===================================================================== | |
line 57: " Functions: {{{1 | |
line 58: | |
line 59: " --------------------------------------------------------------------- | |
line 60: " LogiPat: this function interprets the boolean-logic pattern {{{2 | |
line 61: fun! LogiPat(pat,...) | |
line 146: | |
line 147: " --------------------------------------------------------------------- | |
line 148: " s:String: Vim6.4 doesn't have string() {{{2 | |
line 149: func! s:String(str) | |
line 152: | |
line 153: " --------------------------------------------------------------------- | |
line 154: " LP_PatPush: {{{2 | |
line 155: fun! s:LP_PatPush(pat) | |
line 162: | |
line 163: " --------------------------------------------------------------------- | |
line 164: " LP_PatPop: pop a number/variable from LogiPat's pattern stack {{{2 | |
line 165: fun! s:LP_PatPop(lookup) | |
line 178: | |
line 179: " --------------------------------------------------------------------- | |
line 180: " LP_OpPush: {{{2 | |
line 181: fun! s:LP_OpPush(op) | |
line 232: | |
line 233: " --------------------------------------------------------------------- | |
line 234: " LP_Execute: execute operators from opstack using pattern stack {{{2 | |
line 235: fun! s:LP_Execute(preclvl) | |
line 265: | |
line 266: " --------------------------------------------------------------------- | |
line 267: " LP_Not: writes a logical-not for a pattern {{{2 | |
line 268: fun! s:LP_Not(pat) | |
line 279: | |
line 280: " --------------------------------------------------------------------- | |
line 281: " LP_Or: writes a logical-or branch using two patterns {{{2 | |
line 282: fun! s:LP_Or(pat1,pat2) | |
line 288: | |
line 289: " --------------------------------------------------------------------- | |
line 290: " LP_And: writes a logical-and concat using two patterns {{{2 | |
line 291: fun! s:LP_And(pat1,pat2) | |
line 297: | |
line 298: " --------------------------------------------------------------------- | |
line 299: " StackLook: {{{2 | |
line 300: fun! s:StackLook(description) | |
line 334: | |
line 335: " --------------------------------------------------------------------- | |
line 336: " Cleanup And Modeline: {{{1 | |
line 337: let &cpo= s:keepcpo | |
line 338: unlet s:keepcpo | |
line 339: " vim: ts=4 fdm=marker | |
finished sourcing /usr/share/vim/vim81/plugin/logiPat.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/manpager.vim" | |
line 1: " Vim plugin for using Vim as manpager. | |
line 2: " Maintainer: Enno Nagel <[email protected]> | |
line 3: " Last Change: 2018 Feb 04 | |
line 4: | |
line 5: command! -nargs=0 MANPAGER call s:ManPager() | delcommand MANPAGER | |
line 6: | |
line 7: function! s:ManPager() | |
finished sourcing /usr/share/vim/vim81/plugin/manpager.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/matchparen.vim" | |
line 1: " Vim plugin for showing matching parens | |
line 2: " Maintainer: Bram Moolenaar <[email protected]> | |
line 3: " Last Change: 2018 Jul 3 | |
line 4: | |
line 5: " Exit quickly when: | |
line 6: " - this plugin was already loaded (or disabled) | |
line 7: " - when 'compatible' is set | |
line 8: " - the "CursorMoved" autocmd event is not available. | |
line 9: if exists("g:loaded_matchparen") || &cp || !exists("##CursorMoved") | |
line 10: finish | |
line 11: endif | |
line 12: let g:loaded_matchparen = 1 | |
line 13: | |
line 14: if !exists("g:matchparen_timeout") | |
line 15: let g:matchparen_timeout = 300 | |
line 16: endif | |
line 17: if !exists("g:matchparen_insert_timeout") | |
line 18: let g:matchparen_insert_timeout = 60 | |
line 19: endif | |
line 20: | |
line 21: augroup matchparen | |
line 22: " Replace all matchparen autocommands | |
line 23: autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair() | |
line 24: if exists('##TextChanged') | |
line 25: autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair() | |
line 26: endif | |
line 27: augroup END | |
line 28: | |
line 29: " Skip the rest if it was already done. | |
line 30: if exists("*s:Highlight_Matching_Pair") | |
line 31: finish | |
line 32: endif | |
line 33: | |
line 34: let s:cpo_save = &cpo | |
line 35: set cpo-=C | |
line 36: | |
line 37: " The function that is invoked (very often) to define a ":match" highlighting | |
line 38: " for any matching paren. | |
line 39: function! s:Highlight_Matching_Pair() | |
line 197: | |
line 198: " Define commands that will disable and enable the plugin. | |
line 199: command! DoMatchParen call s:DoMatchParen() | |
line 200: command! NoMatchParen call s:NoMatchParen() | |
line 201: | |
line 202: func! s:NoMatchParen() | |
line 209: | |
line 210: func! s:DoMatchParen() | |
line 216: | |
line 217: let &cpo = s:cpo_save | |
line 218: unlet s:cpo_save | |
finished sourcing /usr/share/vim/vim81/plugin/matchparen.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/netrwPlugin.vim" | |
line 1: " netrwPlugin.vim: Handles file transfer and remote directory listing across a network | |
line 2: " PLUGIN SECTION | |
line 3: " Date:^I^IFeb 08, 2016 | |
line 4: " Maintainer:^ICharles E Campbell <[email protected]> | |
line 5: " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim | |
line 6: " Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1 | |
line 7: " Permission is hereby granted to use and distribute this code, | |
line 8: " with or without modifications, provided that this copyright | |
line 9: " notice is copied with it. Like anything else that's free, | |
line 10: " netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided | |
line 11: " *as is* and comes with no warranty of any kind, either | |
line 12: " expressed or implied. By using this plugin, you agree that | |
line 13: " in no event will the copyright holder be liable for any damages | |
line 14: " resulting from the use of this software. | |
line 15: " | |
line 16: " But be doers of the Word, and not only hearers, deluding your own selves {{{1 | |
line 17: " (James 1:22 RSV) | |
line 18: " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | |
line 19: " Load Once: {{{1 | |
line 20: if &cp || exists("g:loaded_netrwPlugin") | |
line 21: finish | |
line 22: endif | |
line 23: let g:loaded_netrwPlugin = "v156" | |
line 24: let s:keepcpo = &cpo | |
line 25: set cpo&vim | |
line 26: "DechoRemOn | |
line 27: | |
line 28: " --------------------------------------------------------------------- | |
line 29: " Public Interface: {{{1 | |
line 30: | |
line 31: " Local Browsing Autocmds: {{{2 | |
line 32: augroup FileExplorer | |
line 33: au! | |
line 34: au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif | |
line 35: au BufEnter *^Isil call s:LocalBrowse(expand("<amatch>")) | |
line 36: au VimEnter *^Isil call s:VimEnter(expand("<amatch>")) | |
line 37: if has("win32") || has("win95") || has("win64") || has("win16") | |
line 38: au BufEnter .* sil call s:LocalBrowse(expand("<amatch>")) | |
line 39: endif | |
line 40: augroup END | |
line 41: | |
line 42: " Network Browsing Reading Writing: {{{2 | |
line 43: augroup Network | |
line 44: au! | |
line 45: au BufReadCmd file://*^I^I^I^I^I^I^I^I^I^I^Icall netrw#FileUrlRead(expand("<amatch>")) | |
line 46: au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://*^Iexe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>")) | |
line 47: au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://*^Iexe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>")) | |
line 48: au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://*^I^I^Iexe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>")) | |
line 49: au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://*^I^I^Iexe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>")) | |
line 50: try | |
line 51: au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://*^Iexe 'Nsource '.fnameescape(expand("<amatch>")) | |
line 52: catch /^Vim\%((\a\+)\)\=:E216/ | |
line 53: au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://*^Iexe 'Nsource '.fnameescape(expand("<amatch>")) | |
line 54: endtry | |
line 55: augroup END | |
line 56: | |
line 57: " Commands: :Nread, :Nwrite, :NetUserPass {{{2 | |
line 58: com! -count=1 -nargs=*^INread^I^Ilet s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos) | |
line 59: com! -range=% -nargs=*^INwrite^I^Ilet s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos) | |
line 60: com! -nargs=*^I^INetUserPass^Icall NetUserPass(<f-args>) | |
line 61: com! -nargs=*^I Nsource^I^Ilet s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos) | |
line 62: com! -nargs=?^I^INtree^I^Icall netrw#SetTreetop(<q-args>) | |
line 63: | |
line 64: " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2 | |
line 65: com! -nargs=* -bar -bang -count=0 -complete=dir^IExplore^I^Icall netrw#Explore(<count>,0,0+<bang>0,<q-args>) | |
line 66: com! -nargs=* -bar -bang -count=0 -complete=dir^ISexplore^Icall netrw#Explore(<count>,1,0+<bang>0,<q-args>) | |
line 67: com! -nargs=* -bar -bang -count=0 -complete=dir^IHexplore^Icall netrw#Explore(<count>,1,2+<bang>0,<q-args>) | |
line 68: com! -nargs=* -bar -bang -count=0 -complete=dir^IVexplore^Icall netrw#Explore(<count>,1,4+<bang>0,<q-args>) | |
line 69: com! -nargs=* -bar -count=0 -complete=dir^ITexplore^Icall netrw#Explore(<count>,0,6 ,<q-args>) | |
line 70: com! -nargs=* -bar -bang^I^I^INexplore^Icall netrw#Explore(-1,0,0,<q-args>) | |
line 71: com! -nargs=* -bar -bang^I^I^IPexplore^Icall netrw#Explore(-2,0,0,<q-args>) | |
line 72: com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore^Icall netrw#Lexplore(<count>,<bang>0,<q-args>) | |
line 73: | |
line 74: " Commands: NetrwSettings {{{2 | |
line 75: com! -nargs=0^INetrwSettings^Icall netrwSettings#NetrwSettings() | |
line 76: com! -bang^INetrwClean^Icall netrw#Clean(<bang>0) | |
line 77: | |
line 78: " Maps: | |
line 79: if !exists("g:netrw_nogx") | |
line 80: if maparg('gx','n') == "" | |
line 81: if !hasmapto('<Plug>NetrwBrowseX') | |
line 82: nmap <unique> gx <Plug>NetrwBrowseX | |
line 83: endif | |
line 84: nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr> | |
line 85: endif | |
line 86: if maparg('gx','v') == "" | |
line 87: if !hasmapto('<Plug>NetrwBrowseXVis') | |
line 88: vmap <unique> gx <Plug>NetrwBrowseXVis | |
line 89: endif | |
line 90: vno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr> | |
line 91: endif | |
line 92: endif | |
line 93: if exists("g:netrw_usetab") && g:netrw_usetab | |
line 94: if maparg('<c-tab>','n') == "" | |
line 95: nmap <unique> <c-tab> <Plug>NetrwShrink | |
line 96: endif | |
line 97: nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr> | |
line 98: endif | |
line 99: | |
line 100: " --------------------------------------------------------------------- | |
line 101: " LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2 | |
line 102: fun! s:LocalBrowse(dirname) | |
line 148: | |
line 149: " --------------------------------------------------------------------- | |
line 150: " s:VimEnter: after all vim startup stuff is done, this function is called. {{{2 | |
line 151: " Its purpose: to look over all windows and run s:LocalBrowse() on | |
line 152: " them, which checks if they're directories and will create a directory | |
line 153: " listing when appropriate. | |
line 154: " It also sets s:vimentered, letting s:LocalBrowse() know that s:VimEnter() | |
line 155: " has already been called. | |
line 156: fun! s:VimEnter(dirname) | |
line 164: | |
line 165: " --------------------------------------------------------------------- | |
line 166: " NetrwStatusLine: {{{1 | |
line 167: fun! NetrwStatusLine() | |
line 178: | |
line 179: " ------------------------------------------------------------------------ | |
line 180: " NetUserPass: set username and password for subsequent ftp transfer {{{1 | |
line 181: " Usage: :call NetUserPass()^I^I^I-- will prompt for userid and password | |
line 182: "^I :call NetUserPass("uid")^I^I-- will prompt for password | |
line 183: "^I :call NetUserPass("uid","password") -- sets global userid and password | |
line 184: fun! NetUserPass(...) | |
line 208: | |
line 209: " ------------------------------------------------------------------------ | |
line 210: " Modelines And Restoration: {{{1 | |
line 211: let &cpo= s:keepcpo | |
line 212: unlet s:keepcpo | |
line 213: " vim:ts=8 fdm=marker | |
finished sourcing /usr/share/vim/vim81/plugin/netrwPlugin.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/rrhelper.vim" | |
line 1: " Vim plugin with helper function(s) for --remote-wait | |
line 2: " Maintainer: Flemming Madsen <[email protected]> | |
line 3: " Last Change: 2008 May 29 | |
line 4: | |
line 5: " Has this already been loaded? | |
line 6: if exists("loaded_rrhelper") || !has("clientserver") | |
line 7: finish | |
finished sourcing /usr/share/vim/vim81/plugin/rrhelper.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/spellfile.vim" | |
line 1: " Vim plugin for downloading spell files | |
line 2: " Maintainer: Bram Moolenaar <[email protected]> | |
line 3: " Last Change: 2006 Feb 01 | |
line 4: | |
line 5: " Exit quickly when: | |
line 6: " - this plugin was already loaded | |
line 7: " - when 'compatible' is set | |
line 8: " - some autocommands are already taking care of spell files | |
line 9: if exists("loaded_spellfile_plugin") || &cp || exists("#SpellFileMissing") | |
line 10: finish | |
line 11: endif | |
line 12: let loaded_spellfile_plugin = 1 | |
line 13: | |
line 14: " The function is in the autoload directory. | |
line 15: autocmd SpellFileMissing * call spellfile#LoadFile(expand('<amatch>')) | |
finished sourcing /usr/share/vim/vim81/plugin/spellfile.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/tarPlugin.vim" | |
line 1: " tarPlugin.vim -- a Vim plugin for browsing tarfiles | |
line 2: " Original was copyright (c) 2002, Michael C. Toren <[email protected]> | |
line 3: " Modified by Charles E. Campbell | |
line 4: " Distributed under the GNU General Public License. | |
line 5: " | |
line 6: " Updates are available from <http://michael.toren.net/code/>. If you | |
line 7: " find this script useful, or have suggestions for improvements, please | |
line 8: " let me know. | |
line 9: " Also look there for further comments and documentation. | |
line 10: " | |
line 11: " This part only sets the autocommands. The functions are in autoload/tar.vim. | |
line 12: " --------------------------------------------------------------------- | |
line 13: " Load Once: {{{1 | |
line 14: if &cp || exists("g:loaded_tarPlugin") | |
line 15: finish | |
line 16: endif | |
line 17: let g:loaded_tarPlugin = "v29" | |
line 18: let s:keepcpo = &cpo | |
line 19: set cpo&vim | |
line 20: | |
line 21: " --------------------------------------------------------------------- | |
line 22: " Public Interface: {{{1 | |
line 23: augroup tar | |
line 24: au! | |
line 25: au BufReadCmd tarfile::*^Icall tar#Read(expand("<amatch>"), 1) | |
line 26: au FileReadCmd tarfile::*^Icall tar#Read(expand("<amatch>"), 0) | |
line 27: au BufWriteCmd tarfile::*^Icall tar#Write(expand("<amatch>")) | |
line 28: au FileWriteCmd tarfile::*^Icall tar#Write(expand("<amatch>")) | |
line 29: | |
line 30: if has("unix") | |
line 31: au BufReadCmd tarfile::*/*^Icall tar#Read(expand("<amatch>"), 1) | |
line 32: au FileReadCmd tarfile::*/*^Icall tar#Read(expand("<amatch>"), 0) | |
line 33: au BufWriteCmd tarfile::*/*^Icall tar#Write(expand("<amatch>")) | |
line 34: au FileWriteCmd tarfile::*/*^Icall tar#Write(expand("<amatch>")) | |
line 35: endif | |
line 36: | |
line 37: au BufReadCmd *.tar.gz^I^Icall tar#Browse(expand("<amatch>")) | |
line 38: au BufReadCmd *.tar^I^I^Icall tar#Browse(expand("<amatch>")) | |
line 39: au BufReadCmd *.lrp^I^I^Icall tar#Browse(expand("<amatch>")) | |
line 40: au BufReadCmd *.tar.bz2^I^Icall tar#Browse(expand("<amatch>")) | |
line 41: au BufReadCmd *.tar.Z^I^Icall tar#Browse(expand("<amatch>")) | |
line 42: au BufReadCmd *.tgz^I^I^Icall tar#Browse(expand("<amatch>")) | |
line 43: au BufReadCmd *.tbz^I^I^Icall tar#Browse(expand("<amatch>")) | |
line 44: au BufReadCmd *.tar.lzma^Icall tar#Browse(expand("<amatch>")) | |
line 45: au BufReadCmd *.tar.xz^I^Icall tar#Browse(expand("<amatch>")) | |
line 46: au BufReadCmd *.txz^I^I^Icall tar#Browse(expand("<amatch>")) | |
line 47: augroup END | |
line 48: com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>) | |
line 49: | |
line 50: " --------------------------------------------------------------------- | |
line 51: " Restoration And Modelines: {{{1 | |
line 52: " vim: fdm=marker | |
line 53: let &cpo= s:keepcpo | |
line 54: unlet s:keepcpo | |
finished sourcing /usr/share/vim/vim81/plugin/tarPlugin.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/tohtml.vim" | |
line 1: " Vim plugin for converting a syntax highlighted file to HTML. | |
line 2: " Maintainer: Ben Fritz <[email protected]> | |
line 3: " Last Change: 2018 Nov 11 | |
line 4: " | |
line 5: " The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and | |
line 6: " $VIMRUNTIME/syntax/2html.vim | |
line 7: " | |
line 8: if exists('g:loaded_2html_plugin') | |
line 9: finish | |
line 10: endif | |
line 11: let g:loaded_2html_plugin = 'vim8.1_v1' | |
line 12: | |
line 13: " | |
line 14: " Changelog: {{{ | |
line 15: " 8.1_v1 (this version): Fix Bitbucket issue #6: Don't generate empty script | |
line 16: " tag. | |
line 17: " Fix Bitbucket issue #5: javascript should | |
line 18: " declare variables with "var". | |
line 19: " Fix Bitbucket issue #13: errors thrown sourcing | |
line 20: " 2html.vim directly when plugins not loaded. | |
line 21: " Fix Bitbucket issue #16: support 'vartabstop'. | |
line 22: " | |
line 23: " 7.4 updates: {{{ | |
line 24: " 7.4_v2 (Vim 7.4.0899): Fix error raised when converting a diff containing | |
line 25: " an empty buffer. Jan Stocker: allow g:html_font to | |
line 26: " take a list so it is easier to specfiy fallback | |
line 27: " fonts in the generated CSS. | |
line 28: " 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and | |
line 29: "^I^I^I also for version-specific modelines like "vim>703:". | |
line 30: "}}} | |
line 31: " | |
line 32: " 7.3 updates: {{{ | |
line 33: " 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using | |
line 34: "^I^I^I g:html_line_ids=0. Allow customizing | |
line 35: "^I^I^I important IDs (like line IDs and fold IDs) using | |
line 36: "^I^I^I g:html_id_expr evalutated when the buffer conversion | |
line 37: "^I^I^I is started. | |
line 38: " 7.3_v13 (Vim 7.3.1088): Keep foldmethod at manual in the generated file and | |
line 39: "^I^I^I insert modeline to set it to manual. | |
line 40: "^I^I^I Fix bug: diff mode with 2 unsaved buffers creates a | |
line 41: "^I^I^I duplicate of one buffer instead of including both. | |
line 42: "^I^I^I Add anchors to each line so you can put '#L123' | |
line 43: "^I^I^I or '#123' at the end of the URL to jump to line 123 | |
line 44: "^I^I^I (idea by Andy Spencer). Add javascript to open folds | |
line 45: "^I^I^I to show the anchor being jumped to if it is hidden. | |
line 46: "^I^I^I Fix XML validation error: &nsbp; not part of XML. | |
line 47: "^I^I^I Allow TOhtml to chain together with other commands | |
line 48: "^I^I^I using |. | |
line 49: " 7.3_v12 (Vim 7.3.0616): Fix modeline mangling to also work for when multiple | |
line 50: "^I^I^I highlight groups make up the start-of-modeline text. | |
line 51: "^I^I^I Improve render time of page with uncopyable regions | |
line 52: "^I^I^I by not using one-input-per-char. Change name of | |
line 53: "^I^I^I uncopyable option from html_unselectable to | |
line 54: "^I^I^I html_prevent_copy. Added html_no_invalid option and | |
line 55: "^I^I^I default to inserting invalid markup for uncopyable | |
line 56: "^I^I^I regions to prevent MS Word from pasting undeletable | |
line 57: "^I^I^I <input> elements. Fix 'cpo' handling (Thilo Six). | |
line 58: "^I^I 7.3_v12b1: Add html_unselectable option. Rework logic to | |
line 59: "^I^I^I eliminate post-processing substitute commands in | |
line 60: "^I^I^I favor of doing the work up front. Remove unnecessary | |
line 61: "^I^I^I special treatment of 'LineNr' highlight group. Minor | |
line 62: "^I^I^I speed improvements. Fix modeline mangling in | |
line 63: "^I^I^I generated output so it works for text in the first | |
line 64: "^I^I^I column. Fix missing line number and fold column in | |
line 65: "^I^I^I diff filler lines. Fix that some fonts have a 1px | |
line 66: "^I^I^I gap (using a dirty hack, improvements welcome). Add | |
line 67: "^I^I^I "colorscheme" meta tag. Does NOT include support for | |
line 68: "^I^I^I the new default foldtext added in v11, as the patch | |
line 69: "^I^I^I adding it has not yet been included in Vim. | |
line 70: " 7.3_v11 ( unreleased ): Support new default foldtext from patch by Christian | |
line 71: "^I^I^I Brabandt in | |
line 72: "^I^I^I http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion. | |
line 73: "^I^I^I This patch has not yet been included in Vim, thus | |
line 74: "^I^I^I these changes are removed in the next version. | |
line 75: " 7.3_v10 (Vim 7.3.0227): Fix error E684 when converting a range wholly inside | |
line 76: "^I^I^I multiple nested folds with dynamic folding on. | |
line 77: "^I^I^I Also fix problem with foldtext in this situation. | |
line 78: " 7.3_v9 (Vim 7.3.0170): Add html_pre_wrap option active with html_use_css | |
line 79: "^I^I^I and without html_no_pre, default value same as | |
line 80: "^I^I^I 'wrap' option, (Andy Spencer). Don't use | |
line 81: "^I^I^I 'fileencoding' for converted document encoding if | |
line 82: "^I^I^I 'buftype' indicates a special buffer which isn't | |
line 83: "^I^I^I written. | |
line 84: " 7.3_v8 (Vim 7.3.0100): Add html_expand_tabs option to allow leaving tab | |
line 85: "^I^I^I characters in generated output (Andy Spencer). | |
line 86: "^I^I^I Escape text that looks like a modeline so Vim | |
line 87: "^I^I^I doesn't use anything in the converted HTML as a | |
line 88: "^I^I^I modeline. Bugfixes: Fix folding when a fold starts | |
line 89: "^I^I^I before the conversion range. Remove fold column when | |
line 90: "^I^I^I there are no folds. | |
line 91: " 7.3_v7 (Vim 7-3-0063): see betas released on vim_dev below: | |
line 92: "^I^I 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way. | |
line 93: "^I^I 7.3_v7b2: Remove automatic detection of encodings that are not | |
line 94: "^I^I^I supported by all major browsers according to | |
line 95: "^I^I^I http://wiki.whatwg.org/wiki/Web_Encodings and | |
line 96: "^I^I^I convert to UTF-8 for all Unicode encodings. Make | |
line 97: "^I^I^I HTML encoding to Vim encoding detection be | |
line 98: "^I^I^I case-insensitive for built-in pairs. | |
line 99: "^I^I 7.3_v7b1: Remove use of setwinvar() function which cannot be | |
line 100: "^I^I^I called in restricted mode (Andy Spencer). Use | |
line 101: "^I^I^I 'fencoding' instead of 'encoding' to determine by | |
line 102: "^I^I^I charset, and make sure the 'fenc' of the generated | |
line 103: "^I^I^I file matches its indicated charset. Add charsets for | |
line 104: "^I^I^I all of Vim's natively supported encodings. | |
line 105: " 7.3_v6 (Vim 7.3.0000): Really fix bug with 'nowrapscan', 'magic' and other | |
line 106: "^I^I^I user settings interfering with diff mode generation, | |
line 107: "^I^I^I trailing whitespace (e.g. line number column) when | |
line 108: "^I^I^I using html_no_pre, and bugs when using | |
line 109: "^I^I^I html_hover_unfold. | |
line 110: " 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync | |
line 111: "^I^I^I folds in diff mode when first line was folded. | |
line 112: " 7.3_v4 (Vim 7.3.0000): Bugfixes, especially for xhtml markup, and diff mode | |
line 113: " 7.3_v3 (Vim 7.3.0000): Refactor option handling and make html_use_css | |
line 114: "^I^I^I default to true when not set to anything. Use strict | |
line 115: "^I^I^I doctypes where possible. Rename use_xhtml option to | |
line 116: "^I^I^I html_use_xhtml for consistency. Use .xhtml extension | |
line 117: "^I^I^I when using this option. Add meta tag for settings. | |
line 118: " 7.3_v2 (Vim 7.3.0000): Fix syntax highlighting in diff mode to use both the | |
line 119: "^I^I^I diff colors and the normal syntax colors | |
line 120: " 7.3_v1 (Vim 7.3.0000): Add conceal support and meta tags in output | |
line 121: "}}} | |
line 122: "}}} | |
line 123: | |
line 124: " TODO: {{{ | |
line 125: " * Check the issue tracker: | |
line 126: " https://bitbucket.org/fritzophrenic/vim-tohtml/issues?status=new&status=open | |
line 127: " * Options for generating the CSS in external style sheets. New :TOcss | |
line 128: " command to convert the current color scheme into a (mostly) generic CSS | |
line 129: " stylesheet which can be re-used. Alternate stylesheet support? Good start | |
line 130: " by Erik Falor | |
line 131: " ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ). | |
line 132: " * Add optional argument to :TOhtml command to specify mode (gui, cterm, | |
line 133: " term) to use for the styling. Suggestion by "nacitar". | |
line 134: " * Add way to override or specify which RGB colors map to the color numbers | |
line 135: " in cterm. Get better defaults than just guessing? Suggestion by "nacitar". | |
line 136: " * Disable filetype detection until after all processing is done. | |
line 137: " * Add option for not generating the hyperlink on stuff that looks like a | |
line 138: " URL? Or just color the link to fit with the colorscheme (and only special | |
line 139: " when hovering)? | |
line 140: " * Bug: Opera does not allow printing more than one page if uncopyable | |
line 141: " regions is turned on. Possible solution: Add normal text line numbers with | |
line 142: " display:none, set to display:inline for print style sheets, and hide | |
line 143: " <input> elements for print, to allow Opera printing multiple pages (and | |
line 144: " other uncopyable areas?). May need to make the new text invisible to IE | |
line 145: " with conditional comments to prevent copying it, IE for some reason likes | |
line 146: " to copy hidden text. Other browsers too? | |
line 147: " * Bug: still a 1px gap throughout the fold column when html_prevent_copy is | |
line 148: " "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome | |
line 149: " on Windows). Perhaps it is font related? | |
line 150: " * Bug: still some gaps in the fold column when html_prevent_copy contains | |
line 151: " 'd' and showing the whole diff (observed in multiple browsers). Only gaps | |
line 152: " on diff lines though. | |
line 153: " * Undercurl support via CSS3, with fallback to dotted or something: | |
line 154: "^Ihttps://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion | |
line 155: " * Redo updates for modified default foldtext (v11) when/if the patch is | |
line 156: " accepted to modify it. | |
line 157: " * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold | |
line 158: "^I^I+ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress | |
line 159: "^I^I+number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml | |
line 160: " does not show the whole diff filler as it is supposed to? | |
line 161: " * Bug: when 'isprint' is wrong for the current encoding, will generate | |
line 162: " invalid content. Can/should anything be done about this? Maybe a separate | |
line 163: " plugin to correct 'isprint' based on encoding? | |
line 164: " * Check to see if the windows-125\d encodings actually work in Unix without | |
line 165: " the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not. | |
line 166: " * Font auto-detection similar to | |
line 167: " http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of | |
line 168: " platforms. | |
line 169: " * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 : | |
line 170: "^I- listchars support | |
line 171: "^I- full-line background highlight | |
line 172: "^I- other? | |
line 173: " * Make it so deleted lines in a diff don't create side-scrolling (get it | |
line 174: " free with full-line background highlight above). | |
line 175: " * Restore open/closed folds and cursor position after processing each file | |
line 176: " with option not to restore for speed increase. | |
line 177: " * Add extra meta info (generation time, etc.)? | |
line 178: " * Tidy up so we can use strict doctype in even more situations | |
line 179: " * Implementation detail: add threshold for writing the lines to the html | |
line 180: " buffer before we're done (5000 or so lines should do it) | |
line 181: " * TODO comments for code cleanup scattered throughout | |
line 182: "}}} | |
line 183: | |
line 184: " Define the :TOhtml command when: | |
line 185: " - 'compatible' is not set | |
line 186: " - this plugin or user override was not already loaded | |
line 187: " - user commands are available. {{{ | |
line 188: if !&cp && !exists(":TOhtml") && has("user_commands") | |
line 189: command -range=% -bar TOhtml :call tohtml#Convert2HTML(<line1>, <line2>) | |
line 190: endif "}}} | |
line 191: | |
line 192: " Make sure any patches will probably use consistent indent | |
line 193: " vim: ts=8 sw=2 sts=2 noet fdm=marker | |
finished sourcing /usr/share/vim/vim81/plugin/tohtml.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/vimballPlugin.vim" | |
line 1: " vimballPlugin : construct a file containing both paths and files | |
line 2: " Author: Charles E. Campbell | |
line 3: " Copyright: (c) 2004-2014 by Charles E. Campbell | |
line 4: " The VIM LICENSE applies to Vimball.vim, and Vimball.txt | |
line 5: " (see |copyright|) except use "Vimball" instead of "Vim". | |
line 6: " No warranty, express or implied. | |
line 7: " *** *** Use At-Your-Own-Risk! *** *** | |
line 8: " | |
line 9: " (Rom 2:1 WEB) Therefore you are without excuse, O man, whoever you are who | |
line 10: " judge. For in that which you judge another, you condemn yourself. For | |
line 11: " you who judge practice the same things. | |
line 12: " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim | |
line 13: | |
line 14: " --------------------------------------------------------------------- | |
line 15: " Load Once: {{{1 | |
line 16: if &cp || exists("g:loaded_vimballPlugin") | |
line 17: finish | |
line 18: endif | |
line 19: let g:loaded_vimballPlugin = "v37" | |
line 20: let s:keepcpo = &cpo | |
line 21: set cpo&vim | |
line 22: | |
line 23: " ------------------------------------------------------------------------------ | |
line 24: " Public Interface: {{{1 | |
line 25: com! -range -complete=file -nargs=+ -bang MkVimball^I^Icall vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>) | |
line 26: com! -nargs=? -complete=dir UseVimball^I^I^I^I^I^Icall vimball#Vimball(1,<f-args>) | |
line 27: com! -nargs=0 VimballList^I^I^I^I^Icall vimball#Vimball(0) | |
line 28: com! -nargs=* -complete=dir RmVimball^I^I^I^I^I^Icall vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings() | |
line 29: augroup Vimball | |
line 30: au! | |
line 31: au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz^Isetlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif | |
line 32: au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz^I^I^Ilet s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif | |
line 33: au SourceCmd *.vba^I^I^I^I^I^I^I^I^I^I^Iif expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif | |
line 34: au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz^Isetlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif | |
line 35: au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz^I^I^Ilet s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif | |
line 36: au SourceCmd *.vmb^I^I^I^I^I^I^I^I^I^I^Iif expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif | |
line 37: augroup END | |
line 38: | |
line 39: " ===================================================================== | |
line 40: " Restoration And Modelines: {{{1 | |
line 41: " vim: fdm=marker | |
line 42: let &cpo= s:keepcpo | |
line 43: unlet s:keepcpo | |
finished sourcing /usr/share/vim/vim81/plugin/vimballPlugin.vim | |
chdir(/usr/share/vim/vim81/plugin) | |
fchdir() to previous dir | |
sourcing "/usr/share/vim/vim81/plugin/zipPlugin.vim" | |
line 1: " zipPlugin.vim: Handles browsing zipfiles | |
line 2: " PLUGIN PORTION | |
line 3: " Date:^I^I^ISep 13, 2016 | |
line 4: " Maintainer:^ICharles E Campbell <[email protected]> | |
line 5: " License:^I^IVim License (see vim's :help license) | |
line 6: " Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1 | |
line 7: " Permission is hereby granted to use and distribute this code, | |
line 8: " with or without modifications, provided that this copyright | |
line 9: " notice is copied with it. Like anything else that's free, | |
line 10: " zipPlugin.vim is provided *as is* and comes with no warranty | |
line 11: " of any kind, either expressed or implied. By using this | |
line 12: " plugin, you agree that in no event will the copyright | |
line 13: " holder be liable for any damages resulting from the use | |
line 14: " of this software. | |
line 15: " | |
line 16: " (James 4:8 WEB) Draw near to God, and he will draw near to you. | |
line 17: " Cleanse your hands, you sinners; and purify your hearts, you double-minded. | |
line 18: " --------------------------------------------------------------------- | |
line 19: " Load Once: {{{1 | |
line 20: if &cp || exists("g:loaded_zipPlugin") | |
line 21: finish | |
line 22: endif | |
line 23: let g:loaded_zipPlugin = "v28" | |
line 24: let s:keepcpo = &cpo | |
line 25: set cpo&vim | |
line 26: | |
line 27: " --------------------------------------------------------------------- | |
line 28: " Options: {{{1 | |
line 29: if !exists("g:zipPlugin_ext") | |
line 30: let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip' | |
line 31: endif | |
line 32: | |
line 33: " --------------------------------------------------------------------- | |
line 34: " Public Interface: {{{1 | |
line 35: augroup zip | |
line 36: au! | |
line 37: au BufReadCmd zipfile:*^Icall zip#Read(expand("<amatch>"), 1) | |
line 38: au FileReadCmd zipfile:*^Icall zip#Read(expand("<amatch>"), 0) | |
line 39: au BufWriteCmd zipfile:*^Icall zip#Write(expand("<amatch>")) | |
line 40: au FileWriteCmd zipfile:*^Icall zip#Write(expand("<amatch>")) | |
line 41: | |
line 42: if has("unix") | |
line 43: au BufReadCmd zipfile:*/*^Icall zip#Read(expand("<amatch>"), 1) | |
line 44: au FileReadCmd zipfile:*/*^Icall zip#Read(expand("<amatch>"), 0) | |
line 45: au BufWriteCmd zipfile:*/*^Icall zip#Write(expand("<amatch>")) | |
line 46: au FileWriteCmd zipfile:*/*^Icall zip#Write(expand("<amatch>")) | |
line 47: endif | |
line 48: | |
line 49: exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand("<amatch>"))' | |
line 49: au BufReadCmd *.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip call zip#Browse(expand("<amatch>")) | |
line 50: augroup END | |
line 51: | |
line 52: " --------------------------------------------------------------------- | |
line 53: " Restoration And Modelines: {{{1 | |
line 54: " vim: fdm=marker | |
line 55: let &cpo= s:keepcpo | |
line 56: unlet s:keepcpo | |
finished sourcing /usr/share/vim/vim81/plugin/zipPlugin.vim | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/plugin/**/*.vim" | |
Searching for "pack/*/start/*" in "/home/migacz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after" | |
Searching for "/home/migacz/.vim/pack/*/start/*" | |
Searching for "/usr/share/vim/vimfiles/pack/*/start/*" | |
Searching for "/usr/share/vim/vim81/pack/*/start/*" | |
Searching for "/usr/share/vim/vimfiles/after/pack/*/start/*" | |
Searching for "/home/migacz/.vim/after/pack/*/start/*" | |
not found in 'packpath': "pack/*/start/*" | |
Searching for "plugin/**/*.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/usr/share/vim/vimfiles/after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/plugin/**/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/plugin/**/*.vim" | |
not found in 'runtimepath': "plugin/**/*.vim" | |
Reading viminfo file "/home/migacz/.viminfo" info oldfiles | |
"login.html" | |
"login.html" 35L, 1432C | |
Reading viminfo file "/home/migacz/.viminfo" marks | |
Executing BufRead Autocommands for "*.html" | |
autocommand call dist#ft#FThtml() | |
line 0: call dist#ft#FThtml() | |
Searching for "autoload/dist/ft.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/autoload/dist/ft.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/dist/ft.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/autoload/dist/ft.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/autoload/dist/ft.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/autoload/dist/ft.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/autoload/dist/ft.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/autoload/dist/ft.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/autoload/dist/ft.vim" | |
Searching for "/usr/share/vim/vimfiles/autoload/dist/ft.vim" | |
Searching for "/usr/share/vim/vim81/autoload/dist/ft.vim" | |
chdir(/usr/share/vim/vim81/autoload/dist) | |
fchdir() to previous dir | |
line 0: sourcing "/usr/share/vim/vim81/autoload/dist/ft.vim" | |
line 1: " Vim functions for file type detection | |
line 2: " | |
line 3: " Maintainer:^IBram Moolenaar <[email protected]> | |
line 4: " Last Change:^I2019 Jan 18 | |
line 5: | |
line 6: " These functions are moved here from runtime/filetype.vim to make startup | |
line 7: " faster. | |
line 8: | |
line 9: " Line continuation is used here, remove 'C' from 'cpoptions' | |
line 10: let s:cpo_save = &cpo | |
line 11: set cpo&vim | |
line 12: | |
line 13: func dist#ft#Check_inp() | |
line 32: | |
line 33: " This function checks for the kind of assembly that is wanted by the user, or | |
line 34: " can be detected from the first five lines of the file. | |
line 35: func dist#ft#FTasm() | |
line 56: | |
line 57: func dist#ft#FTasmsyntax() | |
line 69: | |
line 70: " Check if one of the first five lines contains "VB_Name". In that case it is | |
line 71: " probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype. | |
line 72: func dist#ft#FTVB(alt) | |
line 79: | |
line 80: func dist#ft#FTbtm() | |
line 87: | |
line 88: func dist#ft#BindzoneCheck(default) | |
line 95: | |
line 96: func dist#ft#FTlpc() | |
line 109: | |
line 110: func dist#ft#FTheader() | |
line 125: | |
line 126: " This function checks if one of the first ten lines start with a '@'. In | |
line 127: " that case it is probably a change file. | |
line 128: " If the first line starts with # or ! it's probably a ch file. | |
line 129: " If a line has "main", "include", "//" or "/*" it's probably ch. | |
line 130: " Otherwise CHILL is assumed. | |
line 131: func dist#ft#FTchange() | |
line 154: | |
line 155: func dist#ft#FTent() | |
line 174: | |
line 175: func dist#ft#EuphoriaCheck() | |
line 182: | |
line 183: func dist#ft#DtraceCheck() | |
line 194: | |
line 195: func dist#ft#FTe() | |
line 210: | |
line 211: " Distinguish between HTML, XHTML and Django | |
line 212: func dist#ft#FThtml() | |
line 227: | |
line 228: " Distinguish between standard IDL and MS-IDL | |
line 229: func dist#ft#FTidl() | |
line 240: | |
line 241: " Distinguish between "default" and Cproto prototype file. */ | |
line 242: func dist#ft#ProtoCheck(default) | |
line 254: | |
line 255: func dist#ft#FTm() | |
line 298: | |
line 299: func dist#ft#FTmms() | |
line 315: | |
line 316: " This function checks if one of the first five lines start with a dot. In | |
line 317: " that case it is probably an nroff file: 'filetype' is set and 1 is returned. | |
line 318: func dist#ft#FTnroff() | |
line 325: | |
line 326: func dist#ft#FTmm() | |
line 338: | |
line 339: func dist#ft#FTpl() | |
line 353: | |
line 354: func dist#ft#FTinc() | |
line 375: | |
line 376: func dist#ft#FTprogress_cweb() | |
line 387: | |
line 388: func dist#ft#FTprogress_asm() | |
line 410: | |
line 411: func dist#ft#FTprogress_pascal() | |
line 435: | |
line 436: func dist#ft#FTr() | |
line 468: | |
line 469: func dist#ft#McSetf() | |
line 484: | |
line 485: " Called from filetype.vim and scripts.vim. | |
line 486: func dist#ft#SetFileTypeSH(name) | |
line 533: | |
line 534: " For shell-like file types, check for an "exec" command hidden in a comment, | |
line 535: " as used for Tcl. | |
line 536: " Also called from scripts.vim, thus can't be local to this script. | |
line 537: func dist#ft#SetFileTypeShell(name) | |
line 560: | |
line 561: func dist#ft#CSH() | |
line 574: | |
line 575: let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*' | |
line 576: func dist#ft#FTRules() | |
line 608: | |
line 609: func dist#ft#SQL() | |
line 616: | |
line 617: " If the file has an extension of 't' and is in a directory 't' or 'xt' then | |
line 618: " it is almost certainly a Perl test file. | |
line 619: " If the first line starts with '#' and contains 'perl' it's probably a Perl | |
line 620: " file. | |
line 621: " (Slow test) If a file contains a 'use' statement then it is almost certainly | |
line 622: " a Perl file. | |
line 623: func dist#ft#FTperl() | |
line 643: | |
line 644: " Choose context, plaintex, or tex (LaTeX) based on these rules: | |
line 645: " 1. Check the first line of the file for "%&<format>". | |
line 646: " 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords. | |
line 647: " 3. Default to "plain" or to g:tex_flavor, can be set in user's vimrc. | |
line 648: func dist#ft#FTtex() | |
line 699: | |
line 700: func dist#ft#FTxml() | |
line 725: | |
line 726: func dist#ft#FTy() | |
line 742: | |
line 743: func dist#ft#Redif() | |
line 753: | |
line 754: | |
line 755: " Restore 'cpoptions' | |
line 756: let &cpo = s:cpo_save | |
line 757: unlet s:cpo_save | |
finished sourcing /usr/share/vim/vim81/autoload/dist/ft.vim | |
continuing in BufRead Autocommands for "*.html" | |
calling function dist#ft#FThtml() | |
line 1: let n = 1 | |
line 2: while n < 10 && n < line("$") | |
line 3: if getline(n) =~ '\<DTD\s\+XHTML\s' | |
line 4: setf xhtml | |
line 5: return | |
line 6: endif | |
line 7: if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+' | |
line 8: setf htmldjango | |
Executing FileType Autocommands for "*" | |
autocommand call s:LoadFTPlugin() | |
line 0: call s:LoadFTPlugin() | |
calling function <SNR>11_LoadFTPlugin() | |
line 1: if exists("b:undo_ftplugin") | |
line 2: exe b:undo_ftplugin | |
line 3: unlet! b:undo_ftplugin b:did_ftplugin | |
line 4: endif | |
line 5: | |
line 6: let s = expand("<amatch>") | |
line 7: if s != "" | |
line 8: if &cpo =~# "S" && exists("b:did_ftplugin") | |
line 9: ^I" In compatible mode options are reset to the global values, need to | |
line 10: ^I" set the local values also when a plugin was already used. | |
line 11: ^Iunlet b:did_ftplugin | |
line 12: endif | |
line 13: | |
line 14: " When there is a dot it is used to separate filetype names. Thus for | |
line 15: " "aaa.bbb" load "aaa" and then "bbb". | |
line 16: for name in split(s, '\.') | |
line 17: ^Iexe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim' | |
line 17: runtime! ftplugin/htmldjango.vim ftplugin/htmldjango_*.vim ftplugin/htmldjango/*.vim | |
Searching for "ftplugin/htmldjango.vim ftplugin/htmldjango_*.vim ftplugin/htmldjango/*.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/ftplugin/htmldjango/*.vim" | |
chdir(/home/migacz/.vim/bundle/sparkup/vim/ftplugin/htmldjango) | |
fchdir() to previous dir | |
line 17: sourcing "/home/migacz/.vim/bundle/sparkup/vim/ftplugin/htmldjango/sparkup.vim" | |
line 1: " Sparkup | |
line 2: " Installation: | |
line 3: " Copy the contents of vim/ftplugin/ to your ~/.vim/ftplugin directory: | |
line 4: " | |
line 5: " $ cp -R vim/ftplugin ~/.vim/ftplugin/ | |
line 6: " | |
line 7: " or use one of the automated methods specified in the README.txt file. | |
line 8: " | |
line 9: " Configuration: | |
line 10: " g:sparkup (Default: 'sparkup') - | |
line 11: " Location of the sparkup executable. You shouldn't need to change this | |
line 12: " setting if you used the install option above. | |
line 13: " | |
line 14: " g:sparkupArgs (Default: '--no-last-newline') - | |
line 15: " Additional args passed to sparkup. | |
line 16: " | |
line 17: " g:sparkupExecuteMapping (Default: '<c-e>') - | |
line 18: " Mapping used to execute sparkup within insert mode. | |
line 19: " | |
line 20: " g:sparkupNextMapping (Default: '<c-n>') - | |
line 21: " Mapping used to jump to the next empty tag/attribute within insert mode. | |
line 22: " | |
line 23: " g:sparkupMaps (Default: 1) - | |
line 24: " Set up automatic mappings for Sparkup. If set to 0, this can be | |
line 25: " used to disable creation of any mappings, which is useful if | |
line 26: " full customisation is required. | |
line 27: " | |
line 28: " g:sparkupMapsNormal (Default: 0) - | |
line 29: " Set up mappings for normal mode within Vim. The same execute and next | |
line 30: " mappings configured above will apply to normal mode if this option is | |
line 31: " set. | |
line 32: | |
line 33: if !exists('g:sparkupExecuteMapping') | |
line 34: let g:sparkupExecuteMapping = '<c-e>' | |
line 35: endif | |
line 36: | |
line 37: if !exists('g:sparkupNextMapping') | |
line 38: let g:sparkupNextMapping = '<c-n>' | |
line 39: endif | |
line 40: | |
line 41: if !exists('g:sparkupMaps') | |
line 42: let g:sparkupMaps = 1 | |
line 43: endif | |
line 44: | |
line 45: if !exists('g:sparkupMapsNormal') | |
line 46: let g:sparkupMapsNormal = 0 | |
line 47: endif | |
line 48: | |
line 49: inoremap <buffer> <Plug>SparkupExecute <c-g>u<Esc>:call <SID>Sparkup()<cr> | |
line 50: inoremap <buffer> <Plug>SparkupNext <c-g>u<Esc>:call <SID>SparkupNext()<cr> | |
line 51: | |
line 52: if g:sparkupMaps | |
line 53: if ! hasmapto('<Plug>SparkupExecute', 'i') | |
line 54: exec 'imap <buffer> ' . g:sparkupExecuteMapping . ' <Plug>SparkupExecute' | |
line 54: imap <buffer> <c-e> <Plug>SparkupExecute | |
line 55: endif | |
line 56: if ! hasmapto('<Plug>SparkupNext', 'i') | |
line 57: exec 'imap <buffer> ' . g:sparkupNextMapping . ' <Plug>SparkupNext' | |
line 57: imap <buffer> <c-n> <Plug>SparkupNext | |
line 58: endif | |
line 59: if g:sparkupMapsNormal | |
line 60: if ! hasmapto('<Plug>SparkupExecute', 'n') | |
line 61: exec 'nnoremap <buffer> ' . g:sparkupExecuteMapping . ' :call <SID>Sparkup()<cr>' | |
line 62: endif | |
line 63: if ! hasmapto('<Plug>SparkupNext', 'n') | |
line 64: exec 'nnoremap <buffer> ' . g:sparkupNextMapping . ' :call <SID>SparkupNext()<cr>' | |
line 65: endif | |
line 66: endif | |
line 67: endif | |
line 68: | |
line 69: if exists('*s:Sparkup') | |
line 70: finish | |
line 71: endif | |
line 72: | |
line 73: function! s:Sparkup() | |
line 117: | |
line 118: function! s:SparkupNext() | |
finished sourcing /home/migacz/.vim/bundle/sparkup/vim/ftplugin/htmldjango/sparkup.vim | |
continuing in function <SNR>11_LoadFTPlugin | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/ftplugin/htmldjango/*.vim" | |
Searching for "/usr/share/vim/vimfiles/ftplugin/htmldjango.vim" | |
Searching for "/usr/share/vim/vimfiles/ftplugin/htmldjango_*.vim" | |
Searching for "/usr/share/vim/vimfiles/ftplugin/htmldjango/*.vim" | |
Searching for "/usr/share/vim/vim81/ftplugin/htmldjango.vim" | |
chdir(/usr/share/vim/vim81/ftplugin) | |
fchdir() to previous dir | |
line 17: sourcing "/usr/share/vim/vim81/ftplugin/htmldjango.vim" | |
line 1: " Vim filetype plugin file | |
line 2: " Language:^IDjango HTML template | |
line 3: " Maintainer:^IDave Hodder <[email protected]> | |
line 4: " Last Change:^I2007 Jan 25 | |
line 5: | |
line 6: " Only use this filetype plugin when no other was loaded. | |
line 7: if exists("b:did_ftplugin") | |
line 8: finish | |
line 9: endif | |
line 10: | |
line 11: " Use HTML and Django template ftplugins. | |
line 12: runtime! ftplugin/html.vim | |
Searching for "ftplugin/html.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/ftplugin/html.vim" | |
Searching for "/usr/share/vim/vimfiles/ftplugin/html.vim" | |
Searching for "/usr/share/vim/vim81/ftplugin/html.vim" | |
chdir(/usr/share/vim/vim81/ftplugin) | |
fchdir() to previous dir | |
line 12: sourcing "/usr/share/vim/vim81/ftplugin/html.vim" | |
line 1: " Vim filetype plugin file | |
line 2: " Language:^Ihtml | |
line 3: " Maintainer:^IDan Sharp <dwsharp at users dot sourceforge dot net> | |
line 4: " Last Changed: 20 Jan 2009 | |
line 5: " URL:^I^Ihttp://dwsharp.users.sourceforge.net/vim/ftplugin | |
line 6: | |
line 7: if exists("b:did_ftplugin") | finish | endif | |
line 7: finish | endif | |
line 7: endif | |
line 8: let b:did_ftplugin = 1 | |
line 9: | |
line 10: " Make sure the continuation lines below do not cause problems in | |
line 11: " compatibility mode. | |
line 12: let s:save_cpo = &cpo | |
line 13: set cpo-=C | |
line 14: | |
line 15: setlocal matchpairs+=<:> | |
line 16: setlocal commentstring=<!--%s--> | |
line 17: setlocal comments=s:<!--,m:\ \ \ \ ,e:--> | |
line 18: | |
line 19: if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1) | |
line 20: setlocal formatoptions-=t formatoptions+=croql | |
line 21: endif | |
line 22: | |
line 23: if exists('&omnifunc') | |
line 24: setlocal omnifunc=htmlcomplete#CompleteTags | |
line 25: call htmlcomplete#DetectOmniFlavor() | |
Searching for "autoload/htmlcomplete.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/autoload/htmlcomplete.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/htmlcomplete.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/autoload/htmlcomplete.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/autoload/htmlcomplete.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/autoload/htmlcomplete.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/autoload/htmlcomplete.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/autoload/htmlcomplete.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/autoload/htmlcomplete.vim" | |
Searching for "/usr/share/vim/vimfiles/autoload/htmlcomplete.vim" | |
Searching for "/usr/share/vim/vim81/autoload/htmlcomplete.vim" | |
chdir(/usr/share/vim/vim81/autoload) | |
fchdir() to previous dir | |
line 25: sourcing "/usr/share/vim/vim81/autoload/htmlcomplete.vim" | |
line 1: " Vim completion script | |
line 2: " Language:^IHTML and XHTML | |
line 3: " Maintainer:^IMikolaj Machowski ( mikmach AT wp DOT pl ) | |
line 4: " Last Change:^I2014 Jun 20 | |
line 5: | |
line 6: " Distinguish between HTML versions. | |
line 7: " To use with other HTML versions add another "elseif" condition to match | |
line 8: " proper DOCTYPE. | |
line 9: function! htmlcomplete#DetectOmniFlavor() | |
line 47: | |
line 48: function! htmlcomplete#CompleteTags(findstart, base) | |
line 713: | |
line 714: function! htmlcomplete#LoadData() " {{{ | |
line 732: " }}} | |
line 733: function! htmlcomplete#CheckDoctype() " {{{ | |
line 807: " }}} | |
line 808: " vim:set foldmethod=marker: | |
finished sourcing /usr/share/vim/vim81/autoload/htmlcomplete.vim | |
continuing in /usr/share/vim/vim81/ftplugin/html.vim | |
calling function htmlcomplete#DetectOmniFlavor() | |
line 1: if &filetype == 'xhtml' | |
line 2: let b:html_omni_flavor = 'xhtml10s' | |
line 3: else | |
line 4: let b:html_omni_flavor = 'html401t' | |
line 5: endif | |
line 6: let i = 1 | |
line 7: let line = "" | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 8: while i < 10 && i < line("$") | |
line 9: let line = getline(i) | |
line 10: if line =~ '<!DOCTYPE.*\<DTD ' | |
line 11: break | |
line 12: endif | |
line 13: let i += 1 | |
line 14: endwhile | |
line 15: if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above | |
line 16: if line =~ ' HTML 3\.2' | |
line 17: let b:html_omni_flavor = 'html32' | |
line 18: elseif line =~ ' XHTML 1\.1' | |
line 19: let b:html_omni_flavor = 'xhtml11' | |
line 20: else " two-step detection with strict/frameset/transitional | |
line 21: if line =~ ' XHTML 1\.0' | |
line 22: ^Ilet b:html_omni_flavor = 'xhtml10' | |
line 23: elseif line =~ ' HTML 4\.01' | |
line 24: ^Ilet b:html_omni_flavor = 'html401' | |
line 25: elseif line =~ ' HTML 4.0\>' | |
line 26: ^Ilet b:html_omni_flavor = 'html40' | |
line 27: endif | |
line 28: if line =~ '\<Transitional\>' | |
line 29: ^Ilet b:html_omni_flavor .= 't' | |
line 30: elseif line =~ '\<Frameset\>' | |
line 31: ^Ilet b:html_omni_flavor .= 'f' | |
line 32: else | |
line 33: ^Ilet b:html_omni_flavor .= 's' | |
line 34: endif | |
line 35: endif | |
line 36: endif | |
function htmlcomplete#DetectOmniFlavor returning #0 | |
continuing in /usr/share/vim/vim81/ftplugin/html.vim | |
line 26: endif | |
line 27: | |
line 28: " HTML: thanks to Johannes Zellner and Benji Fisher. | |
line 29: if exists("loaded_matchit") | |
line 30: let b:match_ignorecase = 1 | |
line 34: let b:match_words = '<:>,' . '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' | |
line 35: endif | |
line 36: | |
line 37: " Change the :browse e filter to primarily show HTML-related files. | |
line 38: if has("gui_win32") | |
line 42: let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" .^I"JavaScript Files (*.js)\t*.js\n" .^I"Cascading StyleSheets (*.css)\t*.css\n" .^I"All Files (*.*)\t*.*\n" | |
line 43: endif | |
line 44: | |
line 45: " Undo the stuff we changed. | |
line 47: let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" .^I" | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter" | |
line 48: | |
line 49: " Restore the saved compatibility options. | |
line 50: let &cpo = s:save_cpo | |
line 51: unlet s:save_cpo | |
finished sourcing /usr/share/vim/vim81/ftplugin/html.vim | |
continuing in /usr/share/vim/vim81/ftplugin/htmldjango.vim | |
Searching for "/usr/share/vim/vimfiles/after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/ftplugin/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/ftplugin/html.vim" | |
line 13: runtime! ftplugin/django.vim | |
Searching for "ftplugin/django.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/ftplugin/django.vim" | |
Searching for "/usr/share/vim/vimfiles/ftplugin/django.vim" | |
Searching for "/usr/share/vim/vim81/ftplugin/django.vim" | |
Searching for "/usr/share/vim/vimfiles/after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/ftplugin/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/ftplugin/django.vim" | |
not found in 'runtimepath': "ftplugin/django.vim" | |
finished sourcing /usr/share/vim/vim81/ftplugin/htmldjango.vim | |
continuing in function <SNR>11_LoadFTPlugin | |
Searching for "/usr/share/vim/vim81/ftplugin/htmldjango_*.vim" | |
Searching for "/usr/share/vim/vim81/ftplugin/htmldjango/*.vim" | |
Searching for "/usr/share/vim/vimfiles/after/ftplugin/htmldjango.vim" | |
Searching for "/usr/share/vim/vimfiles/after/ftplugin/htmldjango_*.vim" | |
Searching for "/usr/share/vim/vimfiles/after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/ftplugin/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/ftplugin/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/ftplugin/htmldjango_*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/ftplugin/htmldjango/*.vim" | |
line 18: endfor | |
line 16: for name in split(s, '\.') | |
line 17: ^Iexe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim' | |
line 18: endfor | |
line 19: endif | |
function <SNR>11_LoadFTPlugin returning #0 | |
continuing in FileType Autocommands for "*" | |
Executing FileType Autocommands for "*" | |
autocommand call s:LoadIndent() | |
line 0: call s:LoadIndent() | |
calling function <SNR>12_LoadIndent() | |
line 1: if exists("b:undo_indent") | |
line 2: exe b:undo_indent | |
line 3: unlet! b:undo_indent b:did_indent | |
line 4: endif | |
line 5: let s = expand("<amatch>") | |
line 6: if s != "" | |
line 7: if exists("b:did_indent") | |
line 8: ^Iunlet b:did_indent | |
line 9: endif | |
line 10: | |
line 11: " When there is a dot it is used to separate filetype names. Thus for | |
line 12: " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim". | |
line 13: for name in split(s, '\.') | |
line 14: ^Iexe 'runtime! indent/' . name . '.vim' | |
line 14: runtime! indent/htmldjango.vim | |
Searching for "indent/htmldjango.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/indent/htmldjango.vim" | |
Searching for "/usr/share/vim/vimfiles/indent/htmldjango.vim" | |
Searching for "/usr/share/vim/vim81/indent/htmldjango.vim" | |
chdir(/usr/share/vim/vim81/indent) | |
fchdir() to previous dir | |
line 14: sourcing "/usr/share/vim/vim81/indent/htmldjango.vim" | |
line 1: " Vim indent file | |
line 2: " Language:^IDjango HTML template | |
line 3: " Maintainer:^IDave Hodder <[email protected]> | |
line 4: " Last Change:^I2007 Jan 25 | |
line 5: | |
line 6: " Only load this indent file when no other was loaded. | |
line 7: if exists("b:did_indent") | |
line 8: finish | |
line 9: endif | |
line 10: | |
line 11: " Use HTML formatting rules. | |
line 12: runtime! indent/html.vim | |
Searching for "indent/html.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/indent/html.vim" | |
Searching for "/usr/share/vim/vimfiles/indent/html.vim" | |
Searching for "/usr/share/vim/vim81/indent/html.vim" | |
chdir(/usr/share/vim/vim81/indent) | |
fchdir() to previous dir | |
line 12: sourcing "/usr/share/vim/vim81/indent/html.vim" | |
line 1: " Vim indent script for HTML | |
line 2: " Header: "{{{ | |
line 3: " Maintainer:^IBram Moolenaar | |
line 4: " Original Author: Andy Wokula <[email protected]> | |
line 5: " Last Change:^I2018 Mar 28 | |
line 6: " Version:^I1.0 | |
line 7: " Description:^IHTML indent script with cached state for faster indenting on a | |
line 8: "^I^Irange of lines. | |
line 9: "^I^ISupports template systems through hooks. | |
line 10: "^I^ISupports Closure stylesheets. | |
line 11: " | |
line 12: " Credits: | |
line 13: "^Iindent/html.vim (2006 Jun 05) from J. Zellner | |
line 14: "^Iindent/css.vim (2006 Dec 20) from N. Weibull | |
line 15: " | |
line 16: " History: | |
line 17: " 2014 June^I(v1.0) overhaul (Bram) | |
line 18: " 2012 Oct 21^I(v0.9) added support for shiftwidth() | |
line 19: " 2011 Sep 09^I(v0.8) added HTML5 tags (thx to J. Zuckerman) | |
line 20: " 2008 Apr 28^I(v0.6) revised customization | |
line 21: " 2008 Mar 09^I(v0.5) fixed 'indk' issue (thx to C.J. Robinson) | |
line 22: "}}} | |
line 23: | |
line 24: " Init Folklore, check user settings (2nd time ++) | |
line 25: if exists("b:did_indent") "{{{ | |
line 26: finish | |
line 27: endif | |
line 28: | |
line 29: " Load the Javascript indent script first, it defines GetJavascriptIndent(). | |
line 30: " Undo the rest. | |
line 31: " Load base python indent. | |
line 32: if !exists('*GetJavascriptIndent') | |
line 33: runtime! indent/javascript.vim | |
Searching for "indent/javascript.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/indent/javascript.vim" | |
Searching for "/usr/share/vim/vimfiles/indent/javascript.vim" | |
Searching for "/usr/share/vim/vim81/indent/javascript.vim" | |
chdir(/usr/share/vim/vim81/indent) | |
fchdir() to previous dir | |
line 33: sourcing "/usr/share/vim/vim81/indent/javascript.vim" | |
line 1: " Vim indent file | |
line 2: " Language: Javascript | |
line 3: " Maintainer: Chris Paul ( https://github.com/bounceme ) | |
line 4: " URL: https://github.com/pangloss/vim-javascript | |
line 5: " Last Change: December 4, 2017 | |
line 6: | |
line 7: " Only load this indent file when no other was loaded. | |
line 8: if exists('b:did_indent') | |
line 9: finish | |
line 10: endif | |
line 11: let b:did_indent = 1 | |
line 12: | |
line 13: " Now, set up our indentation expression and keys that trigger it. | |
line 14: setlocal indentexpr=GetJavascriptIndent() | |
line 15: setlocal autoindent nolisp nosmartindent | |
line 16: setlocal indentkeys+=0],0) | |
line 17: " Testable with something like: | |
line 18: " vim -eNs "+filetype plugin indent on" "+syntax on" "+set ft=javascript" \ | |
line 19: " "+norm! gg=G" '+%print' '+:q!' testfile.js \ | |
line 20: " | diff -uBZ testfile.js - | |
line 21: | |
line 22: let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<' | |
line 23: | |
line 24: " Only define the function once. | |
line 25: if exists('*GetJavascriptIndent') | |
line 26: finish | |
line 27: endif | |
line 28: | |
line 29: let s:cpo_save = &cpo | |
line 30: set cpo&vim | |
line 31: | |
line 32: " indent correctly if inside <script> | |
line 33: " vim/vim@690afe1 for the switch from cindent | |
line 34: " overridden with b:html_indent_script1 | |
line 35: call extend(g:,{'html_indent_script1': 'inc'},'keep') | |
line 36: | |
line 37: " Regex of syntax group names that are or delimit string or are comments. | |
line 40: let s:bvars = { 'syng_strcom': 'string\|comment\|regex\|special\|doc\|template\%(braces\)\@!', 'syng_str': 'string\|template\|special' } | |
line 41: " template strings may want to be excluded when editing graphql: | |
line 42: " au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special' | |
line 43: " au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc' | |
line 44: | |
line 45: function s:GetVars() | |
line 48: | |
line 49: " Get shiftwidth value | |
line 50: if exists('*shiftwidth') | |
line 51: function s:sw() | |
line 54: else | |
line 55: function s:sw() | |
line 58: endif | |
line 59: | |
line 60: " Performance for forwards search(): start search at pos rather than masking | |
line 61: " matches before pos. | |
line 62: let s:z = has('patch-7.4.984') ? 'z' : '' | |
line 63: | |
line 64: " Expression used to check whether we should skip a match with searchpair(). | |
line 65: let s:skip_expr = "s:SynAt(line('.'),col('.')) =~? b:syng_strcom" | |
line 66: let s:in_comm = s:skip_expr[:-14] . "'comment\\|doc'" | |
line 67: | |
line 68: let s:rel = has('reltime') | |
line 69: " searchpair() wrapper | |
line 70: if s:rel | |
line 71: function s:GetPair(start,end,flags,skip) | |
line 74: else | |
line 75: function s:GetPair(start,end,flags,skip) | |
line 78: endif | |
line 79: | |
line 80: function s:SynAt(l,c) | |
line 88: | |
line 89: function s:ParseCino(f) | |
line 107: | |
line 108: " Optimized {skip} expr, only callable from the search loop which | |
line 109: " GetJavascriptIndent does to find the containing [[{(] (side-effects) | |
line 110: function s:SkipFunc() | |
line 132: | |
line 133: function s:AlternatePair() | |
line 156: | |
line 157: function s:Nat(int) | |
line 160: | |
line 161: function s:LookingAt() | |
line 164: | |
line 165: function s:Token() | |
line 168: | |
line 169: function s:PreviousToken(...) | |
line 193: | |
line 194: function s:Pure(f,...) | |
line 197: | |
line 198: function s:SearchLoop(pat,flags,expr) | |
line 201: | |
line 202: function s:ExprCol() | |
line 228: | |
line 229: " configurable regexes that define continuation lines, not including (, {, or [. | |
line 231: let s:opfirst = '^' . get(g:,'javascript_opfirst', '\C\%([<>=,.?^%|/&]\|\([-:+]\)\1\@!\|\*\+\|!=\|in\%(stanceof\)\=\>\)') | |
line 233: let s:continuation = get(g:,'javascript_continuation', '\C\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$' | |
line 234: | |
line 235: function s:Continues() | |
line 244: | |
line 245: " Check if line 'lnum' has a balanced amount of parentheses. | |
line 246: function s:Balanced(lnum,line) | |
line 261: | |
line 262: function s:OneScope() | |
line 278: | |
line 279: function s:DoWhile() | |
line 295: | |
line 296: " returns total offset from braceless contexts. 'num' is the lineNr which | |
line 297: " encloses the entire context, 'cont' if whether a:firstline is a continued | |
line 298: " expression, which could have started in a braceless context | |
line 299: function s:IsContOne(cont) | |
line 318: | |
line 319: function s:IsSwitch() | |
line 323: | |
line 324: " https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader | |
line 325: function s:IsBlock() | |
line 351: | |
line 352: function GetJavascriptIndent() | |
line 478: | |
line 479: let &cpo = s:cpo_save | |
line 480: unlet s:cpo_save | |
finished sourcing /usr/share/vim/vim81/indent/javascript.vim | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
Searching for "/usr/share/vim/vimfiles/after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/indent/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/indent/javascript.vim" | |
line 34: endif | |
line 35: let b:did_indent = 1 | |
line 36: | |
line 37: setlocal indentexpr=HtmlIndent() | |
line 38: setlocal indentkeys=o,O,<Return>,<>>,{,},!^F | |
line 39: | |
line 40: " Needed for % to work when finding start/end of a tag. | |
line 41: setlocal matchpairs+=<:> | |
line 42: | |
line 43: let b:undo_indent = "setlocal inde< indk<" | |
line 44: | |
line 45: " b:hi_indent keeps state to speed up indenting consecutive lines. | |
line 46: let b:hi_indent = {"lnum": -1} | |
line 47: | |
line 48: """""" Code below this is loaded only once. """"" | |
line 49: if exists("*HtmlIndent") && !exists('g:force_reload_html') | |
line 50: call HtmlIndent_CheckUserSettings() | |
line 51: finish | |
line 52: endif | |
line 53: | |
line 54: " Allow for line continuation below. | |
line 55: let s:cpo_save = &cpo | |
line 56: set cpo-=C | |
line 57: "}}} | |
line 58: | |
line 59: " Pattern to match the name of a tag, including custom elements. | |
line 60: let s:tagname = '\w\+\(-\w\+\)*' | |
line 61: | |
line 62: " Check and process settings from b:html_indent and g:html_indent... variables. | |
line 63: " Prefer using buffer-local settings over global settings, so that there can | |
line 64: " be defaults for all HTML files and exceptions for specific types of HTML | |
line 65: " files. | |
line 66: func! HtmlIndent_CheckUserSettings() | |
line 154: | |
line 155: " Init Script Vars | |
line 156: "{{{ | |
line 157: let b:hi_lasttick = 0 | |
line 158: let b:hi_newstate = {} | |
line 159: let s:countonly = 0 | |
line 160: "}}} | |
line 161: | |
line 162: " Fill the s:indent_tags dict with known tags. | |
line 163: " The key is "tagname" or "/tagname". {{{ | |
line 164: " The value is: | |
line 165: " 1 opening tag | |
line 166: " 2 "pre" | |
line 167: " 3 "script" | |
line 168: " 4 "style" | |
line 169: " 5 comment start | |
line 170: " 6 conditional comment start | |
line 171: " -1 closing tag | |
line 172: " -2 "/pre" | |
line 173: " -3 "/script" | |
line 174: " -4 "/style" | |
line 175: " -5 comment end | |
line 176: " -6 conditional comment end | |
line 177: let s:indent_tags = {} | |
line 178: let s:endtags = [0,0,0,0,0,0,0] " long enough for the highest index | |
line 179: "}}} | |
line 180: | |
line 181: " Add a list of tag names for a pair of <tag> </tag> to "tags". | |
line 182: func! s:AddITags(tags, taglist) | |
line 189: | |
line 190: " Take a list of tag name pairs that are not to be used as tag pairs. | |
line 191: func! s:RemoveITags(tags, taglist) | |
line 198: | |
line 199: " Add a block tag, that is a tag with a different kind of indenting. | |
line 200: func! s:AddBlockTag(tag, id, ...) | |
line 215: | |
line 216: " Add known tag pairs. | |
line 217: " Self-closing tags and tags that are sometimes {{{ | |
line 218: " self-closing (e.g., <p>) are not here (when encountering </p> we can find | |
line 219: " the matching <p>, but not the other way around). | |
line 220: " Known self-closing tags: " 'p', 'img', 'source', 'area', 'keygen', 'track', | |
line 221: " 'wbr'. | |
line 222: " Old HTML tags: | |
line 232: call s:AddITags(s:indent_tags, [ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code', 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html', 'i', 'iframe', 'ins', 'kbd', 'label', 'legend', 'li', 'map', 'menu', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td', 'tr', 'tbody', 'tfoot', 'thead']) | |
calling function <SNR>41_AddITags({}, ['a', 'abbr', 'acronym', 'address', 'b... 'td', 'tr', 'tbody', 'tfoot', 'thead']) | |
line 1: "{{{ | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
function <SNR>41_AddITags returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 233: | |
line 234: " New HTML5 elements: | |
line 240: call s:AddITags(s:indent_tags, [ 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'data', 'datalist', 'details', 'dialog', 'embed', 'figcaption', 'figure', 'footer', 'header', 'hgroup', 'main', 'mark', 'meter', 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'summary', 'svg', 'time', 'video']) | |
calling function <SNR>41_AddITags({'/u': -1, 'title': 1, '/th': -1, 'li'...ss': -1, 'caption': 1, '/fieldset': -1}, ['article', 'aside', 'audio', 'bdi', '...on', 'summary', 'svg', 'time', 'video']) | |
line 1: "{{{ | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
function <SNR>41_AddITags returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 241: | |
line 242: " Tags added for web components: | |
line 244: call s:AddITags(s:indent_tags, [ 'content', 'shadow', 'template']) | |
calling function <SNR>41_AddITags({'/meter': -1, '/embed': -1, 'hgroup':...ta': -1, '/footer': -1, '/address': -1}, ['content', 'shadow', 'template']) | |
line 1: "{{{ | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
line 2: for itag in a:taglist | |
line 3: let a:tags[itag] = 1 | |
line 4: let a:tags['/' . itag] = -1 | |
line 5: endfor | |
function <SNR>41_AddITags returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 245: "}}} | |
line 246: | |
line 247: " Add Block Tags: these contain alien content | |
line 248: "{{{ | |
line 249: call s:AddBlockTag('pre', 2) | |
calling function <SNR>41_AddBlockTag('pre', 2) | |
line 1: "{{{ | |
line 2: if !(a:id >= 2 && a:id < len(s:endtags)) | |
line 3: echoerr 'AddBlockTag ' . a:id | |
line 4: return | |
line 5: endif | |
line 6: let s:indent_tags[a:tag] = a:id | |
line 7: if a:0 == 0 | |
line 8: let s:indent_tags['/' . a:tag] = -a:id | |
line 9: let s:endtags[a:id] = "</" . a:tag . ">" | |
line 10: else | |
line 11: let s:indent_tags[a:1] = -a:id | |
line 12: let s:endtags[a:id] = a:1 | |
line 13: endif | |
function <SNR>41_AddBlockTag returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 250: call s:AddBlockTag('script', 3) | |
calling function <SNR>41_AddBlockTag('script', 3) | |
line 1: "{{{ | |
line 2: if !(a:id >= 2 && a:id < len(s:endtags)) | |
line 3: echoerr 'AddBlockTag ' . a:id | |
line 4: return | |
line 5: endif | |
line 6: let s:indent_tags[a:tag] = a:id | |
line 7: if a:0 == 0 | |
line 8: let s:indent_tags['/' . a:tag] = -a:id | |
line 9: let s:endtags[a:id] = "</" . a:tag . ">" | |
line 10: else | |
line 11: let s:indent_tags[a:1] = -a:id | |
line 12: let s:endtags[a:id] = a:1 | |
line 13: endif | |
function <SNR>41_AddBlockTag returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 251: call s:AddBlockTag('style', 4) | |
calling function <SNR>41_AddBlockTag('style', 4) | |
line 1: "{{{ | |
line 2: if !(a:id >= 2 && a:id < len(s:endtags)) | |
line 3: echoerr 'AddBlockTag ' . a:id | |
line 4: return | |
line 5: endif | |
line 6: let s:indent_tags[a:tag] = a:id | |
line 7: if a:0 == 0 | |
line 8: let s:indent_tags['/' . a:tag] = -a:id | |
line 9: let s:endtags[a:id] = "</" . a:tag . ">" | |
line 10: else | |
line 11: let s:indent_tags[a:1] = -a:id | |
line 12: let s:endtags[a:id] = a:1 | |
line 13: endif | |
function <SNR>41_AddBlockTag returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 252: call s:AddBlockTag('<!--', 5, '-->') | |
calling function <SNR>41_AddBlockTag('<!--', 5, '-->') | |
line 1: "{{{ | |
line 2: if !(a:id >= 2 && a:id < len(s:endtags)) | |
line 3: echoerr 'AddBlockTag ' . a:id | |
line 4: return | |
line 5: endif | |
line 6: let s:indent_tags[a:tag] = a:id | |
line 7: if a:0 == 0 | |
line 8: let s:indent_tags['/' . a:tag] = -a:id | |
line 9: let s:endtags[a:id] = "</" . a:tag . ">" | |
line 10: else | |
line 11: let s:indent_tags[a:1] = -a:id | |
line 12: let s:endtags[a:id] = a:1 | |
line 13: endif | |
function <SNR>41_AddBlockTag returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 253: call s:AddBlockTag('<!--[', 6, '![endif]-->') | |
calling function <SNR>41_AddBlockTag('<!--[', 6, '![endif]-->') | |
line 1: "{{{ | |
line 2: if !(a:id >= 2 && a:id < len(s:endtags)) | |
line 3: echoerr 'AddBlockTag ' . a:id | |
line 4: return | |
line 5: endif | |
line 6: let s:indent_tags[a:tag] = a:id | |
line 7: if a:0 == 0 | |
line 8: let s:indent_tags['/' . a:tag] = -a:id | |
line 9: let s:endtags[a:id] = "</" . a:tag . ">" | |
line 10: else | |
line 11: let s:indent_tags[a:1] = -a:id | |
line 12: let s:endtags[a:id] = a:1 | |
line 13: endif | |
function <SNR>41_AddBlockTag returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 254: "}}} | |
line 255: | |
line 256: " Return non-zero when "tagname" is an opening tag, not being a block tag, for | |
line 257: " which there should be a closing tag. Can be used by scripts that include | |
line 258: " HTML indenting. | |
line 259: func! HtmlIndent_IsOpenTag(tagname) | |
line 266: | |
line 267: " Get the value for "tagname", taking care of buffer-local tags. | |
line 268: func! s:get_tag(tagname) | |
line 279: | |
line 280: " Count the number of start and end tags in "text". | |
line 281: func! s:CountITags(text) | |
line 291: | |
line 292: " Count the number of start and end tags in text. | |
line 293: func! s:CountTagsAndState(text) | |
line 306: | |
line 307: " Used by s:CountITags() and s:CountTagsAndState(). | |
line 308: func! s:CheckTag(itag) | |
line 340: | |
line 341: " Used by s:CheckTag(). Returns an empty string or "SCRIPT". | |
line 342: func! s:CheckBlockTag(blocktag, ind) | |
line 368: | |
line 369: " Used by s:CheckTag(). | |
line 370: func! s:CheckCustomTag(ctag) | |
line 398: | |
line 399: " Return the <script> type: either "javascript" or "" | |
line 400: func! s:GetScriptType(str) | |
line 408: | |
line 409: " Look back in the file, starting at a:lnum - 1, to compute a state for the | |
line 410: " start of line a:lnum. Return the new state. | |
line 411: func! s:FreshState(lnum) | |
line 570: | |
line 571: " Indent inside a <pre> block: Keep indent as-is. | |
line 572: func! s:Alien2() | |
line 576: | |
line 577: " Return the indent inside a <script> block for javascript. | |
line 578: func! s:Alien3() | |
line 595: | |
line 596: " Return the indent inside a <style> block. | |
line 597: func! s:Alien4() | |
line 605: | |
line 606: " Indending inside a <style> block. Returns the indent. | |
line 607: func! s:CSSIndent() | |
line 718: | |
line 719: " Inside <style>: Whether a line is unfinished. | |
line 720: " ^Itag: | |
line 721: " ^Itag: blah | |
line 722: " ^Itag: blah && | |
line 723: " ^Itag: blah || | |
line 724: func! s:CssUnfinished(text) | |
line 728: | |
line 729: " Search back for the first unfinished line above "lnum". | |
line 730: func! s:CssFirstUnfinished(lnum, min_lnum) | |
line 738: | |
line 739: " Find the non-empty line at or before "lnum" that is not a comment. | |
line 740: func! s:CssPrevNonComment(lnum, stopline) | |
line 763: | |
line 764: " Check the number of {} and () in line "lnum". Return a dict with the counts. | |
line 765: func! HtmlIndent_CountBraces(lnum) | |
line 796: | |
line 797: " Return the indent for a comment: <!-- --> | |
line 798: func! s:Alien5() | |
line 828: | |
line 829: " Return the indent for conditional comment: <!--[ ![endif]--> | |
line 830: func! s:Alien6() | |
line 842: | |
line 843: " When the "lnum" line ends in ">" find the line containing the matching "<". | |
line 844: func! HtmlIndent_FindTagStart(lnum) | |
line 865: | |
line 866: " Find the unclosed start tag from the current cursor position. | |
line 867: func! HtmlIndent_FindStartTag() | |
line 879: | |
line 880: " Moves the cursor from a "<" to the matching ">". | |
line 881: func! HtmlIndent_FindTagEnd() | |
line 899: | |
line 900: " Indenting inside a start tag. Return the correct indent or -1 if unknown. | |
line 901: func! s:InsideTag(foundHtmlString) | |
line 953: | |
line 954: " THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum. | |
line 955: func! HtmlIndent() | |
line 1067: | |
line 1068: " Check user settings when loading this script the first time. | |
line 1069: call HtmlIndent_CheckUserSettings() | |
calling function HtmlIndent_CheckUserSettings() | |
line 1: "{{{ | |
line 2: let inctags = '' | |
line 3: if exists("b:html_indent_inctags") | |
line 4: let inctags = b:html_indent_inctags | |
line 5: elseif exists("g:html_indent_inctags") | |
line 6: let inctags = g:html_indent_inctags | |
line 7: endif | |
line 8: let b:hi_tags = {} | |
line 9: if len(inctags) > 0 | |
line 10: call s:AddITags(b:hi_tags, split(inctags, ",")) | |
line 11: endif | |
line 12: | |
line 13: let autotags = '' | |
line 14: if exists("b:html_indent_autotags") | |
line 15: let autotags = b:html_indent_autotags | |
line 16: elseif exists("g:html_indent_autotags") | |
line 17: let autotags = g:html_indent_autotags | |
line 18: endif | |
line 19: let b:hi_removed_tags = {} | |
line 20: if len(autotags) > 0 | |
line 21: call s:RemoveITags(b:hi_removed_tags, split(autotags, ",")) | |
line 22: endif | |
line 23: | |
line 24: " Syntax names indicating being inside a string of an attribute value. | |
line 25: let string_names = [] | |
line 26: if exists("b:html_indent_string_names") | |
line 27: let string_names = b:html_indent_string_names | |
line 28: elseif exists("g:html_indent_string_names") | |
line 29: let string_names = g:html_indent_string_names | |
line 30: endif | |
line 31: let b:hi_insideStringNames = ['htmlString'] | |
line 32: if len(string_names) > 0 | |
line 33: for s in string_names | |
line 34: call add(b:hi_insideStringNames, s) | |
line 35: endfor | |
line 36: endif | |
line 37: | |
line 38: " Syntax names indicating being inside a tag. | |
line 39: let tag_names = [] | |
line 40: if exists("b:html_indent_tag_names") | |
line 41: let tag_names = b:html_indent_tag_names | |
line 42: elseif exists("g:html_indent_tag_names") | |
line 43: let tag_names = g:html_indent_tag_names | |
line 44: endif | |
line 45: let b:hi_insideTagNames = ['htmlTag', 'htmlScriptTag'] | |
line 46: if len(tag_names) > 0 | |
line 47: for s in tag_names | |
line 48: call add(b:hi_insideTagNames, s) | |
line 49: endfor | |
line 50: endif | |
line 51: | |
line 52: let indone = {"zero": 0,"auto": "indent(prevnonblank(v:lnum-1))","inc": "b:hi_indent.blocktagind + shiftwidth()"} | |
line 55: | |
line 56: let script1 = '' | |
line 57: if exists("b:html_indent_script1") | |
line 58: let script1 = b:html_indent_script1 | |
line 59: elseif exists("g:html_indent_script1") | |
line 60: let script1 = g:html_indent_script1 | |
line 61: endif | |
line 62: if len(script1) > 0 | |
line 63: let b:hi_js1indent = get(indone, script1, indone.zero) | |
line 64: else | |
line 65: let b:hi_js1indent = 0 | |
line 66: endif | |
line 67: | |
line 68: let style1 = '' | |
line 69: if exists("b:html_indent_style1") | |
line 70: let style1 = b:html_indent_style1 | |
line 71: elseif exists("g:html_indent_style1") | |
line 72: let style1 = g:html_indent_style1 | |
line 73: endif | |
line 74: if len(style1) > 0 | |
line 75: let b:hi_css1indent = get(indone, style1, indone.zero) | |
line 76: else | |
line 77: let b:hi_css1indent = 0 | |
line 78: endif | |
line 79: | |
line 80: if !exists('b:html_indent_line_limit') | |
line 81: if exists('g:html_indent_line_limit') | |
line 82: let b:html_indent_line_limit = g:html_indent_line_limit | |
line 83: else | |
line 84: let b:html_indent_line_limit = 200 | |
line 85: endif | |
line 86: endif | |
function HtmlIndent_CheckUserSettings returning #0 | |
continuing in /usr/share/vim/vim81/indent/html.vim | |
line 1070: | |
line 1071: let &cpo = s:cpo_save | |
line 1072: unlet s:cpo_save | |
line 1073: | |
line 1074: " vim: fdm=marker ts=8 sw=2 tw=78 | |
finished sourcing /usr/share/vim/vim81/indent/html.vim | |
continuing in /usr/share/vim/vim81/indent/htmldjango.vim | |
Searching for "/usr/share/vim/vimfiles/after/indent/html.vim" | |
Searching for "/home/migacz/.vim/after/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/indent/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/indent/html.vim" | |
finished sourcing /usr/share/vim/vim81/indent/htmldjango.vim | |
continuing in function <SNR>12_LoadIndent | |
Searching for "/usr/share/vim/vimfiles/after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/indent/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/indent/htmldjango.vim" | |
line 15: endfor | |
line 13: for name in split(s, '\.') | |
line 14: ^Iexe 'runtime! indent/' . name . '.vim' | |
line 15: endfor | |
line 16: endif | |
function <SNR>12_LoadIndent returning #0 | |
continuing in FileType Autocommands for "*" | |
Executing FileType Autocommands for "*" | |
autocommand exe "set syntax=" . expand("<amatch>") | |
line 0: exe "set syntax=" . expand("<amatch>") | |
line 0: set syntax=htmldjango | |
Executing Syntax Autocommands for "*" | |
autocommand call s:SynSet() | |
line 0: call s:SynSet() | |
calling function <SNR>14_SynSet() | |
line 1: " clear syntax for :set syntax=OFF and any syntax name that doesn't exist | |
line 2: syn clear | |
line 3: if exists("b:current_syntax") | |
line 4: unlet b:current_syntax | |
line 5: endif | |
line 6: | |
line 7: let s = expand("<amatch>") | |
line 8: if s == "ON" | |
line 9: " :set syntax=ON | |
line 10: if &filetype == "" | |
line 11: echohl ErrorMsg | |
line 12: echo "filetype unknown" | |
line 13: echohl None | |
line 14: endif | |
line 15: let s = &filetype | |
line 16: elseif s == "OFF" | |
line 17: let s = "" | |
line 18: endif | |
line 19: | |
line 20: if s != "" | |
line 21: " Load the syntax file(s). When there are several, separated by dots, | |
line 22: " load each in sequence. | |
line 23: for name in split(s, '\.') | |
line 24: exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" | |
line 24: runtime! syntax/htmldjango.vim syntax/htmldjango/*.vim | |
Searching for "syntax/htmldjango.vim syntax/htmldjango/*.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/htmldjango/*.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/htmldjango.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/htmldjango/*.vim" | |
Searching for "/usr/share/vim/vim81/syntax/htmldjango.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 24: sourcing "/usr/share/vim/vim81/syntax/htmldjango.vim" | |
line 1: " Vim syntax file | |
line 2: " Language:^IDjango HTML template | |
line 3: " Maintainer:^IDave Hodder <[email protected]> | |
line 4: " Last Change:^I2014 Jul 13 | |
line 5: | |
line 6: " quit when a syntax file was already loaded | |
line 7: if exists("b:current_syntax") | |
line 8: finish | |
line 9: endif | |
line 10: | |
line 11: if !exists("main_syntax") | |
line 12: let main_syntax = 'html' | |
line 13: endif | |
line 14: | |
line 15: runtime! syntax/django.vim | |
Searching for "syntax/django.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/django.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/django.vim" | |
Searching for "/usr/share/vim/vim81/syntax/django.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 15: sourcing "/usr/share/vim/vim81/syntax/django.vim" | |
line 1: " Vim syntax file | |
line 2: " Language:^IDjango template | |
line 3: " Maintainer:^IDave Hodder <[email protected]> | |
line 4: " Last Change:^I2014 Jul 13 | |
line 5: | |
line 6: " quit when a syntax file was already loaded | |
line 7: if exists("b:current_syntax") | |
line 8: finish | |
line 9: endif | |
line 10: | |
line 11: syntax case match | |
line 12: | |
line 13: " Mark illegal characters | |
line 14: syn match djangoError "%}\|}}\|#}" | |
line 15: | |
line 16: " Django template built-in tags and parameters | |
line 17: " 'comment' doesn't appear here because it gets special treatment | |
line 18: syn keyword djangoStatement contained autoescape csrf_token empty | |
line 19: " FIXME ==, !=, <, >, <=, and >= should be djangoStatements: | |
line 20: " syn keyword djangoStatement contained == != < > <= >= | |
line 21: syn keyword djangoStatement contained and as block endblock by cycle debug else elif | |
line 22: syn keyword djangoStatement contained extends filter endfilter firstof for | |
line 23: syn keyword djangoStatement contained endfor if endif ifchanged endifchanged | |
line 24: syn keyword djangoStatement contained ifequal endifequal ifnotequal | |
line 25: syn keyword djangoStatement contained endifnotequal in include load not now or | |
line 26: syn keyword djangoStatement contained parsed regroup reversed spaceless | |
line 27: syn keyword djangoStatement contained endspaceless ssi templatetag openblock | |
line 28: syn keyword djangoStatement contained closeblock openvariable closevariable | |
line 29: syn keyword djangoStatement contained openbrace closebrace opencomment | |
line 30: syn keyword djangoStatement contained closecomment widthratio url with endwith | |
line 31: syn keyword djangoStatement contained get_current_language trans noop blocktrans | |
line 32: syn keyword djangoStatement contained endblocktrans get_available_languages | |
line 33: syn keyword djangoStatement contained get_current_language_bidi plural | |
line 34: | |
line 35: " Django templete built-in filters | |
line 36: syn keyword djangoFilter contained add addslashes capfirst center cut date | |
line 37: syn keyword djangoFilter contained default default_if_none dictsort | |
line 38: syn keyword djangoFilter contained dictsortreversed divisibleby escape escapejs | |
line 39: syn keyword djangoFilter contained filesizeformat first fix_ampersands | |
line 40: syn keyword djangoFilter contained floatformat get_digit join last length length_is | |
line 41: syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust | |
line 42: syn keyword djangoFilter contained lower make_list phone2numeric pluralize | |
line 43: syn keyword djangoFilter contained pprint random removetags rjust slice slugify | |
line 44: syn keyword djangoFilter contained safe safeseq stringformat striptags | |
line 45: syn keyword djangoFilter contained time timesince timeuntil title truncatechars | |
line 46: syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode | |
line 47: syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno | |
line 48: | |
line 49: " Keywords to highlight within comments | |
line 50: syn keyword djangoTodo contained TODO FIXME XXX | |
line 51: | |
line 52: " Django template constants (always surrounded by double quotes) | |
line 53: syn region djangoArgument contained start=/"/ skip=/\\"/ end=/"/ | |
line 54: | |
line 55: " Mark illegal characters within tag and variables blocks | |
line 56: syn match djangoTagError contained "#}\|{{\|[^%]}}\|[&#]" | |
line 57: syn match djangoVarError contained "#}\|{%\|%}\|[<>!&#%]" | |
line 58: | |
line 59: " Django template tag and variable blocks | |
line 60: syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display | |
line 61: syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display | |
line 62: | |
line 63: " Django template 'comment' tag and comment block | |
line 64: syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo | |
line 65: syn region djangoComBlock start="{#" end="#}" contains=djangoTodo | |
line 66: | |
line 67: " Define the default highlighting. | |
line 68: " Only when an item doesn't have highlighting yet | |
line 69: | |
line 70: hi def link djangoTagBlock PreProc | |
line 71: hi def link djangoVarBlock PreProc | |
line 72: hi def link djangoStatement Statement | |
line 73: hi def link djangoFilter Identifier | |
line 74: hi def link djangoArgument Constant | |
line 75: hi def link djangoTagError Error | |
line 76: hi def link djangoVarError Error | |
line 77: hi def link djangoError Error | |
line 78: hi def link djangoComment Comment | |
line 79: hi def link djangoComBlock Comment | |
line 80: hi def link djangoTodo Todo | |
line 81: | |
line 82: | |
line 83: let b:current_syntax = "django" | |
finished sourcing /usr/share/vim/vim81/syntax/django.vim | |
continuing in /usr/share/vim/vim81/syntax/htmldjango.vim | |
Searching for "/usr/share/vim/vimfiles/after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/django.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/django.vim" | |
line 16: runtime! syntax/html.vim | |
Searching for "syntax/html.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/html.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/html.vim" | |
Searching for "/usr/share/vim/vim81/syntax/html.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 16: sourcing "/usr/share/vim/vim81/syntax/html.vim" | |
line 1: " Vim syntax file | |
line 2: " Language: HTML | |
line 3: " Maintainer: Jorge Maldonado Ventura <[email protected]> | |
line 4: " Previous Maintainer: Claudio Fleiner <[email protected]> | |
line 5: " Repository: https://notabug.org/jorgesumle/vim-html-syntax | |
line 6: " Last Change: 2018 May 31 | |
line 7: " Included patch from Jay Sitter to add WAI-ARIA htmlArg keywords | |
line 8: " | |
line 9: | |
line 10: " Please check :help html.vim for some comments and a description of the options | |
line 11: | |
line 12: " quit when a syntax file was already loaded | |
line 13: if !exists("main_syntax") | |
line 14: if exists("b:current_syntax") | |
line 15: finish | |
line 16: endif | |
line 17: let main_syntax = 'html' | |
line 18: endif | |
line 19: | |
line 20: let s:cpo_save = &cpo | |
line 21: set cpo&vim | |
line 22: | |
line 23: syntax spell toplevel | |
line 24: | |
line 25: syn case ignore | |
line 26: | |
line 27: " mark illegal characters | |
line 28: syn match htmlError "[<>&]" | |
line 29: | |
line 30: | |
line 31: " tags | |
line 32: syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc | |
line 33: syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc | |
line 34: syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc | |
line 35: syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError | |
line 36: syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster | |
line 37: syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster | |
line 38: syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster | |
line 39: syn match htmlTagError contained "[^>]<"ms=s+1 | |
line 40: | |
line 41: | |
line 42: " tag names | |
line 43: syn keyword htmlTagName contained address applet area a base basefont | |
line 44: syn keyword htmlTagName contained big blockquote br caption center | |
line 45: syn keyword htmlTagName contained cite code dd dfn dir div dl dt font | |
line 46: syn keyword htmlTagName contained form hr html img | |
line 47: syn keyword htmlTagName contained input isindex kbd li link map menu | |
line 48: syn keyword htmlTagName contained meta ol option param pre p samp span | |
line 49: syn keyword htmlTagName contained select small sub sup | |
line 50: syn keyword htmlTagName contained table td textarea th tr tt ul var xmp | |
line 51: syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>" | |
line 52: | |
line 53: " new html 4.0 tags | |
line 54: syn keyword htmlTagName contained abbr acronym bdo button col label | |
line 55: syn keyword htmlTagName contained colgroup fieldset iframe ins legend | |
line 56: syn keyword htmlTagName contained object optgroup q s tbody tfoot thead | |
line 57: | |
line 58: " new html 5 tags | |
line 59: syn keyword htmlTagName contained article aside audio bdi canvas data | |
line 60: syn keyword htmlTagName contained datalist details embed figcaption figure | |
line 61: syn keyword htmlTagName contained footer header hgroup keygen main mark | |
line 62: syn keyword htmlTagName contained menuitem meter nav output picture | |
line 63: syn keyword htmlTagName contained progress rb rp rt rtc ruby section | |
line 64: syn keyword htmlTagName contained slot source template time track video wbr | |
line 65: | |
line 66: " legal arg names | |
line 67: syn keyword htmlArg contained action | |
line 68: syn keyword htmlArg contained align alink alt archive background bgcolor | |
line 69: syn keyword htmlArg contained border bordercolor cellpadding | |
line 70: syn keyword htmlArg contained cellspacing checked class clear code codebase color | |
line 71: syn keyword htmlArg contained cols colspan content coords enctype face | |
line 72: syn keyword htmlArg contained gutter height hspace id | |
line 73: syn keyword htmlArg contained link lowsrc marginheight | |
line 74: syn keyword htmlArg contained marginwidth maxlength method name prompt | |
line 75: syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape | |
line 76: syn keyword htmlArg contained size src start target text type url | |
line 77: syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap | |
line 78: syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 | |
line 79: | |
line 80: " aria attributes | |
line 81: syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>" | |
line 82: syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>" | |
line 83: syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>" | |
line 84: syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>" | |
line 85: syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>" | |
line 86: syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>" | |
line 87: syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>" | |
line 88: syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>" | |
line 89: syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>" | |
line 90: syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>" | |
line 91: syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>" | |
line 92: syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>" | |
line 93: syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>" | |
line 94: syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>" | |
line 95: syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>" | |
line 96: syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>" | |
line 97: syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>" | |
line 98: syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>" | |
line 99: syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>" | |
line 100: syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>" | |
line 101: syn keyword htmlArg contained role | |
line 102: | |
line 103: " Netscape extensions | |
line 104: syn keyword htmlTagName contained frame noframes frameset nobr blink | |
line 105: syn keyword htmlTagName contained layer ilayer nolayer spacer | |
line 106: syn keyword htmlArg contained frameborder noresize pagex pagey above below | |
line 107: syn keyword htmlArg contained left top visibility clip id noshade | |
line 108: syn match htmlArg contained "\<z-index\>" | |
line 109: | |
line 110: " Microsoft extensions | |
line 111: syn keyword htmlTagName contained marquee | |
line 112: | |
line 113: " html 4.0 arg names | |
line 114: syn match htmlArg contained "\<\(accept-charset\|label\)\>" | |
line 115: syn keyword htmlArg contained abbr accept accesskey axis char charoff charset | |
line 116: syn keyword htmlArg contained cite classid codetype compact data datetime | |
line 117: syn keyword htmlArg contained declare defer dir disabled for frame | |
line 118: syn keyword htmlArg contained headers hreflang lang language longdesc | |
line 119: syn keyword htmlArg contained multiple nohref nowrap object profile readonly | |
line 120: syn keyword htmlArg contained rules scheme scope span standby style | |
line 121: syn keyword htmlArg contained summary tabindex valuetype version | |
line 122: | |
line 123: " html 5 arg names | |
line 124: syn keyword htmlArg contained allowfullscreen async autocomplete autofocus | |
line 125: syn keyword htmlArg contained autoplay challenge contenteditable contextmenu | |
line 126: syn keyword htmlArg contained controls crossorigin default dialog dirname | |
line 127: syn keyword htmlArg contained download draggable dropzone form formaction | |
line 128: syn keyword htmlArg contained formenctype formmethod formnovalidate formtarget | |
line 129: syn keyword htmlArg contained hidden high icon inputmode keytype kind list loop | |
line 130: syn keyword htmlArg contained low max min minlength muted nonce novalidate open | |
line 131: syn keyword htmlArg contained optimum pattern placeholder poster preload | |
line 132: syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck | |
line 133: syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate | |
line 134: syn keyword htmlArg contained typemustmatch | |
line 135: | |
line 136: " special characters | |
line 137: syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" | |
line 138: | |
line 139: " Comments (the real ones or the old netscape ones) | |
line 140: if exists("html_wrong_comments") | |
line 141: syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell | |
line 142: else | |
line 143: syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError,@Spell | |
line 144: syn match htmlCommentError contained "[^><!]" | |
line 145: syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell | |
line 146: endif | |
line 147: syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+ | |
line 148: | |
line 149: " server-parsed commands | |
line 150: syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr | |
line 151: syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>" | |
line 152: syn match htmlPreError contained "<!--#\S*"ms=s+4 | |
line 153: syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName | |
line 154: syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend | |
line 155: syn match htmlPreProcAttrError contained "\w\+="he=e-1 | |
line 156: syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1 | |
line 157: | |
line 158: if !exists("html_no_rendering") | |
line 159: " rendering | |
line 160: syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc | |
line 161: | |
line 162: syn region htmlStrike start="<del\>" end="</del>"me=e-6 contains=@htmlTop | |
line 163: syn region htmlStrike start="<strike\>" end="</strike>"me=e-9 contains=@htmlTop | |
line 164: | |
line 165: syn region htmlBold start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic | |
line 166: syn region htmlBold start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic | |
line 167: syn region htmlBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic | |
line 168: syn region htmlBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlBoldItalicUnderline | |
line 169: syn region htmlBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlBoldItalicUnderline | |
line 170: syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop | |
line 171: syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop | |
line 172: syn region htmlBoldItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic | |
line 173: | |
line 174: syn region htmlUnderline start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic | |
line 175: syn region htmlUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic | |
line 176: syn region htmlUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic | |
line 177: syn region htmlUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlUnderlineItalicBold | |
line 178: syn region htmlUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlUnderlineItalicBold | |
line 179: syn region htmlUnderlineItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop | |
line 180: syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop | |
line 181: syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop | |
line 182: syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop | |
line 183: | |
line 184: syn region htmlItalic start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline | |
line 185: syn region htmlItalic start="<em\>" end="</em>"me=e-5 contains=@htmlTop | |
line 186: syn region htmlItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlItalicBoldUnderline | |
line 187: syn region htmlItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlItalicBoldUnderline | |
line 188: syn region htmlItalicBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop | |
line 189: syn region htmlItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlItalicUnderlineBold | |
line 190: syn region htmlItalicUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop | |
line 191: syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop | |
line 192: | |
line 193: syn match htmlLeadingSpace "^\s\+" contained | |
line 194: syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc | |
line 195: syn region htmlH1 start="<h1\>" end="</h1>"me=e-5 contains=@htmlTop | |
line 196: syn region htmlH2 start="<h2\>" end="</h2>"me=e-5 contains=@htmlTop | |
line 197: syn region htmlH3 start="<h3\>" end="</h3>"me=e-5 contains=@htmlTop | |
line 198: syn region htmlH4 start="<h4\>" end="</h4>"me=e-5 contains=@htmlTop | |
line 199: syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop | |
line 200: syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop | |
line 201: syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc | |
line 202: syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc | |
line 203: endif | |
line 204: | |
line 205: syn keyword htmlTagName contained noscript | |
line 206: syn keyword htmlSpecialTagName contained script style | |
line 207: if main_syntax != 'java' || exists("java_javascript") | |
line 208: " JAVA SCRIPT | |
line 209: syn include @htmlJavaScript syntax/javascript.vim | |
Searching for "syntax/javascript.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/javascript.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/javascript.vim" | |
Searching for "/usr/share/vim/vim81/syntax/javascript.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 209: sourcing "/usr/share/vim/vim81/syntax/javascript.vim" | |
line 1: " Vim syntax file | |
line 2: " Language:^IJavaScript | |
line 3: " Maintainer:^IClaudio Fleiner <[email protected]> | |
line 4: " Updaters:^IScott Shattuck (ss) <[email protected]> | |
line 5: " URL:^I^Ihttp://www.fleiner.com/vim/syntax/javascript.vim | |
line 6: " Changes:^I(ss) added keywords, reserved words, and other identifiers | |
line 7: "^I^I(ss) repaired several quoting and grouping glitches | |
line 8: "^I^I(ss) fixed regex parsing issue with multiple qualifiers [gi] | |
line 9: "^I^I(ss) additional factoring of keywords, globals, and members | |
line 10: " Last Change:^I2018 Jul 28 | |
line 11: " ^I^I2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) | |
line 12: " ^I^I2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder) | |
line 13: | |
line 14: " tuning parameters: | |
line 15: " unlet javaScript_fold | |
line 16: | |
line 17: if !exists("main_syntax") | |
line 18: " quit when a syntax file was already loaded | |
line 19: if exists("b:current_syntax") | |
line 20: finish | |
line 21: endif | |
line 22: let main_syntax = 'javascript' | |
line 23: elseif exists("b:current_syntax") && b:current_syntax == "javascript" | |
line 24: finish | |
line 25: endif | |
line 26: | |
line 27: let s:cpo_save = &cpo | |
line 28: set cpo&vim | |
line 29: | |
line 30: | |
line 31: syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained | |
line 32: syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo | |
line 33: syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" | |
line 34: syn region javaScriptComment^I start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo | |
line 35: syn match javaScriptSpecial^I "\\\d\d\d\|\\." | |
line 36: syn region javaScriptStringD^I start=+"+ skip=+\\\\\|\\"+ end=+"\|$+^Icontains=javaScriptSpecial,@htmlPreproc | |
line 37: syn region javaScriptStringS^I start=+'+ skip=+\\\\\|\\'+ end=+'\|$+^Icontains=javaScriptSpecial,@htmlPreproc | |
line 38: syn region javaScriptStringT^I start=+`+ skip=+\\\\\|\\`+ end=+`+^Icontains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc | |
line 39: | |
line 40: syn region javaScriptEmbed^I start=+${+ end=+}+^Icontains=@javaScriptEmbededExpr | |
line 41: | |
line 42: syn match javaScriptSpecialCharacter "'\\.'" | |
line 43: syn match javaScriptNumber^I "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" | |
line 44: syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline | |
line 45: | |
line 46: syn keyword javaScriptConditional^Iif else switch | |
line 47: syn keyword javaScriptRepeat^I^Iwhile for do in | |
line 48: syn keyword javaScriptBranch^I^Ibreak continue | |
line 49: syn keyword javaScriptOperator^I^Inew delete instanceof typeof | |
line 50: syn keyword javaScriptType^I^IArray Boolean Date Function Number Object String RegExp | |
line 51: syn keyword javaScriptStatement^I^Ireturn with | |
line 52: syn keyword javaScriptBoolean^I^Itrue false | |
line 53: syn keyword javaScriptNull^I^Inull undefined | |
line 54: syn keyword javaScriptIdentifier^Iarguments this var let | |
line 55: syn keyword javaScriptLabel^I^Icase default | |
line 56: syn keyword javaScriptException^I^Itry catch finally throw | |
line 57: syn keyword javaScriptMessage^I^Ialert confirm prompt status | |
line 58: syn keyword javaScriptGlobal^I^Iself window top parent | |
line 59: syn keyword javaScriptMember^I^Idocument event location | |
line 60: syn keyword javaScriptDeprecated^Iescape unescape | |
line 61: syn keyword javaScriptReserved^I^Iabstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile | |
line 62: | |
line 63: syn cluster javaScriptEmbededExpr^Icontains=javaScriptBoolean,javaScriptNull,javaScriptIdentifier,javaScriptStringD,javaScriptStringS,javaScriptStringT | |
line 64: | |
line 65: if exists("javaScript_fold") | |
line 66: syn match^IjavaScriptFunction^I"\<function\>" | |
line 67: syn region^IjavaScriptFunctionFold^Istart="\<function\>.*[^};]$" end="^\z1}.*$" transparent fold keepend | |
line 68: | |
line 69: syn sync match javaScriptSync^Igrouphere javaScriptFunctionFold "\<function\>" | |
line 70: syn sync match javaScriptSync^Igrouphere NONE "^}" | |
line 71: | |
line 72: setlocal foldmethod=syntax | |
line 73: setlocal foldtext=getline(v:foldstart) | |
line 74: else | |
line 75: syn keyword javaScriptFunction^Ifunction | |
line 76: syn match^IjavaScriptBraces^I "[{}\[\]]" | |
line 77: syn match^IjavaScriptParens^I "[()]" | |
line 78: endif | |
line 79: | |
line 80: syn sync fromstart | |
line 81: syn sync maxlines=100 | |
line 82: | |
line 83: if main_syntax == "javascript" | |
line 84: syn sync ccomment javaScriptComment | |
line 85: endif | |
line 86: | |
line 87: " Define the default highlighting. | |
line 88: " Only when an item doesn't have highlighting yet | |
line 89: hi def link javaScriptComment^I^IComment | |
line 90: hi def link javaScriptLineComment^I^IComment | |
line 91: hi def link javaScriptCommentTodo^I^ITodo | |
line 92: hi def link javaScriptSpecial^I^ISpecial | |
line 93: hi def link javaScriptStringS^I^IString | |
line 94: hi def link javaScriptStringD^I^IString | |
line 95: hi def link javaScriptStringT^I^IString | |
line 96: hi def link javaScriptCharacter^I^ICharacter | |
line 97: hi def link javaScriptSpecialCharacter^IjavaScriptSpecial | |
line 98: hi def link javaScriptNumber^I^IjavaScriptValue | |
line 99: hi def link javaScriptConditional^I^IConditional | |
line 100: hi def link javaScriptRepeat^I^IRepeat | |
line 101: hi def link javaScriptBranch^I^IConditional | |
line 102: hi def link javaScriptOperator^I^IOperator | |
line 103: hi def link javaScriptType^I^I^IType | |
line 104: hi def link javaScriptStatement^I^IStatement | |
line 105: hi def link javaScriptFunction^I^IFunction | |
line 106: hi def link javaScriptBraces^I^IFunction | |
line 107: hi def link javaScriptError^I^IError | |
line 108: hi def link javaScrParenError^I^IjavaScriptError | |
line 109: hi def link javaScriptNull^I^I^IKeyword | |
line 110: hi def link javaScriptBoolean^I^IBoolean | |
line 111: hi def link javaScriptRegexpString^I^IString | |
line 112: | |
line 113: hi def link javaScriptIdentifier^I^IIdentifier | |
line 114: hi def link javaScriptLabel^I^ILabel | |
line 115: hi def link javaScriptException^I^IException | |
line 116: hi def link javaScriptMessage^I^IKeyword | |
line 117: hi def link javaScriptGlobal^I^IKeyword | |
line 118: hi def link javaScriptMember^I^IKeyword | |
line 119: hi def link javaScriptDeprecated^I^IException | |
line 120: hi def link javaScriptReserved^I^IKeyword | |
line 121: hi def link javaScriptDebug^I^IDebug | |
line 122: hi def link javaScriptConstant^I^ILabel | |
line 123: hi def link javaScriptEmbed^I^ISpecial | |
line 124: | |
line 125: | |
line 126: | |
line 127: let b:current_syntax = "javascript" | |
line 128: if main_syntax == 'javascript' | |
line 129: unlet main_syntax | |
line 130: endif | |
line 131: let &cpo = s:cpo_save | |
line 132: unlet s:cpo_save | |
line 133: | |
line 134: " vim: ts=8 | |
finished sourcing /usr/share/vim/vim81/syntax/javascript.vim | |
continuing in /usr/share/vim/vim81/syntax/html.vim | |
Searching for "/usr/share/vim/vimfiles/after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/javascript.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/javascript.vim" | |
line 210: unlet b:current_syntax | |
line 211: syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc | |
line 212: syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent | |
line 213: hi def link htmlScriptTag htmlTag | |
line 214: | |
line 215: " html events (i.e. arguments that include javascript commands) | |
line 216: if exists("html_extended_events") | |
line 217: syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ | |
line 218: syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ | |
line 219: else | |
line 220: syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ | |
line 221: syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ | |
line 222: endif | |
line 223: syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript | |
line 224: syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript | |
line 225: hi def link htmlEventSQ htmlEvent | |
line 226: hi def link htmlEventDQ htmlEvent | |
line 227: | |
line 228: " a javascript expression is used as an arg value | |
line 229: syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc | |
line 230: endif | |
line 231: | |
line 232: if main_syntax != 'java' || exists("java_vb") | |
line 233: " VB SCRIPT | |
line 234: syn include @htmlVbScript syntax/vb.vim | |
Searching for "syntax/vb.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/vb.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/vb.vim" | |
Searching for "/usr/share/vim/vim81/syntax/vb.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 234: sourcing "/usr/share/vim/vim81/syntax/vb.vim" | |
line 1: " Vim syntax file | |
line 2: " Language:^IVisual Basic | |
line 3: " Maintainer:^ITim Chase <[email protected]> | |
line 4: " Former Maintainer:^IRobert M. Cortopassi <[email protected]> | |
line 5: "^I(tried multiple times to contact, but email bounced) | |
line 6: " Last Change: | |
line 7: " 2005 May 25 Synched with work by Thomas Barthel | |
line 8: " 2004 May 30 Added a few keywords | |
line 9: | |
line 10: " This was thrown together after seeing numerous requests on the | |
line 11: " VIM and VIM-DEV mailing lists. It is by no means complete. | |
line 12: " Send comments, suggestions and requests to the maintainer. | |
line 13: | |
line 14: " quit when a syntax file was already loaded | |
line 15: if exists("b:current_syntax") | |
line 16: ^Ifinish | |
line 17: endif | |
line 18: | |
line 19: " VB is case insensitive | |
line 20: syn case ignore | |
line 21: | |
line 22: syn keyword vbConditional If Then ElseIf Else Select Case | |
line 23: | |
line 24: syn keyword vbOperator AddressOf And ByRef ByVal Eqv Imp In | |
line 25: syn keyword vbOperator Is Like Mod Not Or To Xor | |
line 26: | |
line 27: syn match vbOperator "[()+.,\-/*=&]" | |
line 28: syn match vbOperator "[<>]=\=" | |
line 29: syn match vbOperator "<>" | |
line 30: syn match vbOperator "\s\+_$" | |
line 31: | |
line 32: syn keyword vbBoolean True False | |
line 33: syn keyword vbConst Null Nothing | |
line 34: | |
line 35: syn keyword vbRepeat Do For ForEach Loop Next | |
line 36: syn keyword vbRepeat Step To Until Wend While | |
line 37: | |
line 38: syn keyword vbEvents AccessKeyPress Activate ActiveRowChanged | |
line 39: syn keyword vbEvents AfterAddFile AfterChangeFileName AfterCloseFile | |
line 40: syn keyword vbEvents AfterColEdit AfterColUpdate AfterDelete | |
line 41: syn keyword vbEvents AfterInsert AfterLabelEdit AfterRemoveFile | |
line 42: syn keyword vbEvents AfterUpdate AfterWriteFile AmbientChanged | |
line 43: syn keyword vbEvents ApplyChanges Associate AsyncProgress | |
line 44: syn keyword vbEvents AsyncReadComplete AsyncReadProgress AxisActivated | |
line 45: syn keyword vbEvents AxisLabelActivated AxisLabelSelected | |
line 46: syn keyword vbEvents AxisLabelUpdated AxisSelected AxisTitleActivated | |
line 47: syn keyword vbEvents AxisTitleSelected AxisTitleUpdated AxisUpdated | |
line 48: syn keyword vbEvents BeforeClick BeforeColEdit BeforeColUpdate | |
line 49: syn keyword vbEvents BeforeConnect BeforeDelete BeforeInsert | |
line 50: syn keyword vbEvents BeforeLabelEdit BeforeLoadFile BeforeUpdate | |
line 51: syn keyword vbEvents BeginRequest BeginTrans ButtonClick | |
line 52: syn keyword vbEvents ButtonCompleted ButtonDropDown ButtonGotFocus | |
line 53: syn keyword vbEvents ButtonLostFocus CallbackKeyDown Change Changed | |
line 54: syn keyword vbEvents ChartActivated ChartSelected ChartUpdated Click | |
line 55: syn keyword vbEvents Close CloseQuery CloseUp ColEdit ColResize | |
line 56: syn keyword vbEvents Collapse ColumnClick CommitTrans Compare | |
line 57: syn keyword vbEvents ConfigChageCancelled ConfigChanged | |
line 58: syn keyword vbEvents ConfigChangedCancelled Connect ConnectionRequest | |
line 59: syn keyword vbEvents CurrentRecordChanged DECommandAdded | |
line 60: syn keyword vbEvents DECommandPropertyChanged DECommandRemoved | |
line 61: syn keyword vbEvents DEConnectionAdded DEConnectionPropertyChanged | |
line 62: syn keyword vbEvents DEConnectionRemoved DataArrival DataChanged | |
line 63: syn keyword vbEvents DataUpdated DateClicked DblClick Deactivate | |
line 64: syn keyword vbEvents DevModeChange DeviceArrival DeviceOtherEvent | |
line 65: syn keyword vbEvents DeviceQueryRemove DeviceQueryRemoveFailed | |
line 66: syn keyword vbEvents DeviceRemoveComplete DeviceRemovePending | |
line 67: syn keyword vbEvents Disconnect DisplayChanged Dissociate | |
line 68: syn keyword vbEvents DoGetNewFileName Done DonePainting DownClick | |
line 69: syn keyword vbEvents DragDrop DragOver DropDown EditProperty EditQuery | |
line 70: syn keyword vbEvents EndRequest EnterCell EnterFocus ExitFocus Expand | |
line 71: syn keyword vbEvents FontChanged FootnoteActivated FootnoteSelected | |
line 72: syn keyword vbEvents FootnoteUpdated Format FormatSize GotFocus | |
line 73: syn keyword vbEvents HeadClick HeightChanged Hide InfoMessage | |
line 74: syn keyword vbEvents IniProperties InitProperties Initialize | |
line 75: syn keyword vbEvents ItemActivated ItemAdded ItemCheck ItemClick | |
line 76: syn keyword vbEvents ItemReloaded ItemRemoved ItemRenamed | |
line 77: syn keyword vbEvents ItemSeletected KeyDown KeyPress KeyUp LeaveCell | |
line 78: syn keyword vbEvents LegendActivated LegendSelected LegendUpdated | |
line 79: syn keyword vbEvents LinkClose LinkError LinkExecute LinkNotify | |
line 80: syn keyword vbEvents LinkOpen Load LostFocus MouseDown MouseMove | |
line 81: syn keyword vbEvents MouseUp NodeCheck NodeClick OLECompleteDrag | |
line 82: syn keyword vbEvents OLEDragDrop OLEDragOver OLEGiveFeedback OLESetData | |
line 83: syn keyword vbEvents OLEStartDrag ObjectEvent ObjectMove OnAddNew | |
line 84: syn keyword vbEvents OnComm Paint PanelClick PanelDblClick PathChange | |
line 85: syn keyword vbEvents PatternChange PlotActivated PlotSelected | |
line 86: syn keyword vbEvents PlotUpdated PointActivated PointLabelActivated | |
line 87: syn keyword vbEvents PointLabelSelected PointLabelUpdated PointSelected | |
line 88: syn keyword vbEvents PointUpdated PowerQuerySuspend PowerResume | |
line 89: syn keyword vbEvents PowerStatusChanged PowerSuspend ProcessTag | |
line 90: syn keyword vbEvents ProcessingTimeout QueryChangeConfig QueryClose | |
line 91: syn keyword vbEvents QueryComplete QueryCompleted QueryTimeout | |
line 92: syn keyword vbEvents QueryUnload ReadProperties RepeatedControlLoaded | |
line 93: syn keyword vbEvents RepeatedControlUnloaded Reposition | |
line 94: syn keyword vbEvents RequestChangeFileName RequestWriteFile Resize | |
line 95: syn keyword vbEvents ResultsChanged RetainedProject RollbackTrans | |
line 96: syn keyword vbEvents RowColChange RowCurrencyChange RowResize | |
line 97: syn keyword vbEvents RowStatusChanged Scroll SelChange SelectionChanged | |
line 98: syn keyword vbEvents SendComplete SendProgress SeriesActivated | |
line 99: syn keyword vbEvents SeriesSelected SeriesUpdated SettingChanged Show | |
line 100: syn keyword vbEvents SplitChange Start StateChanged StatusUpdate | |
line 101: syn keyword vbEvents SysColorsChanged Terminate TimeChanged Timer | |
line 102: syn keyword vbEvents TitleActivated TitleSelected TitleUpdated | |
line 103: syn keyword vbEvents UnboundAddData UnboundDeleteRow | |
line 104: syn keyword vbEvents UnboundGetRelativeBookmark UnboundReadData | |
line 105: syn keyword vbEvents UnboundWriteData Unformat Unload UpClick Updated | |
line 106: syn keyword vbEvents UserEvent Validate ValidationError | |
line 107: syn keyword vbEvents VisibleRecordChanged WillAssociate WillChangeData | |
line 108: syn keyword vbEvents WillDissociate WillExecute WillUpdateRows | |
line 109: syn keyword vbEvents WriteProperties | |
line 110: | |
line 111: | |
line 112: syn keyword vbFunction Abs Array Asc AscB AscW Atn Avg BOF CBool CByte | |
line 113: syn keyword vbFunction CCur CDate CDbl CInt CLng CSng CStr CVDate CVErr | |
line 114: syn keyword vbFunction CVar CallByName Cdec Choose Chr ChrB ChrW Command | |
line 115: syn keyword vbFunction Cos Count CreateObject CurDir DDB Date DateAdd | |
line 116: syn keyword vbFunction DateDiff DatePart DateSerial DateValue Day Dir | |
line 117: syn keyword vbFunction DoEvents EOF Environ Error Exp FV FileAttr | |
line 118: syn keyword vbFunction FileDateTime FileLen FilterFix Fix Format | |
line 119: syn keyword vbFunction FormatCurrency FormatDateTime FormatNumber | |
line 120: syn keyword vbFunction FormatPercent FreeFile GetAllStrings GetAttr | |
line 121: syn keyword vbFunction GetAutoServerSettings GetObject GetSetting Hex | |
line 122: syn keyword vbFunction Hour IIf IMEStatus IPmt InStr Input InputB | |
line 123: syn keyword vbFunction InputBox InstrB Int IsArray IsDate IsEmpty IsError | |
line 124: syn keyword vbFunction IsMissing IsNull IsNumeric IsObject Join LBound | |
line 125: syn keyword vbFunction LCase LOF LTrim Left LeftB Len LenB LoadPicture | |
line 126: syn keyword vbFunction LoadResData LoadResPicture LoadResString Loc Log | |
line 127: syn keyword vbFunction MIRR Max Mid MidB Min Minute Month MonthName | |
line 128: syn keyword vbFunction MsgBox NPV NPer Now Oct PPmt PV Partition Pmt | |
line 129: syn keyword vbFunction QBColor RGB RTrim Rate Replace Right RightB Rnd | |
line 130: syn keyword vbFunction Round SLN SYD Second Seek Sgn Shell Sin Space Spc | |
line 131: syn keyword vbFunction Split Sqr StDev StDevP Str StrComp StrConv | |
line 132: syn keyword vbFunction StrReverse String Sum Switch Tab Tan Time | |
line 133: syn keyword vbFunction TimeSerial TimeValue Timer Trim TypeName UBound | |
line 134: syn keyword vbFunction UCase Val Var VarP VarType Weekday WeekdayName | |
line 135: syn keyword vbFunction Year | |
line 136: | |
line 137: syn keyword vbMethods AboutBox Accept Activate Add AddCustom AddFile | |
line 138: syn keyword vbMethods AddFromFile AddFromGuid AddFromString | |
line 139: syn keyword vbMethods AddFromTemplate AddItem AddNew AddToAddInToolbar | |
line 140: syn keyword vbMethods AddToolboxProgID Append AppendAppendChunk | |
line 141: syn keyword vbMethods AppendChunk Arrange Assert AsyncRead BatchUpdate | |
line 142: syn keyword vbMethods BeginQueryEdit BeginTrans Bind BuildPath | |
line 143: syn keyword vbMethods CanPropertyChange Cancel CancelAsyncRead | |
line 144: syn keyword vbMethods CancelBatch CancelUpdate CaptureImage CellText | |
line 145: syn keyword vbMethods CellValue Circle Clear ClearFields ClearSel | |
line 146: syn keyword vbMethods ClearSelCols ClearStructure Clone Close Cls | |
line 147: syn keyword vbMethods ColContaining CollapseAll ColumnSize CommitTrans | |
line 148: syn keyword vbMethods CompactDatabase Compose Connect Copy CopyFile | |
line 149: syn keyword vbMethods CopyFolder CopyQueryDef Count CreateDatabase | |
line 150: syn keyword vbMethods CreateDragImage CreateEmbed CreateField | |
line 151: syn keyword vbMethods CreateFolder CreateGroup CreateIndex CreateLink | |
line 152: syn keyword vbMethods CreatePreparedStatement CreatePropery CreateQuery | |
line 153: syn keyword vbMethods CreateQueryDef CreateRelation CreateTableDef | |
line 154: syn keyword vbMethods CreateTextFile CreateToolWindow CreateUser | |
line 155: syn keyword vbMethods CreateWorkspace Customize Cut Delete | |
line 156: syn keyword vbMethods DeleteColumnLabels DeleteColumns DeleteFile | |
line 157: syn keyword vbMethods DeleteFolder DeleteLines DeleteRowLabels | |
line 158: syn keyword vbMethods DeleteRows DeselectAll DesignerWindow DoVerb Drag | |
line 159: syn keyword vbMethods Draw DriveExists Edit EditCopy EditPaste EndDoc | |
line 160: syn keyword vbMethods EnsureVisible EstablishConnection Execute Exists | |
line 161: syn keyword vbMethods Expand Export ExportReport ExtractIcon Fetch | |
line 162: syn keyword vbMethods FetchVerbs FileExists Files FillCache Find | |
line 163: syn keyword vbMethods FindFirst FindItem FindLast FindNext FindPrevious | |
line 164: syn keyword vbMethods FolderExists Forward GetAbsolutePathName | |
line 165: syn keyword vbMethods GetBaseName GetBookmark GetChunk GetClipString | |
line 166: syn keyword vbMethods GetData GetDrive GetDriveName GetFile GetFileName | |
line 167: syn keyword vbMethods GetFirstVisible GetFolder GetFormat GetHeader | |
line 168: syn keyword vbMethods GetLineFromChar GetNumTicks GetParentFolderName | |
line 169: syn keyword vbMethods GetRows GetSelectedPart GetSelection | |
line 170: syn keyword vbMethods GetSpecialFolder GetTempName GetText | |
line 171: syn keyword vbMethods GetVisibleCount GoBack GoForward Hide HitTest | |
line 172: syn keyword vbMethods HoldFields Idle Import InitializeLabels Insert | |
line 173: syn keyword vbMethods InsertColumnLabels InsertColumns InsertFile | |
line 174: syn keyword vbMethods InsertLines InsertObjDlg InsertRowLabels | |
line 175: syn keyword vbMethods InsertRows Item Keys KillDoc Layout Line Lines | |
line 176: syn keyword vbMethods LinkExecute LinkPoke LinkRequest LinkSend Listen | |
line 177: syn keyword vbMethods LoadFile LoadResData LoadResPicture LoadResString | |
line 178: syn keyword vbMethods LogEvent MakeCompileFile MakeCompiledFile | |
line 179: syn keyword vbMethods MakeReplica MoreResults Move MoveData MoveFile | |
line 180: syn keyword vbMethods MoveFirst MoveFolder MoveLast MoveNext | |
line 181: syn keyword vbMethods MovePrevious NavigateTo NewPage NewPassword | |
line 182: syn keyword vbMethods NextRecordset OLEDrag OnAddinsUpdate OnConnection | |
line 183: syn keyword vbMethods OnDisconnection OnStartupComplete Open | |
line 184: syn keyword vbMethods OpenAsTextStream OpenConnection OpenDatabase | |
line 185: syn keyword vbMethods OpenQueryDef OpenRecordset OpenResultset OpenURL | |
line 186: syn keyword vbMethods Overlay PSet PaintPicture PastSpecialDlg Paste | |
line 187: syn keyword vbMethods PeekData Play Point PopulatePartial PopupMenu | |
line 188: syn keyword vbMethods Print PrintForm PrintReport PropertyChanged Quit | |
line 189: syn keyword vbMethods Raise RandomDataFill RandomFillColumns | |
line 190: syn keyword vbMethods RandomFillRows ReFill Read ReadAll ReadFromFile | |
line 191: syn keyword vbMethods ReadLine ReadProperty Rebind Refresh RefreshLink | |
line 192: syn keyword vbMethods RegisterDatabase ReleaseInstance Reload Remove | |
line 193: syn keyword vbMethods RemoveAddInFromToolbar RemoveAll RemoveItem Render | |
line 194: syn keyword vbMethods RepairDatabase ReplaceLine Reply ReplyAll Requery | |
line 195: syn keyword vbMethods ResetCustom ResetCustomLabel ResolveName | |
line 196: syn keyword vbMethods RestoreToolbar Resync Rollback RollbackTrans | |
line 197: syn keyword vbMethods RowBookmark RowContaining RowTop Save SaveAs | |
line 198: syn keyword vbMethods SaveFile SaveToFile SaveToOle1File SaveToolbar | |
line 199: syn keyword vbMethods Scale ScaleX ScaleY Scroll SelPrint SelectAll | |
line 200: syn keyword vbMethods SelectPart Send SendData Set SetAutoServerSettings | |
line 201: syn keyword vbMethods SetData SetFocus SetOption SetSelection SetSize | |
line 202: syn keyword vbMethods SetText SetViewport Show ShowColor ShowFont | |
line 203: syn keyword vbMethods ShowHelp ShowOpen ShowPrinter ShowSave | |
line 204: syn keyword vbMethods ShowWhatsThis SignOff SignOn Size Skip SkipLine | |
line 205: syn keyword vbMethods Span Split SplitContaining StartLabelEdit | |
line 206: syn keyword vbMethods StartLogging Stop Synchronize Tag TextHeight | |
line 207: syn keyword vbMethods TextWidth ToDefaults Trace TwipsToChartPart | |
line 208: syn keyword vbMethods TypeByChartType URLFor Update UpdateControls | |
line 209: syn keyword vbMethods UpdateRecord UpdateRow Upto ValidateControls Value | |
line 210: syn keyword vbMethods WhatsThisMode Write WriteBlankLines WriteLine | |
line 211: syn keyword vbMethods WriteProperty WriteTemplate ZOrder | |
line 212: syn keyword vbMethods rdoCreateEnvironment rdoRegisterDataSource | |
line 213: | |
line 214: syn keyword vbStatement Alias AppActivate As Base Beep Begin Call ChDir | |
line 215: syn keyword vbStatement ChDrive Close Const Date Declare DefBool DefByte | |
line 216: syn keyword vbStatement DefCur DefDate DefDbl DefDec DefInt DefLng DefObj | |
line 217: syn keyword vbStatement DefSng DefStr DefVar Deftype DeleteSetting Dim Do | |
line 218: syn keyword vbStatement Each ElseIf End Enum Erase Error Event Exit | |
line 219: syn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub | |
line 220: syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput | |
line 221: syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open | |
line 222: syn keyword vbStatement Option Preserve Private Property Public Put RSet | |
line 223: syn keyword vbStatement RaiseEvent Randomize ReDim Redim Reset Resume | |
line 224: syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys | |
line 225: syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time | |
line 226: syn keyword vbStatement Type Unload Unlock Until Wend While Width With | |
line 227: syn keyword vbStatement Write | |
line 228: | |
line 229: syn keyword vbKeyword As Binary ByRef ByVal Date Empty Error Friend Get | |
line 230: syn keyword vbKeyword Input Is Len Lock Me Mid New Nothing Null On | |
line 231: syn keyword vbKeyword Option Optional ParamArray Print Private Property | |
line 232: syn keyword vbKeyword Public PublicNotCreateable OnNewProcessSingleUse | |
line 233: syn keyword vbKeyword InSameProcessMultiUse GlobalMultiUse Resume Seek | |
line 234: syn keyword vbKeyword Set Static Step String Time WithEvents | |
line 235: | |
line 236: syn keyword vbTodo contained^ITODO | |
line 237: | |
line 238: "Datatypes | |
line 239: syn keyword vbTypes Boolean Byte Currency Date Decimal Double Empty | |
line 240: syn keyword vbTypes Integer Long Object Single String Variant | |
line 241: | |
line 242: "VB defined values | |
line 243: syn keyword vbDefine dbBigInt dbBinary dbBoolean dbByte dbChar | |
line 244: syn keyword vbDefine dbCurrency dbDate dbDecimal dbDouble dbFloat | |
line 245: syn keyword vbDefine dbGUID dbInteger dbLong dbLongBinary dbMemo | |
line 246: syn keyword vbDefine dbNumeric dbSingle dbText dbTime dbTimeStamp | |
line 247: syn keyword vbDefine dbVarBinary | |
line 248: | |
line 249: "VB defined values | |
line 250: syn keyword vbDefine vb3DDKShadow vb3DFace vb3DHighlight vb3DLight | |
line 251: syn keyword vbDefine vb3DShadow vbAbort vbAbortRetryIgnore | |
line 252: syn keyword vbDefine vbActiveBorder vbActiveTitleBar vbAlias | |
line 253: syn keyword vbDefine vbApplicationModal vbApplicationWorkspace | |
line 254: syn keyword vbDefine vbAppTaskManager vbAppWindows vbArchive vbArray | |
line 255: syn keyword vbDefine vbBack vbBinaryCompare vbBlack vbBlue vbBoolean | |
line 256: syn keyword vbDefine vbButtonFace vbButtonShadow vbButtonText vbByte | |
line 257: syn keyword vbDefine vbCalGreg vbCalHijri vbCancel vbCr vbCritical | |
line 258: syn keyword vbDefine vbCrLf vbCurrency vbCyan vbDatabaseCompare | |
line 259: syn keyword vbDefine vbDataObject vbDate vbDecimal vbDefaultButton1 | |
line 260: syn keyword vbDefine vbDefaultButton2 vbDefaultButton3 vbDefaultButton4 | |
line 261: syn keyword vbDefine vbDesktop vbDirectory vbDouble vbEmpty vbError | |
line 262: syn keyword vbDefine vbExclamation vbFirstFourDays vbFirstFullWeek | |
line 263: syn keyword vbDefine vbFirstJan1 vbFormCode vbFormControlMenu | |
line 264: syn keyword vbDefine vbFormFeed vbFormMDIForm vbFriday vbFromUnicode | |
line 265: syn keyword vbDefine vbGrayText vbGreen vbHidden vbHide vbHighlight | |
line 266: syn keyword vbDefine vbHighlightText vbHiragana vbIgnore vbIMEAlphaDbl | |
line 267: syn keyword vbDefine vbIMEAlphaSng vbIMEDisable vbIMEHiragana | |
line 268: syn keyword vbDefine vbIMEKatakanaDbl vbIMEKatakanaSng vbIMEModeAlpha | |
line 269: syn keyword vbDefine vbIMEModeAlphaFull vbIMEModeDisable | |
line 270: syn keyword vbDefine vbIMEModeHangul vbIMEModeHangulFull | |
line 271: syn keyword vbDefine vbIMEModeHiragana vbIMEModeKatakana | |
line 272: syn keyword vbDefine vbIMEModeKatakanaHalf vbIMEModeNoControl | |
line 273: syn keyword vbDefine vbIMEModeOff vbIMEModeOn vbIMENoOp vbIMEOff | |
line 274: syn keyword vbDefine vbIMEOn vbInactiveBorder vbInactiveCaptionText | |
line 275: syn keyword vbDefine vbInactiveTitleBar vbInfoBackground vbInformation | |
line 276: syn keyword vbDefine vbInfoText vbInteger vbKatakana vbKey0 vbKey1 | |
line 277: syn keyword vbDefine vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8 | |
line 278: syn keyword vbDefine vbKey9 vbKeyA vbKeyAdd vbKeyB vbKeyBack vbKeyC | |
line 279: syn keyword vbDefine vbKeyCancel vbKeyCapital vbKeyClear vbKeyControl | |
line 280: syn keyword vbDefine vbKeyD vbKeyDecimal vbKeyDelete vbKeyDivide | |
line 281: syn keyword vbDefine vbKeyDown vbKeyE vbKeyEnd vbKeyEscape vbKeyExecute | |
line 282: syn keyword vbDefine vbKeyF vbKeyF1 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13 | |
line 283: syn keyword vbDefine vbKeyF14 vbKeyF15 vbKeyF16 vbKeyF2 vbKeyF3 vbKeyF4 | |
line 284: syn keyword vbDefine vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyG | |
line 285: syn keyword vbDefine vbKeyH vbKeyHelp vbKeyHome vbKeyI vbKeyInsert | |
line 286: syn keyword vbDefine vbKeyJ vbKeyK vbKeyL vbKeyLButton vbKeyLeft vbKeyM | |
line 287: syn keyword vbDefine vbKeyMButton vbKeyMenu vbKeyMultiply vbKeyN | |
line 288: syn keyword vbDefine vbKeyNumlock vbKeyNumpad0 vbKeyNumpad1 | |
line 289: syn keyword vbDefine vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4 | |
line 290: syn keyword vbDefine vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7 | |
line 291: syn keyword vbDefine vbKeyNumpad8 vbKeyNumpad9 vbKeyO vbKeyP | |
line 292: syn keyword vbDefine vbKeyPageDown vbKeyPageUp vbKeyPause vbKeyPrint | |
line 293: syn keyword vbDefine vbKeyQ vbKeyR vbKeyRButton vbKeyReturn vbKeyRight | |
line 294: syn keyword vbDefine vbKeyS vbKeySelect vbKeySeparator vbKeyShift | |
line 295: syn keyword vbDefine vbKeySnapshot vbKeySpace vbKeySubtract vbKeyT | |
line 296: syn keyword vbDefine vbKeyTab vbKeyU vbKeyUp vbKeyV vbKeyW vbKeyX | |
line 297: syn keyword vbDefine vbKeyY vbKeyZ vbLf vbLong vbLowerCase vbMagenta | |
line 298: syn keyword vbDefine vbMaximizedFocus vbMenuBar vbMenuText | |
line 299: syn keyword vbDefine vbMinimizedFocus vbMinimizedNoFocus vbMonday | |
line 300: syn keyword vbDefine vbMsgBox vbMsgBoxHelpButton vbMsgBoxRight | |
line 301: syn keyword vbDefine vbMsgBoxRtlReading vbMsgBoxSetForeground | |
line 302: syn keyword vbDefine vbMsgBoxText vbNarrow vbNewLine vbNo vbNormal | |
line 303: syn keyword vbDefine vbNormalFocus vbNormalNoFocus vbNull vbNullChar | |
line 304: syn keyword vbDefine vbNullString vbObject vbObjectError vbOK | |
line 305: syn keyword vbDefine vbOKCancel vbOKOnly vbProperCase vbQuestion | |
line 306: syn keyword vbDefine vbReadOnly vbRed vbRetry vbRetryCancel vbSaturday | |
line 307: syn keyword vbDefine vbScrollBars vbSingle vbString vbSunday vbSystem | |
line 308: syn keyword vbDefine vbSystemModal vbTab vbTextCompare vbThursday | |
line 309: syn keyword vbDefine vbTitleBarText vbTuesday vbUnicode vbUpperCase | |
line 310: syn keyword vbDefine vbUseSystem vbUseSystemDayOfWeek vbVariant | |
line 311: syn keyword vbDefine vbVerticalTab vbVolume vbWednesday vbWhite vbWide | |
line 312: syn keyword vbDefine vbWindowBackground vbWindowFrame vbWindowText | |
line 313: syn keyword vbDefine vbYellow vbYes vbYesNo vbYesNoCancel | |
line 314: | |
line 315: "Numbers | |
line 316: "integer number, or floating point number without a dot. | |
line 317: syn match vbNumber "\<\d\+\>" | |
line 318: "floating point number, with dot | |
line 319: syn match vbNumber "\<\d\+\.\d*\>" | |
line 320: "floating point number, starting with a dot | |
line 321: syn match vbNumber "\.\d\+\>" | |
line 322: "syn match vbNumber^I^I"{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&" | |
line 323: "syn match vbNumber^I^I":[[:xdigit:]]\+" | |
line 324: "syn match vbNumber^I^I"[-+]\=\<\d\+\>" | |
line 325: syn match vbFloat^I^I"[-+]\=\<\d\+[eE][\-+]\=\d\+" | |
line 326: syn match vbFloat^I^I"[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\=" | |
line 327: syn match vbFloat^I^I"[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\=" | |
line 328: | |
line 329: " String and Character contstants | |
line 330: syn region vbString^I^Istart=+"+ end=+"\|$+ | |
line 331: syn region vbComment^I^Istart="\(^\|\s\)REM\s" end="$" contains=vbTodo | |
line 332: syn region vbComment^I^Istart="\(^\|\s\)\'" end="$" contains=vbTodo | |
line 333: syn match vbLineNumber^I"^\d\+\(\s\|$\)" | |
line 334: syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 | |
line 335: syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1 | |
line 336: | |
line 337: " Define the default highlighting. | |
line 338: " Only when an item doesn't have highlighting yet | |
line 339: | |
line 340: hi def link vbBoolean^I^IBoolean | |
line 341: hi def link vbLineNumber^I^IComment | |
line 342: hi def link vbComment^I^IComment | |
line 343: hi def link vbConditional^IConditional | |
line 344: hi def link vbConst^I^I^IConstant | |
line 345: hi def link vbDefine^I^I^IConstant | |
line 346: hi def link vbError^I^I^IError | |
line 347: hi def link vbFunction^I^IIdentifier | |
line 348: hi def link vbIdentifier^I^IIdentifier | |
line 349: hi def link vbNumber^I^I^INumber | |
line 350: hi def link vbFloat^I^I^IFloat | |
line 351: hi def link vbMethods^I^IPreProc | |
line 352: hi def link vbOperator^I^IOperator | |
line 353: hi def link vbRepeat^I^I^IRepeat | |
line 354: hi def link vbString^I^I^IString | |
line 355: hi def link vbStatement^I^IStatement | |
line 356: hi def link vbKeyword^I^IStatement | |
line 357: hi def link vbEvents^I^I^ISpecial | |
line 358: hi def link vbTodo^I^I^ITodo | |
line 359: hi def link vbTypes^I^I^IType | |
line 360: hi def link vbTypeSpecifier^IType | |
line 361: | |
line 362: | |
line 363: let b:current_syntax = "vb" | |
line 364: | |
line 365: " vim: ts=8 | |
finished sourcing /usr/share/vim/vim81/syntax/vb.vim | |
continuing in /usr/share/vim/vim81/syntax/html.vim | |
Searching for "/usr/share/vim/vimfiles/after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/vb.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/vb.vim" | |
line 235: unlet b:current_syntax | |
line 236: syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc | |
line 237: endif | |
line 238: | |
line 239: syn cluster htmlJavaScript add=@htmlPreproc | |
line 240: | |
line 241: if main_syntax != 'java' || exists("java_css") | |
line 242: " embedded style sheets | |
line 243: syn keyword htmlArg contained media | |
line 244: syn include @htmlCss syntax/css.vim | |
Searching for "syntax/css.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/syntax/css.vim" | |
Searching for "/usr/share/vim/vimfiles/syntax/css.vim" | |
Searching for "/usr/share/vim/vim81/syntax/css.vim" | |
chdir(/usr/share/vim/vim81/syntax) | |
fchdir() to previous dir | |
line 244: sourcing "/usr/share/vim/vim81/syntax/css.vim" | |
line 1: " Vim syntax file | |
line 2: " Language: Cascading Style Sheets | |
line 3: " Previous Contributor List: | |
line 4: " Claudio Fleiner <[email protected]> (Maintainer) | |
line 5: " Yeti (Add full CSS2, HTML4 support) | |
line 6: " Nikolai Weibull (Add CSS2 support) | |
line 7: " URL: https://github.com/JulesWang/css.vim | |
line 8: " Maintainer: Jules Wang <[email protected]> | |
line 9: " Last Change: 2018 Feb. 27 | |
line 10: " cssClassName updated by Ryuichi Hayashida Jan 2016 | |
line 11: | |
line 12: " quit when a syntax file was already loaded | |
line 13: if !exists("main_syntax") | |
line 14: if exists("b:current_syntax") | |
line 15: finish | |
line 16: endif | |
line 17: let main_syntax = 'css' | |
line 18: elseif exists("b:current_syntax") && b:current_syntax == "css" | |
line 19: finish | |
line 20: endif | |
line 21: | |
line 22: let s:cpo_save = &cpo | |
line 23: set cpo&vim | |
line 24: | |
line 25: syn case ignore | |
line 26: | |
line 27: " HTML4 tags | |
line 28: syn keyword cssTagName abbr address area a b base | |
line 29: syn keyword cssTagName bdo blockquote body br button | |
line 30: syn keyword cssTagName caption cite code col colgroup dd del | |
line 31: syn keyword cssTagName dfn div dl dt em fieldset form | |
line 32: syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i | |
line 33: syn keyword cssTagName iframe input ins isindex kbd label legend li | |
line 34: syn keyword cssTagName link map menu meta noscript ol optgroup | |
line 35: syn keyword cssTagName option p param pre q s samp script small | |
line 36: syn keyword cssTagName span strong sub sup tbody td | |
line 37: syn keyword cssTagName textarea tfoot th thead title tr ul u var | |
line 38: syn keyword cssTagName object svg | |
line 39: syn match cssTagName /\<select\>\|\<style\>\|\<table\>/ | |
line 40: | |
line 41: " 34 HTML5 tags | |
line 42: syn keyword cssTagName article aside audio bdi canvas command data | |
line 43: syn keyword cssTagName datalist details dialog embed figcaption figure footer | |
line 44: syn keyword cssTagName header hgroup keygen main mark menuitem meter nav | |
line 45: syn keyword cssTagName output progress rt rp ruby section | |
line 46: syn keyword cssTagName source summary time track video wbr | |
line 47: | |
line 48: " Tags not supported in HTML5 | |
line 49: " acronym applet basefont big center dir | |
line 50: " font frame frameset noframes strike tt | |
line 51: | |
line 52: syn match cssTagName "\*" | |
line 53: | |
line 54: " selectors | |
line 55: syn match cssSelectorOp "[,>+~]" | |
line 56: syn match cssSelectorOp2 "[~|^$*]\?=" contained | |
line 57: syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ | |
line 58: | |
line 59: " .class and #id | |
line 60: syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot | |
line 61: syn match cssClassNameDot contained '\.' | |
line 62: | |
line 63: try | |
line 64: syn match cssIdentifier "#[A-Za-z<c0>-<ff>_@][A-Za-z<c0>-<ff>0-9_@-]*" | |
line 65: catch /^.*/ | |
line 66: syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*" | |
line 67: endtry | |
line 68: | |
line 69: " digits | |
line 70: syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators | |
line 71: syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators | |
line 72: syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators | |
line 73: syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators | |
line 74: syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators | |
line 75: syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators | |
line 76: syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators | |
line 77: | |
line 78: " The 16 basic color names | |
line 79: syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow | |
line 80: | |
line 81: " 130 more color names | |
line 82: syn keyword cssColor contained aliceblue antiquewhite aquamarine azure | |
line 83: syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood | |
line 84: syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan | |
line 85: syn match cssColor contained /\<dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)\>/ | |
line 86: syn match cssColor contained /\<dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)\>/ | |
line 87: syn match cssColor contained /\<darkslate\(blue\|gray\|grey\)\>/ | |
line 88: syn match cssColor contained /\<dark\(turquoise\|violet\)\>/ | |
line 89: syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick | |
line 90: syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold | |
line 91: syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink | |
line 92: syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen | |
line 93: syn keyword cssColor contained lemonchiffon limegreen linen magenta | |
line 94: syn match cssColor contained /\<light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)\>/ | |
line 95: syn match cssColor contained /\<light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)\>/ | |
line 96: syn match cssColor contained /\<light\(slategray\|slategrey\|steelblue\)\>/ | |
line 97: syn match cssColor contained /\<medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)\>/ | |
line 98: syn match cssColor contained /\<medium\(slateblue\|springgreen\|turquoise\|violetred\)\>/ | |
line 99: syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite | |
line 100: syn keyword cssColor contained oldlace olivedrab orange orangered orchid | |
line 101: syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/ | |
line 102: syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue | |
line 103: syn keyword cssColor contained rosybrown royalblue rebeccapurple saddlebrown salmon | |
line 104: syn keyword cssColor contained sandybrown seagreen seashell sienna skyblue slateblue | |
line 105: syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan | |
line 106: syn keyword cssColor contained thistle tomato turquoise violet wheat | |
line 107: syn keyword cssColor contained whitesmoke yellowgreen | |
line 108: | |
line 109: " FIXME: These are actually case-insensitive too, but (a) specs recommend using | |
line 110: " mixed-case (b) it's hard to highlight the word `Background' correctly in | |
line 111: " all situations | |
line 112: syn case match | |
line 113: syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background | |
line 114: syn case ignore | |
line 115: | |
line 116: syn match cssImportant contained "!\s*important\>" | |
line 117: | |
line 118: syn match cssColor contained "\<transparent\>" | |
line 119: syn match cssColor contained "\<currentColor\>" | |
line 120: syn match cssColor contained "\<white\>" | |
line 121: syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators | |
line 122: syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators | |
line 123: syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators | |
line 124: | |
line 125: syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline | |
line 126: syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma | |
line 127: syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction | |
line 128: syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma | |
line 129: syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y\|Z\)\=\|translate\(3d\|X\|Y\|Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y\|Z\)\=\|perspective\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma | |
line 130: syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at | |
line 131: syn match cssFunctionComma contained "," | |
line 132: | |
line 133: " Common Prop and Attr | |
line 134: syn keyword cssCommonAttr contained auto none inherit all default normal | |
line 135: syn keyword cssCommonAttr contained top bottom center stretch hidden visible | |
line 136: "------------------------------------------------ | |
line 137: " CSS Animations | |
line 138: " http://www.w3.org/TR/css3-animations/ | |
line 139: syn match cssAnimationProp contained "\<animation\(-\(delay\|direction\|duration\|fill-mode\|name\|play-state\|timing-function\|iteration-count\)\)\=\>" | |
line 140: | |
line 141: " animation-direction attributes | |
line 142: syn keyword cssAnimationAttr contained alternate reverse | |
line 143: syn match cssAnimationAttr contained "\<alternate-reverse\>" | |
line 144: | |
line 145: " animation-fill-mode attributes | |
line 146: syn keyword cssAnimationAttr contained forwards backwards both | |
line 147: | |
line 148: " animation-play-state attributes | |
line 149: syn keyword cssAnimationAttr contained running paused | |
line 150: | |
line 151: " animation-iteration-count attributes | |
line 152: syn keyword cssAnimationAttr contained infinite | |
line 153: "------------------------------------------------ | |
line 154: " CSS Backgrounds and Borders Module Level 3 | |
line 155: " http://www.w3.org/TR/css3-background/ | |
line 156: syn match cssBackgroundProp contained "\<background\(-\(attachment\|clip\|color\|image\|origin\|position\|repeat\|size\)\)\=\>" | |
line 157: " background-attachment attributes | |
line 158: syn keyword cssBackgroundAttr contained scroll fixed local | |
line 159: | |
line 160: " background-position attributes | |
line 161: syn keyword cssBackgroundAttr contained left center right top bottom | |
line 162: | |
line 163: " background-repeat attributes | |
line 164: syn match cssBackgroundAttr contained "\<no-repeat\>" | |
line 165: syn match cssBackgroundAttr contained "\<repeat\(-[xy]\)\=\>" | |
line 166: | |
line 167: " background-size attributes | |
line 168: syn keyword cssBackgroundAttr contained cover contain | |
line 169: | |
line 170: syn match cssBorderProp contained "\<border\(-\(top\|right\|bottom\|left\)\)\=\(-\(width\|color\|style\)\)\=\>" | |
line 171: syn match cssBorderProp contained "\<border\(-\(top\|bottom\)-\(left\|right\)\)\=-radius\>" | |
line 172: syn match cssBorderProp contained "\<border-image\(-\(outset\|repeat\|slice\|source\|width\)\)\=\>" | |
line 173: syn match cssBorderProp contained "\<box-decoration-break\>" | |
line 174: syn match cssBorderProp contained "\<box-shadow\>" | |
line 175: | |
line 176: " border-image attributes | |
line 177: syn keyword cssBorderAttr contained stretch round fill | |
line 178: | |
line 179: " border-style attributes | |
line 180: syn keyword cssBorderAttr contained dotted dashed solid double groove ridge inset outset | |
line 181: | |
line 182: " border-width attributes | |
line 183: syn keyword cssBorderAttr contained thin thick medium | |
line 184: | |
line 185: " box-decoration-break attributes | |
line 186: syn keyword cssBorderAttr contained clone slice | |
line 187: "------------------------------------------------ | |
line 188: | |
line 189: syn match cssBoxProp contained "\<padding\(-\(top\|right\|bottom\|left\)\)\=\>" | |
line 190: syn match cssBoxProp contained "\<margin\(-\(top\|right\|bottom\|left\)\)\=\>" | |
line 191: syn match cssBoxProp contained "\<overflow\(-\(x\|y\|style\)\)\=\>" | |
line 192: syn match cssBoxProp contained "\<rotation\(-point\)\=\>" | |
line 193: syn keyword cssBoxAttr contained visible hidden scroll auto | |
line 194: syn match cssBoxAttr contained "\<no-\(display\|content\)\>" | |
line 195: | |
line 196: syn keyword cssColorProp contained opacity | |
line 197: syn match cssColorProp contained "\<color-profile\>" | |
line 198: syn match cssColorProp contained "\<rendering-intent\>" | |
line 199: | |
line 200: | |
line 201: syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>" | |
line 202: syn keyword cssDimensionProp contained height | |
line 203: syn keyword cssDimensionProp contained width | |
line 204: | |
line 205: " CSS Flexible Box Layout Module Level 1 | |
line 206: " http://www.w3.org/TR/css3-flexbox/ | |
line 207: " CSS Box Alignment Module Level 3 | |
line 208: " http://www.w3.org/TR/css-align-3/ | |
line 209: syn match cssFlexibleBoxProp contained "\<flex\(-\(direction\|wrap\|flow\|grow\|shrink\|basis\)\)\=\>" | |
line 210: syn match cssFlexibleBoxProp contained "\<\(align\|justify\)\(-\(items\|self\|content\)\)\=\>" | |
line 211: syn keyword cssFlexibleBoxProp contained order | |
line 212: | |
line 213: syn match cssFlexibleBoxAttr contained "\<\(row\|column\|wrap\)\(-reverse\)\=\>" | |
line 214: syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center | |
line 215: syn match cssFlexibleBoxAttr contained "\<flex\(-\(start\|end\)\)\=\>" | |
line 216: syn match cssFlexibleBoxAttr contained "\<space\(-\(between\|around\)\)\=\>" | |
line 217: | |
line 218: " CSS Fonts Module Level 3 | |
line 219: " http://www.w3.org/TR/css-fonts-3/ | |
line 220: syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>" | |
line 221: | |
line 222: " font attributes | |
line 223: syn keyword cssFontAttr contained icon menu caption | |
line 224: syn match cssFontAttr contained "\<message-box\>" | |
line 225: syn match cssFontAttr contained "\<status-bar\>" | |
line 226: syn keyword cssFontAttr contained larger smaller | |
line 227: syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" | |
line 228: syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" | |
line 229: " font-family attributes | |
line 230: syn match cssFontAttr contained "\<\(sans-\)\=serif\>" | |
line 231: syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf | |
line 232: syn keyword cssFontAttr contained cursive fantasy monospace | |
line 233: " font-feature-settings attributes | |
line 234: syn keyword cssFontAttr contained on off | |
line 235: " font-stretch attributes | |
line 236: syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" | |
line 237: " font-style attributes | |
line 238: syn keyword cssFontAttr contained italic oblique | |
line 239: " font-synthesis attributes | |
line 240: syn keyword cssFontAttr contained weight style | |
line 241: " font-weight attributes | |
line 242: syn keyword cssFontAttr contained bold bolder lighter | |
line 243: " TODO: font-variant-* attributes | |
line 244: "------------------------------------------------ | |
line 245: | |
line 246: " Webkit specific property/attributes | |
line 247: syn match cssFontProp contained "\<font-smooth\>" | |
line 248: syn match cssFontAttr contained "\<\(subpixel-\)\=\antialiased\>" | |
line 249: | |
line 250: | |
line 251: " CSS Multi-column Layout Module | |
line 252: " http://www.w3.org/TR/css3-multicol/ | |
line 253: syn match cssMultiColumnProp contained "\<break-\(after\|before\|inside\)\>" | |
line 254: syn match cssMultiColumnProp contained "\<column-\(count\|fill\|gap\|rule\(-\(color\|style\|width\)\)\=\|span\|width\)\>" | |
line 255: syn keyword cssMultiColumnProp contained columns | |
line 256: syn keyword cssMultiColumnAttr contained balance medium | |
line 257: syn keyword cssMultiColumnAttr contained always left right page column | |
line 258: syn match cssMultiColumnAttr contained "\<avoid\(-\(page\|column\)\)\=\>" | |
line 259: | |
line 260: " http://www.w3.org/TR/css3-break/#page-break | |
line 261: syn match cssMultiColumnProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>" | |
line 262: | |
line 263: " http://www.w3.org/TR/SVG11/interact.html | |
line 264: syn match cssInteractProp contained "\<pointer-events\>" | |
line 265: syn match cssInteractAttr contained "\<\(visible\)\=\(Painted\|Fill\|Stroke\)\=\>" | |
line 266: | |
line 267: " TODO find following items in w3c docs. | |
line 268: syn keyword cssGeneratedContentProp contained quotes crop | |
line 269: syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>" | |
line 270: syn match cssGeneratedContentProp contained "\<move-to\>" | |
line 271: syn match cssGeneratedContentProp contained "\<page-policy\>" | |
line 272: syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" | |
line 273: | |
line 274: " https://www.w3.org/TR/css-grid-1/ | |
line 275: syn match cssGridProp contained "\<grid\>" | |
line 276: syn match cssGridProp contained "\<grid\(-\(template\|auto\)\)\=\(-\(columns\|rows\|areas\)\)\>" | |
line 277: syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" | |
line 278: syn match cssGridProp contained "\<grid-\(area\|gap\)\>" | |
line 279: syn match cssGridProp contained "\<grid-auto-flow\>" | |
line 280: | |
line 281: syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>" | |
line 282: | |
line 283: syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>" | |
line 284: syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" | |
line 285: syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" | |
line 286: syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" | |
line 287: syn keyword cssListAttr contained disc circle square hebrew armenian georgian | |
line 288: syn keyword cssListAttr contained inside outside | |
line 289: | |
line 290: syn keyword cssPositioningProp contained bottom clear clip display float left | |
line 291: syn keyword cssPositioningProp contained position right top visibility | |
line 292: syn match cssPositioningProp contained "\<z-index\>" | |
line 293: syn keyword cssPositioningAttr contained block compact grid | |
line 294: syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" | |
line 295: syn keyword cssPositioningAttr contained left right both | |
line 296: syn match cssPositioningAttr contained "\<list-item\>" | |
line 297: syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>" | |
line 298: syn keyword cssPositioningAttr contained static relative absolute fixed subgrid | |
line 299: | |
line 300: syn keyword cssPrintAttr contained landscape portrait crop cross always | |
line 301: | |
line 302: syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" | |
line 303: syn keyword cssTableAttr contained fixed collapse separate show hide once always | |
line 304: | |
line 305: | |
line 306: syn keyword cssTextProp contained color direction | |
line 307: syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" | |
line 308: syn match cssTextProp contained "\<text-\(justify\|outline\|warp\|align-last\|size-adjust\|rendering\|stroke\|indent\)\>" | |
line 309: syn match cssTextProp contained "\<word-\(break\|\wrap\)\>" | |
line 310: syn match cssTextProp contained "\<white-space\>" | |
line 311: syn match cssTextProp contained "\<hanging-punctuation\>" | |
line 312: syn match cssTextProp contained "\<punctuation-trim\>" | |
line 313: syn match cssTextAttr contained "\<line-through\>" | |
line 314: syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" | |
line 315: syn keyword cssTextAttr contained ltr rtl embed nowrap | |
line 316: syn keyword cssTextAttr contained underline overline blink sub super middle | |
line 317: syn keyword cssTextAttr contained capitalize uppercase lowercase | |
line 318: syn keyword cssTextAttr contained justify baseline sub super | |
line 319: syn keyword cssTextAttr contained optimizeLegibility optimizeSpeed | |
line 320: syn match cssTextAttr contained "\<pre\(-\(line\|wrap\)\)\=\>" | |
line 321: syn match cssTextAttr contained "\<\(allow\|force\)-end\>" | |
line 322: syn keyword cssTextAttr contained start end adjacent | |
line 323: syn match cssTextAttr contained "\<inter-\(word\|ideographic\|cluster\)\>" | |
line 324: syn keyword cssTextAttr contained distribute kashida first last | |
line 325: syn keyword cssTextAttr contained clip ellipsis unrestricted suppress | |
line 326: syn match cssTextAttr contained "\<break-all\>" | |
line 327: syn match cssTextAttr contained "\<break-word\>" | |
line 328: syn keyword cssTextAttr contained hyphenate | |
line 329: syn match cssTextAttr contained "\<bidi-override\>" | |
line 330: | |
line 331: syn match cssTransformProp contained "\<transform\(-\(origin\|style\)\)\=\>" | |
line 332: syn match cssTransformProp contained "\<perspective\(-origin\)\=\>" | |
line 333: syn match cssTransformProp contained "\<backface-visibility\>" | |
line 334: | |
line 335: " CSS Transitions | |
line 336: " http://www.w3.org/TR/css3-transitions/ | |
line 337: syn match cssTransitionProp contained "\<transition\(-\(delay\|duration\|property\|timing-function\)\)\=\>" | |
line 338: | |
line 339: " transition-time-function attributes | |
line 340: syn match cssTransitionAttr contained "\<linear\(-gradient\)\@!\>" | |
line 341: syn match cssTransitionAttr contained "\<ease\(-\(in-out\|out\|in\)\)\=\>" | |
line 342: syn match cssTransitionAttr contained "\<step\(-start\|-end\)\=\>" | |
line 343: "------------------------------------------------ | |
line 344: " CSS Basic User Interface Module Level 3 (CSS3 UI) | |
line 345: " http://www.w3.org/TR/css3-ui/ | |
line 346: syn match cssUIProp contained "\<box-sizing\>" | |
line 347: syn match cssUIAttr contained "\<\(content\|padding\|border\)\(-box\)\=\>" | |
line 348: | |
line 349: syn keyword cssUIProp contained cursor | |
line 350: syn match cssUIAttr contained "\<\(\([ns]\=[ew]\=\)\|col\|row\|nesw\|nwse\)-resize\>" | |
line 351: syn keyword cssUIAttr contained crosshair help move pointer alias copy | |
line 352: syn keyword cssUIAttr contained progress wait text cell move | |
line 353: syn match cssUIAttr contained "\<context-menu\>" | |
line 354: syn match cssUIAttr contained "\<no-drop\>" | |
line 355: syn match cssUIAttr contained "\<not-allowed\>" | |
line 356: syn match cssUIAttr contained "\<all-scroll\>" | |
line 357: syn match cssUIAttr contained "\<\(vertical-\)\=text\>" | |
line 358: syn match cssUIAttr contained "\<zoom\(-in\|-out\)\=\>" | |
line 359: | |
line 360: syn match cssUIProp contained "\<ime-mode\>" | |
line 361: syn keyword cssUIAttr contained active inactive disabled | |
line 362: | |
line 363: syn match cssUIProp contained "\<nav-\(down\|index\|left\|right\|up\)\=\>" | |
line 364: syn match cssUIProp contained "\<outline\(-\(width\|style\|color\|offset\)\)\=\>" | |
line 365: syn keyword cssUIAttr contained invert | |
line 366: | |
line 367: syn keyword cssUIProp contained icon resize | |
line 368: syn keyword cssUIAttr contained both horizontal vertical | |
line 369: | |
line 370: syn match cssUIProp contained "\<text-overflow\>" | |
line 371: syn keyword cssUIAttr contained clip ellipsis | |
line 372: | |
line 373: syn match cssUIProp contained "\<image-rendering\>" | |
line 374: syn keyword cssUIAttr contained pixellated | |
line 375: syn match cssUIAttr contained "\<crisp-edges\>" | |
line 376: | |
line 377: "------------------------------------------------ | |
line 378: " Webkit/iOS specific attributes | |
line 379: syn match cssUIAttr contained '\<preserve-3d\>' | |
line 380: " IE specific attributes | |
line 381: syn match cssIEUIAttr contained '\<bicubic\>' | |
line 382: | |
line 383: " Webkit/iOS specific properties | |
line 384: syn match cssUIProp contained '\<tap-highlight-color\|user-select\|touch-callout\>' | |
line 385: " IE specific properties | |
line 386: syn match cssIEUIProp contained '\<interpolation-mode\|zoom\|filter\>' | |
line 387: | |
line 388: " Webkit/Firebox specific properties/attributes | |
line 389: syn keyword cssUIProp contained appearance | |
line 390: syn keyword cssUIAttr contained window button field icon document menu | |
line 391: | |
line 392: | |
line 393: syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>" | |
line 394: syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numeral\|header\)\)\=\)\>" | |
line 395: syn keyword cssAuralProp contained volume during azimuth elevation stress richness | |
line 396: syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>" | |
line 397: syn keyword cssAuralAttr contained silent | |
line 398: syn match cssAuralAttr contained "\<spell-out\>" | |
line 399: syn keyword cssAuralAttr contained non mix | |
line 400: syn match cssAuralAttr contained "\<\(left\|right\)-side\>" | |
line 401: syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>" | |
line 402: syn keyword cssAuralAttr contained leftwards rightwards behind | |
line 403: syn keyword cssAuralAttr contained below level above lower higher | |
line 404: syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\|low\|high\)\>" | |
line 405: syn keyword cssAuralAttr contained faster slower | |
line 406: syn keyword cssAuralAttr contained male female child code digits continuous | |
line 407: | |
line 408: " mobile text | |
line 409: syn match cssMobileTextProp contained "\<text-size-adjust\>" | |
line 410: | |
line 411: syn keyword cssMediaProp contained width height orientation scan grid | |
line 412: syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/ | |
line 413: syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/ | |
line 414: syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/ | |
line 415: syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/ | |
line 416: syn keyword cssMediaAttr contained portrait landscape progressive interlace | |
line 417: syn match cssKeyFrameProp /\d*%\|from\|to/ contained nextgroup=cssDefinition | |
line 418: syn match cssPageMarginProp /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition | |
line 419: syn keyword cssPageProp contained content size | |
line 420: syn keyword cssPageProp contained orphans widows | |
line 421: syn keyword cssFontDescriptorProp contained src | |
line 422: syn match cssFontDescriptorProp contained "\<unicode-range\>" | |
line 423: " unicode-range attributes | |
line 424: syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" | |
line 425: syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" | |
line 426: | |
line 427: syn match cssBraces contained "[{}]" | |
line 428: syn match cssError contained "{@<>" | |
line 429: syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssAttributeSelector,cssClassName,cssIdentifier,cssAtRule,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold | |
line 430: syn match cssBraceError "}" | |
line 431: syn match cssAttrComma "," | |
line 432: | |
line 433: " Pseudo class | |
line 434: " http://www.w3.org/TR/css3-selectors/ | |
line 435: syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn | |
line 436: syn keyword cssPseudoClassId contained link visited active hover before after left right | |
line 437: syn keyword cssPseudoClassId contained root empty target enable disabled checked invalid | |
line 438: syn match cssPseudoClassId contained "\<first-\(line\|letter\)\>" | |
line 439: syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>" | |
line 440: syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" | |
line 441: " ------------------------------------ | |
line 442: " Vendor specific properties | |
line 443: syn match cssPseudoClassId contained "\<selection\>" | |
line 444: syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>" | |
line 445: syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>" | |
line 446: | |
line 447: " Misc highlight groups | |
line 448: syntax match cssUnitDecorators /\(#\|-\|+\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained | |
line 449: syntax match cssNoise contained /\(:\|;\|\/\)/ | |
line 450: | |
line 451: " Comment | |
line 452: syn region cssComment start="/\*" end="\*/" contains=@Spell fold | |
line 453: | |
line 454: syn match cssUnicodeEscape "\\\x\{1,6}\s\?" | |
line 455: syn match cssSpecialCharQQ +\\\\\|\\"+ contained | |
line 456: syn match cssSpecialCharQ +\\\\\|\\'+ contained | |
line 457: syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ | |
line 458: syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ | |
line 459: | |
line 460: " Vendor Prefix | |
line 461: syn match cssVendor contained "-\(webkit\|moz\|o\|ms\)-" | |
line 462: | |
line 463: " Various CSS Hack characters | |
line 464: " In earlier versions of IE (6 and 7), one can prefix property names | |
line 465: " with a _ or * to isolate those definitions to particular versions of IE | |
line 466: " This is purely decorative and therefore we assign to the same highlight | |
line 467: " group to cssVendor, for more information: | |
line 468: " http://www.paulirish.com/2009/browser-specific-css-hacks/ | |
line 469: syn match cssHacks contained /\(_\|*\)/ | |
line 470: | |
line 471: " Attr Enhance | |
line 472: " Some keywords are both Prop and Attr, so we have to handle them | |
line 473: syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise | |
line 474: | |
line 475: " Hack for transition | |
line 476: " 'transition' has Props after ':'. | |
line 477: syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise | |
line 478: | |
line 479: syn match cssAtKeyword /@\(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/ contained | |
line 480: | |
line 481: syn keyword cssAtRuleLogical only not and contained | |
line 482: | |
line 483: " @media | |
line 484: " Reference: http://www.w3.org/TR/css3-mediaqueries/ | |
line 485: syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment nextgroup=cssDefinition | |
line 486: syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained | |
line 487: | |
line 488: " @page | |
line 489: " http://www.w3.org/TR/css3-page/ | |
line 490: syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition | |
line 491: syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl | |
line 492: " @keyframe | |
line 493: " http://www.w3.org/TR/css3-animations/#keyframes | |
line 494: syn region cssAtRule start=/@\(-[a-z]\+-\)\=keyframes\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssVendor,cssComment nextgroup=cssDefinition | |
line 495: | |
line 496: syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType | |
line 497: syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword | |
line 498: syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword | |
line 499: | |
line 500: " @font-face | |
line 501: " http://www.w3.org/TR/css3-fonts/#at-font-face-rule | |
line 502: syn match cssAtRule "@font-face\>" nextgroup=cssFontDescriptorBlock | |
line 503: " @supports | |
line 504: " https://www.w3.org/TR/css3-conditional/#at-supports | |
line 505: syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition | |
line 506: | |
line 507: | |
line 508: if main_syntax == "css" | |
line 509: syn sync minlines=10 | |
line 510: endif | |
line 511: | |
line 512: " Define the default highlighting. | |
line 513: " Only when an item doesn't have highlighting yet | |
line 514: | |
line 515: hi def link cssComment Comment | |
line 516: hi def link cssVendor Comment | |
line 517: hi def link cssHacks Comment | |
line 518: hi def link cssTagName Statement | |
line 519: hi def link cssDeprecated Error | |
line 520: hi def link cssSelectorOp Special | |
line 521: hi def link cssSelectorOp2 Special | |
line 522: hi def link cssAttrComma Special | |
line 523: | |
line 524: hi def link cssAnimationProp cssProp | |
line 525: hi def link cssBackgroundProp cssProp | |
line 526: hi def link cssBorderProp cssProp | |
line 527: hi def link cssBoxProp cssProp | |
line 528: hi def link cssColorProp cssProp | |
line 529: hi def link cssContentForPagedMediaProp cssProp | |
line 530: hi def link cssDimensionProp cssProp | |
line 531: hi def link cssFlexibleBoxProp cssProp | |
line 532: hi def link cssFontProp cssProp | |
line 533: hi def link cssGeneratedContentProp cssProp | |
line 534: hi def link cssGridProp cssProp | |
line 535: hi def link cssHyerlinkProp cssProp | |
line 536: hi def link cssInteractProp cssProp | |
line 537: hi def link cssLineboxProp cssProp | |
line 538: hi def link cssListProp cssProp | |
line 539: hi def link cssMarqueeProp cssProp | |
line 540: hi def link cssMultiColumnProp cssProp | |
line 541: hi def link cssPagedMediaProp cssProp | |
line 542: hi def link cssPositioningProp cssProp | |
line 543: hi def link cssPrintProp cssProp | |
line 544: hi def link cssRubyProp cssProp | |
line 545: hi def link cssSpeechProp cssProp | |
line 546: hi def link cssTableProp cssProp | |
line 547: hi def link cssTextProp cssProp | |
line 548: hi def link cssTransformProp cssProp | |
line 549: hi def link cssTransitionProp cssProp | |
line 550: hi def link cssUIProp cssProp | |
line 551: hi def link cssIEUIProp cssProp | |
line 552: hi def link cssAuralProp cssProp | |
line 553: hi def link cssRenderProp cssProp | |
line 554: hi def link cssMobileTextProp cssProp | |
line 555: | |
line 556: hi def link cssAnimationAttr cssAttr | |
line 557: hi def link cssBackgroundAttr cssAttr | |
line 558: hi def link cssBorderAttr cssAttr | |
line 559: hi def link cssBoxAttr cssAttr | |
line 560: hi def link cssContentForPagedMediaAttr cssAttr | |
line 561: hi def link cssDimensionAttr cssAttr | |
line 562: hi def link cssFlexibleBoxAttr cssAttr | |
line 563: hi def link cssFontAttr cssAttr | |
line 564: hi def link cssGeneratedContentAttr cssAttr | |
line 565: hi def link cssGridAttr cssAttr | |
line 566: hi def link cssHyerlinkAttr cssAttr | |
line 567: hi def link cssInteractAttr cssAttr | |
line 568: hi def link cssLineboxAttr cssAttr | |
line 569: hi def link cssListAttr cssAttr | |
line 570: hi def link cssMarginAttr cssAttr | |
line 571: hi def link cssMarqueeAttr cssAttr | |
line 572: hi def link cssMultiColumnAttr cssAttr | |
line 573: hi def link cssPaddingAttr cssAttr | |
line 574: hi def link cssPagedMediaAttr cssAttr | |
line 575: hi def link cssPositioningAttr cssAttr | |
line 576: hi def link cssGradientAttr cssAttr | |
line 577: hi def link cssPrintAttr cssAttr | |
line 578: hi def link cssRubyAttr cssAttr | |
line 579: hi def link cssSpeechAttr cssAttr | |
line 580: hi def link cssTableAttr cssAttr | |
line 581: hi def link cssTextAttr cssAttr | |
line 582: hi def link cssTransformAttr cssAttr | |
line 583: hi def link cssTransitionAttr cssAttr | |
line 584: hi def link cssUIAttr cssAttr | |
line 585: hi def link cssIEUIAttr cssAttr | |
line 586: hi def link cssAuralAttr cssAttr | |
line 587: hi def link cssRenderAttr cssAttr | |
line 588: hi def link cssCommonAttr cssAttr | |
line 589: | |
line 590: hi def link cssPseudoClassId PreProc | |
line 591: hi def link cssPseudoClassLang Constant | |
line 592: hi def link cssValueLength Number | |
line 593: hi def link cssValueInteger Number | |
line 594: hi def link cssValueNumber Number | |
line 595: hi def link cssValueAngle Number | |
line 596: hi def link cssValueTime Number | |
line 597: hi def link cssValueFrequency Number | |
line 598: hi def link cssFunction Constant | |
line 599: hi def link cssURL String | |
line 600: hi def link cssFunctionName Function | |
line 601: hi def link cssFunctionComma Function | |
line 602: hi def link cssColor Constant | |
line 603: hi def link cssIdentifier Function | |
line 604: hi def link cssAtRule Include | |
line 605: hi def link cssAtKeyword PreProc | |
line 606: hi def link cssImportant Special | |
line 607: hi def link cssBraces Function | |
line 608: hi def link cssBraceError Error | |
line 609: hi def link cssError Error | |
line 610: hi def link cssUnicodeEscape Special | |
line 611: hi def link cssStringQQ String | |
line 612: hi def link cssStringQ String | |
line 613: hi def link cssAttributeSelector String | |
line 614: hi def link cssMediaType Special | |
line 615: hi def link cssMediaComma Normal | |
line 616: hi def link cssAtRuleLogical Statement | |
line 617: hi def link cssMediaProp cssProp | |
line 618: hi def link cssMediaAttr cssAttr | |
line 619: hi def link cssPagePseudo PreProc | |
line 620: hi def link cssPageMarginProp cssAtKeyword | |
line 621: hi def link cssPageProp cssProp | |
line 622: hi def link cssKeyFrameProp Constant | |
line 623: hi def link cssFontDescriptor Special | |
line 624: hi def link cssFontDescriptorProp cssProp | |
line 625: hi def link cssFontDescriptorAttr cssAttr | |
line 626: hi def link cssUnicodeRange Constant | |
line 627: hi def link cssClassName Function | |
line 628: hi def link cssClassNameDot Function | |
line 629: hi def link cssProp StorageClass | |
line 630: hi def link cssAttr Constant | |
line 631: hi def link cssUnitDecorators Number | |
line 632: hi def link cssNoise Noise | |
line 633: | |
line 634: let b:current_syntax = "css" | |
line 635: | |
line 636: if main_syntax == 'css' | |
line 637: unlet main_syntax | |
line 638: endif | |
line 639: | |
line 640: let &cpo = s:cpo_save | |
line 641: unlet s:cpo_save | |
line 642: " vim: ts=8 | |
line 643: | |
finished sourcing /usr/share/vim/vim81/syntax/css.vim | |
continuing in /usr/share/vim/vim81/syntax/html.vim | |
Searching for "/usr/share/vim/vimfiles/after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/css.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/css.vim" | |
line 245: unlet b:current_syntax | |
line 246: syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc | |
line 247: syn match htmlCssStyleComment contained "\(<!--\|-->\)" | |
line 248: syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc | |
line 249: hi def link htmlStyleArg htmlString | |
line 250: endif | |
line 251: | |
line 252: if main_syntax == "html" | |
line 253: " synchronizing (does not always work if a comment includes legal | |
line 254: " html tags, but doing it right would mean to always start | |
line 255: " at the first line, which is too slow) | |
line 256: syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]" | |
line 257: syn sync match htmlHighlight groupthere javaScript "<script" | |
line 258: syn sync match htmlHighlightSkip "^.*['\"].*$" | |
line 259: syn sync minlines=10 | |
line 260: endif | |
line 261: | |
line 262: " The default highlighting. | |
line 263: hi def link htmlTag Function | |
line 264: hi def link htmlEndTag Identifier | |
line 265: hi def link htmlArg Type | |
line 266: hi def link htmlTagName htmlStatement | |
line 267: hi def link htmlSpecialTagName Exception | |
line 268: hi def link htmlValue String | |
line 269: hi def link htmlSpecialChar Special | |
line 270: | |
line 271: if !exists("html_no_rendering") | |
line 272: hi def link htmlH1 Title | |
line 273: hi def link htmlH2 htmlH1 | |
line 274: hi def link htmlH3 htmlH2 | |
line 275: hi def link htmlH4 htmlH3 | |
line 276: hi def link htmlH5 htmlH4 | |
line 277: hi def link htmlH6 htmlH5 | |
line 278: hi def link htmlHead PreProc | |
line 279: hi def link htmlTitle Title | |
line 280: hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic | |
line 281: hi def link htmlUnderlineBold htmlBoldUnderline | |
line 282: hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic | |
line 283: hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic | |
line 284: hi def link htmlItalicUnderline htmlUnderlineItalic | |
line 285: hi def link htmlItalicBold htmlBoldItalic | |
line 286: hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic | |
line 287: hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic | |
line 288: hi def link htmlLink Underlined | |
line 289: hi def link htmlLeadingSpace None | |
line 290: if !exists("html_my_rendering") | |
line 291: hi def htmlBold term=bold cterm=bold gui=bold | |
line 292: hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline | |
line 293: hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic | |
line 294: hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline | |
line 295: hi def htmlUnderline term=underline cterm=underline gui=underline | |
line 296: hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline | |
line 297: hi def htmlItalic term=italic cterm=italic gui=italic | |
line 298: if v:version > 800 || v:version == 800 && has("patch1038") | |
line 299: hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough | |
line 300: else | |
line 301: hi def htmlStrike term=underline cterm=underline gui=underline | |
line 302: endif | |
line 303: endif | |
line 304: endif | |
line 305: | |
line 306: hi def link htmlPreStmt PreProc | |
line 307: hi def link htmlPreError Error | |
line 308: hi def link htmlPreProc PreProc | |
line 309: hi def link htmlPreAttr String | |
line 310: hi def link htmlPreProcAttrName PreProc | |
line 311: hi def link htmlPreProcAttrError Error | |
line 312: hi def link htmlSpecial Special | |
line 313: hi def link htmlSpecialChar Special | |
line 314: hi def link htmlString String | |
line 315: hi def link htmlStatement Statement | |
line 316: hi def link htmlComment Comment | |
line 317: hi def link htmlCommentPart Comment | |
line 318: hi def link htmlValue String | |
line 319: hi def link htmlCommentError htmlError | |
line 320: hi def link htmlTagError htmlError | |
line 321: hi def link htmlEvent javaScript | |
line 322: hi def link htmlError Error | |
line 323: | |
line 324: hi def link javaScript Special | |
line 325: hi def link javaScriptExpression javaScript | |
line 326: hi def link htmlCssStyleComment Comment | |
line 327: hi def link htmlCssDefinition Special | |
line 328: | |
line 329: let b:current_syntax = "html" | |
line 330: | |
line 331: if main_syntax == 'html' | |
line 332: unlet main_syntax | |
line 333: endif | |
line 334: | |
line 335: let &cpo = s:cpo_save | |
line 336: unlet s:cpo_save | |
line 337: " vim: ts=8 | |
finished sourcing /usr/share/vim/vim81/syntax/html.vim | |
continuing in /usr/share/vim/vim81/syntax/htmldjango.vim | |
Searching for "/usr/share/vim/vimfiles/after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/html.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/html.vim" | |
line 17: unlet b:current_syntax | |
line 18: | |
line 19: syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock | |
line 20: | |
line 21: syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks | |
line 22: syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks | |
line 23: syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks | |
line 24: syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks | |
line 25: | |
line 26: let b:current_syntax = "htmldjango" | |
finished sourcing /usr/share/vim/vim81/syntax/htmldjango.vim | |
continuing in function <SNR>14_SynSet | |
Searching for "/usr/share/vim/vim81/syntax/htmldjango/*.vim" | |
Searching for "/usr/share/vim/vimfiles/after/syntax/htmldjango.vim" | |
Searching for "/usr/share/vim/vimfiles/after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/L9/after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/command-t/after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/sparkup/vim//after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/ranger.vim/after/syntax/htmldjango/*.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/htmldjango.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-jsbeautify/after/syntax/htmldjango/*.vim" | |
line 25: endfor | |
line 23: for name in split(s, '\.') | |
line 24: exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" | |
line 25: endfor | |
line 26: endif | |
function <SNR>14_SynSet returning #0 | |
continuing in Syntax Autocommands for "*" | |
line 9: return | |
function dist#ft#FThtml returning #0 | |
continuing in BufRead Autocommands for "*.html" | |
Executing BufRead Autocommands for "*" | |
autocommand if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat | runtime! scripts.vim | endif | |
line 0: if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat | runtime! scripts.vim | endif | |
line 0: runtime! scripts.vim | endif | |
line 0: endif | |
Executing BufRead Autocommands for "*" | |
autocommand if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'^I|| getline(4) =~ '^#' || getline(5) =~ '^#') | setf FALLBACK conf | endif | |
line 0: if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'^I|| getline(4) =~ '^#' || getline(5) =~ '^#') | setf FALLBACK conf | endif | |
line 0: setf FALLBACK conf | endif | |
line 0: endif | |
Executing BufRead Autocommands for "*" | |
autocommand call FugitiveDetect(expand('<amatch>:p')) | |
line 0: call FugitiveDetect(expand('<amatch>:p')) | |
calling function FugitiveDetect('/home/migacz/Coding/www/4Project/templates/login.html') | |
line 1: if exists('b:git_dir') && b:git_dir =~# '^$\|/$\|^fugitive:' | |
line 2: unlet b:git_dir | |
line 3: endif | |
line 4: if !exists('b:git_dir') | |
line 5: let dir = FugitiveExtractGitDir(a:path) | |
calling function FugitiveDetect[5]..FugitiveExtractGitDir('/home/migacz/Coding/www/4Project/templates/login.html') | |
line 1: let path = s:Slash(a:path) | |
calling function FugitiveDetect[5]..FugitiveExtractGitDir[1]..<SNR>16_Slash('/home/migacz/Coding/www/4Project/templates/login.html') | |
line 1: if exists('+shellslash') | |
line 2: return tr(a:path, '\', '/') | |
line 3: else | |
line 4: return a:path | |
function FugitiveDetect[5]..FugitiveExtractGitDir[1]..<SNR>16_Slash returning '/home/migacz/Coding/www/4Project/templates/login.html' | |
continuing in function FugitiveDetect[5]..FugitiveExtractGitDir | |
line 2: if path =~# '^fugitive:' | |
line 3: return matchstr(path, '\C^fugitive:\%(//\)\=\zs.\{-\}\ze\%(//\|::\|$\)') | |
line 4: elseif isdirectory(path) | |
line 5: let path = fnamemodify(path, ':p:s?/$??') | |
line 6: else | |
line 7: let path = fnamemodify(path, ':p:h:s?/$??') | |
line 8: endif | |
line 9: let pre = substitute(matchstr(path, '^\a\a\+\ze:'), '^.', '\u&', '') | |
line 10: if len(pre) && exists('*' . pre . 'Real') | |
line 11: let path = s:Slash({pre}Real(path)) | |
line 12: endif | |
line 13: let root = resolve(path) | |
line 14: if root !=# path | |
line 15: silent! exe haslocaldir() ? 'lcd .' : 'cd .' | |
line 16: endif | |
line 17: let previous = "" | |
line 18: while root !=# previous | |
line 19: if root =~# '\v^//%([^/]+/?)?$' | |
line 20: break | |
line 21: endif | |
line 22: if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0 | |
line 23: break | |
line 24: endif | |
line 25: if root ==# $GIT_WORK_TREE && FugitiveIsGitDir($GIT_DIR) | |
line 26: return simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??')) | |
line 27: endif | |
line 28: if FugitiveIsGitDir($GIT_DIR) | |
calling function FugitiveDetect[5]..FugitiveExtractGitDir[28]..FugitiveIsGitDir('') | |
line 1: let path = substitute(a:path, '[\/]$', '', '') . '/' | |
line 2: return getfsize(path.'HEAD') > 10 && ( isdirectory(path.'objects') && isdirectory(path.'refs') || getftype(path.'commondir') ==# 'file') | |
function FugitiveDetect[5]..FugitiveExtractGitDir[28]..FugitiveIsGitDir returning #0 | |
continuing in function FugitiveDetect[5]..FugitiveExtractGitDir | |
line 29: call FugitiveWorkTree(simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??'))) | |
line 30: if has_key(s:dir_for_worktree, root) | |
line 31: return s:dir_for_worktree[root] | |
line 32: endif | |
line 33: endif | |
line 34: let dir = substitute(root, '[\/]$', '', '') . '/.git' | |
line 35: let type = getftype(dir) | |
line 36: if type ==# 'dir' && FugitiveIsGitDir(dir) | |
line 37: return dir | |
line 38: elseif type ==# 'link' && FugitiveIsGitDir(dir) | |
line 39: return resolve(dir) | |
line 40: elseif type !=# '' && filereadable(dir) | |
line 41: let line = get(readfile(dir, '', 1), 0, '') | |
line 42: if line =~# '^gitdir: \.' && FugitiveIsGitDir(root.'/'.line[8:-1]) | |
line 43: return simplify(root.'/'.line[8:-1]) | |
line 44: elseif line =~# '^gitdir: ' && FugitiveIsGitDir(line[8:-1]) | |
line 45: return line[8:-1] | |
line 46: endif | |
line 47: elseif FugitiveIsGitDir(root) | |
calling function FugitiveDetect[5]..FugitiveExtractGitDir[47]..FugitiveIsGitDir('/home/migacz/Coding/www/4Project/templates') | |
line 1: let path = substitute(a:path, '[\/]$', '', '') . '/' | |
line 2: return getfsize(path.'HEAD') > 10 && ( isdirectory(path.'objects') && isdirectory(path.'refs') || getftype(path.'commondir') ==# 'file') | |
function FugitiveDetect[5]..FugitiveExtractGitDir[47]..FugitiveIsGitDir returning #0 | |
continuing in function FugitiveDetect[5]..FugitiveExtractGitDir | |
line 48: return root | |
line 49: endif | |
line 50: let previous = root | |
line 51: let root = fnamemodify(root, ':h') | |
line 52: endwhile | |
line 18: while root !=# previous | |
line 19: if root =~# '\v^//%([^/]+/?)?$' | |
line 20: break | |
line 21: endif | |
line 22: if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0 | |
line 23: break | |
line 24: endif | |
line 25: if root ==# $GIT_WORK_TREE && FugitiveIsGitDir($GIT_DIR) | |
line 26: return simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??')) | |
line 27: endif | |
line 28: if FugitiveIsGitDir($GIT_DIR) | |
calling function FugitiveDetect[5]..FugitiveExtractGitDir[28]..FugitiveIsGitDir('') | |
line 1: let path = substitute(a:path, '[\/]$', '', '') . '/' | |
line 2: return getfsize(path.'HEAD') > 10 && ( isdirectory(path.'objects') && isdirectory(path.'refs') || getftype(path.'commondir') ==# 'file') | |
function FugitiveDetect[5]..FugitiveExtractGitDir[28]..FugitiveIsGitDir returning #0 | |
continuing in function FugitiveDetect[5]..FugitiveExtractGitDir | |
line 29: call FugitiveWorkTree(simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??'))) | |
line 30: if has_key(s:dir_for_worktree, root) | |
line 31: return s:dir_for_worktree[root] | |
line 32: endif | |
line 33: endif | |
line 34: let dir = substitute(root, '[\/]$', '', '') . '/.git' | |
line 35: let type = getftype(dir) | |
line 36: if type ==# 'dir' && FugitiveIsGitDir(dir) | |
calling function FugitiveDetect[5]..FugitiveExtractGitDir[36]..FugitiveIsGitDir('/home/migacz/Coding/www/4Project/.git') | |
line 1: let path = substitute(a:path, '[\/]$', '', '') . '/' | |
line 2: return getfsize(path.'HEAD') > 10 && ( isdirectory(path.'objects') && isdirectory(path.'refs') || getftype(path.'commondir') ==# 'file') | |
function FugitiveDetect[5]..FugitiveExtractGitDir[36]..FugitiveIsGitDir returning #1 | |
continuing in function FugitiveDetect[5]..FugitiveExtractGitDir | |
line 37: return dir | |
function FugitiveDetect[5]..FugitiveExtractGitDir returning '/home/migacz/Coding/www/4Project/.git' | |
continuing in function FugitiveDetect | |
line 6: if dir !=# '' | |
line 7: let b:git_dir = dir | |
line 8: endif | |
line 9: endif | |
line 10: if exists('b:git_dir') | |
line 11: return fugitive#Init() | |
Searching for "autoload/fugitive.vim" in "/home/migacz/.vim,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/vim-fugitive,/home/migacz/.vim/bundle/L9,/home/migacz/.vim/bundle/command-t,/home/migacz/.vim/bundle/sparkup/vim/,/home/migacz/.vim/bundle/ranger.vim,/home/migacz/.vim/bundle/vim-jsbeautify,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/home/migacz/.vim/after,/home/migacz/.vim/bundle/Vundle.vim,/home/migacz/.vim/bundle/Vundle.vim/after,/home/migacz/.vim/bundle/vim-fugitive/after,/home/migacz/.vim/bundle/L9/after,/home/migacz/.vim/bundle/command-t/after,/home/migacz/.vim/bundle/sparkup/vim//after,/home/migacz/.vim/bundle/ranger.vim/after,/home/migacz/.vim/bundle/vim-jsbeautify/after" | |
Searching for "/home/migacz/.vim/autoload/fugitive.vim" | |
Searching for "/home/migacz/.vim/bundle/Vundle.vim/autoload/fugitive.vim" | |
Searching for "/home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim" | |
chdir(/home/migacz/.vim/bundle/vim-fugitive/autoload) | |
fchdir() to previous dir | |
line 11: sourcing "/home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim" | |
line 1: " Location: autoload/fugitive.vim | |
line 2: " Maintainer: Tim Pope <http://tpo.pe/> | |
line 3: | |
line 4: if exists('g:autoloaded_fugitive') | |
line 5: finish | |
line 6: endif | |
line 7: let g:autoloaded_fugitive = 1 | |
line 8: | |
line 9: if !exists('g:fugitive_git_executable') | |
line 10: let g:fugitive_git_executable = 'git' | |
line 11: endif | |
line 12: | |
line 13: " Section: Utility | |
line 14: | |
line 15: function! s:function(name) abort | |
line 18: | |
line 19: function! s:sub(str,pat,rep) abort | |
line 22: | |
line 23: function! s:gsub(str,pat,rep) abort | |
line 26: | |
line 27: function! s:Uniq(list) abort | |
line 41: | |
line 42: function! s:winshell() abort | |
line 45: | |
line 46: function! s:shellesc(arg) abort | |
line 55: | |
line 56: let s:fnameescape = " \t\n*?[{`$\\%#'\"|!<" | |
line 57: function! s:fnameescape(file) abort | |
line 64: | |
line 65: function! s:throw(string) abort | |
line 69: | |
line 70: function! s:warn(str) abort | |
line 76: | |
line 77: function! s:Slash(path) abort | |
line 84: | |
line 85: function! s:PlatformSlash(path) abort | |
line 92: | |
line 93: function! s:Resolve(path) abort | |
line 100: | |
line 101: function! s:cpath(path, ...) abort | |
line 109: | |
line 110: function! s:Cd(...) abort | |
line 122: | |
line 123: let s:executables = {} | |
line 124: | |
line 125: function! s:executable(binary) abort | |
line 131: | |
line 132: function! s:map(mode, lhs, rhs, ...) abort | |
line 159: | |
line 160: function! s:System(cmd) abort | |
line 170: | |
line 171: " Section: Git | |
line 172: | |
line 173: function! s:UserCommand() abort | |
line 176: | |
line 177: function! s:Prepare(...) abort | |
line 180: | |
line 181: let s:git_versions = {} | |
line 182: function! fugitive#GitVersion(...) abort | |
line 202: | |
line 203: let s:commondirs = {} | |
line 204: function! fugitive#CommonDir(dir) abort | |
line 224: | |
line 225: function! s:Tree(...) abort | |
line 228: | |
line 229: function! s:PreparePathArgs(cmd, dir, literal) abort | |
line 249: | |
line 254: let s:prepare_env = { 'sequence.editor': 'GIT_SEQUENCE_EDITOR', 'core.editor': 'GIT_EDITOR', 'core.askpass': 'GIT_ASKPASS', } | |
line 255: function! fugitive#Prepare(...) abort | |
line 315: | |
line 316: function! s:TreeChomp(...) abort | |
line 319: | |
line 320: function! fugitive#Head(...) abort | |
line 335: | |
line 336: function! fugitive#RevParse(rev, ...) abort | |
line 343: | |
line 344: function! s:ConfigTimestamps(dir, dict) abort | |
line 353: | |
line 354: let s:config = {} | |
line 355: function! fugitive#Config(...) abort | |
line 393: | |
line 394: function! s:Remote(dir) abort | |
line 405: | |
line 406: function! fugitive#RemoteUrl(...) abort | |
line 416: | |
line 417: " Section: Repository Object | |
line 418: | |
line 419: function! s:add_methods(namespace, method_names) abort | |
line 424: | |
line 425: let s:commands = [] | |
line 426: function! s:command(definition) abort | |
line 429: | |
line 430: function! s:define_commands() abort | |
line 435: | |
line 436: let s:repo_prototype = {} | |
line 437: let s:repos = {} | |
line 438: | |
line 439: function! fugitive#repo(...) abort | |
line 452: | |
line 453: function! s:repo_dir(...) dict abort | |
line 456: | |
line 457: function! s:repo_tree(...) dict abort | |
line 465: | |
line 466: function! s:repo_bare() dict abort | |
line 473: | |
line 474: function! s:repo_find(object) dict abort | |
line 477: | |
line 478: function! s:repo_translate(rev) dict abort | |
line 481: | |
line 482: function! s:repo_head(...) dict abort | |
line 485: | |
line 486: call s:add_methods('repo',['dir','tree','bare','find','translate','head']) | |
calling function <SNR>49_add_methods('repo', ['dir', 'tree', 'bare', 'find', 'translate', 'head']) | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_dir') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_dir') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_tree') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_tree') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_bare') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_bare') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_find') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_find') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_translate') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_translate') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_head') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_head') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
line 3: endfor | |
function <SNR>49_add_methods returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 487: | |
line 488: function! s:repo_prepare(...) dict abort | |
line 491: | |
line 492: function! s:repo_git_command(...) dict abort | |
line 496: | |
line 497: function! s:repo_git_chomp(...) dict abort | |
line 502: | |
line 503: function! s:repo_git_chomp_in_tree(...) dict abort | |
line 511: | |
line 512: function! s:repo_rev_parse(rev) dict abort | |
line 515: | |
line 516: call s:add_methods('repo',['prepare','git_command','git_chomp','git_chomp_in_tree','rev_parse']) | |
calling function <SNR>49_add_methods('repo', ['prepare', 'git_command', 'git_chomp', 'git_chomp_in_tree', 'rev_parse']) | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_prepare') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_prepare') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_git_command') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_git_command') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_git_chomp') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_git_chomp') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_git_chomp_in_tree') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_git_chomp_in_tree') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_rev_parse') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_rev_parse') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
line 3: endfor | |
function <SNR>49_add_methods returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 517: | |
line 518: function! s:repo_superglob(base) dict abort | |
line 521: | |
line 522: call s:add_methods('repo',['superglob']) | |
calling function <SNR>49_add_methods('repo', ['superglob']) | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_superglob') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_superglob') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
line 3: endfor | |
function <SNR>49_add_methods returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 523: | |
line 524: function! s:repo_config(name) dict abort | |
line 527: | |
line 528: function! s:repo_user() dict abort | |
line 533: | |
line 534: call s:add_methods('repo',['config', 'user']) | |
calling function <SNR>49_add_methods('repo', ['config', 'user']) | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_config') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_config') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:repo_user') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_repo_user') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
line 3: endfor | |
function <SNR>49_add_methods returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 535: | |
line 536: " Section: File API | |
line 537: | |
line 538: function! s:DirCommitFile(path) abort | |
line 545: | |
line 546: function! s:DirRev(url) abort | |
line 550: | |
line 551: function! s:Owner(path, ...) abort | |
line 586: | |
line 587: function! fugitive#Real(url) abort | |
line 604: | |
line 605: function! fugitive#Path(url, ...) abort | |
line 648: | |
line 649: function! s:Relative(...) abort | |
line 652: | |
line 653: function! fugitive#Find(object, ...) abort | |
line 760: | |
line 761: function! s:Generate(rev, ...) abort | |
line 772: | |
line 773: function! s:DotRelative(path) abort | |
line 781: | |
line 782: function! fugitive#Object(...) abort | |
line 807: | |
line 808: let s:var = '\%(%\|#<\=\d\+\|##\=\)' | |
line 809: let s:flag = '\%(:[p8~.htre]\|:g\=s\(.\).\{-\}\1.\{-\}\1\)' | |
line 810: let s:expand = '\%(\(' . s:var . '\)\(' . s:flag . '*\)\(:S\)\=\)' | |
line 811: | |
line 812: function! s:BufName(var) abort | |
line 822: | |
line 823: function! s:ExpandVar(other, var, flags, esc) abort | |
line 845: | |
line 846: function! s:Expand(rev) abort | |
line 863: | |
line 864: function! fugitive#Expand(object) abort | |
line 869: | |
line 870: function! s:ShellExpand(cmd) abort | |
line 874: | |
line 875: let s:trees = {} | |
line 876: let s:indexes = {} | |
line 877: function! s:TreeInfo(dir, commit) abort | |
line 923: | |
line 924: function! s:PathInfo(url) abort | |
line 938: | |
line 939: function! fugitive#simplify(url) abort | |
line 955: | |
line 956: function! fugitive#resolve(url) abort | |
line 964: | |
line 965: function! fugitive#getftime(url) abort | |
line 968: | |
line 969: function! fugitive#getfsize(url) abort | |
line 978: | |
line 979: function! fugitive#getftype(url) abort | |
line 982: | |
line 983: function! fugitive#filereadable(url) abort | |
line 986: | |
line 987: function! fugitive#filewritable(url) abort | |
line 994: | |
line 995: function! fugitive#isdirectory(url) abort | |
line 998: | |
line 999: function! fugitive#getfperm(url) abort | |
line 1017: | |
line 1018: function! fugitive#setfperm(url, perm) abort | |
line 1030: | |
line 1031: function! s:TempCmd(out, cmd) abort | |
line 1046: | |
line 1047: if !exists('s:blobdirs') | |
line 1048: let s:blobdirs = {} | |
line 1049: endif | |
line 1050: function! s:BlobTemp(url) abort | |
line 1074: | |
line 1075: function! fugitive#readfile(url, ...) abort | |
line 1086: | |
line 1087: function! fugitive#writefile(lines, url, ...) abort | |
line 1109: | |
line 1117: let s:globsubs = { '/**/': '/\%([^./][^/]*/\)*', '/**': '/\%([^./][^/]\+/\)*[^./][^/]*', '**/': '[^/]*\%(/[^./][^/]*\)*', '**': '.*', '/*': '/[^/.][^/]*', '*': '[^/]*', '?': '[^/]'} | |
line 1118: function! fugitive#glob(url, ...) abort | |
line 1145: | |
line 1146: function! fugitive#delete(url, ...) abort | |
line 1159: | |
line 1160: " Section: Buffer Object | |
line 1161: | |
line 1162: let s:buffer_prototype = {} | |
line 1163: | |
line 1164: function! fugitive#buffer(...) abort | |
line 1169: | |
line 1170: function! s:buffer_getvar(var) dict abort | |
line 1173: | |
line 1174: function! s:buffer_getline(lnum) dict abort | |
line 1177: | |
line 1178: function! s:buffer_repo() dict abort | |
line 1181: | |
line 1182: function! s:buffer_type(...) dict abort | |
line 1185: | |
line 1186: function! s:buffer_spec() dict abort | |
line 1189: | |
line 1190: function! s:buffer_name() dict abort | |
line 1193: | |
line 1194: function! s:buffer_commit() dict abort | |
line 1197: | |
line 1198: function! s:buffer_relative(...) dict abort | |
line 1201: | |
line 1202: function! s:buffer_path(...) dict abort | |
line 1205: | |
line 1206: call s:add_methods('buffer',['getvar','getline','repo','type','spec','name','commit','path','relative']) | |
calling function <SNR>49_add_methods('buffer', ['getvar', 'getline', 'repo', 'type', ..., 'name', 'commit', 'path', 'relative']) | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_getvar') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_getvar') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_getline') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_getline') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_repo') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_repo') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_type') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_type') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_spec') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_spec') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_name') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_name') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_commit') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_commit') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_path') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_path') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
calling function <SNR>49_add_methods[2]..<SNR>49_function('s:buffer_relative') | |
line 1: return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) | |
function <SNR>49_add_methods[2]..<SNR>49_function returning function('<SNR>49_buffer_relative') | |
continuing in function <SNR>49_add_methods | |
line 3: endfor | |
line 1: for name in a:method_names | |
line 2: let s:{a:namespace}_prototype[name] = s:function('s:'.a:namespace.'_'.name) | |
line 3: endfor | |
function <SNR>49_add_methods returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 1207: | |
line 1208: " Section: Completion | |
line 1209: | |
line 1210: function! s:GlobComplete(lead, pattern) abort | |
line 1220: | |
line 1221: function! fugitive#PathComplete(base, ...) abort | |
line 1247: | |
line 1248: function! fugitive#Complete(base, ...) abort | |
line 1298: | |
line 1299: " Section: Buffer auto-commands | |
line 1300: | |
line 1301: function! s:ReplaceCmd(cmd, ...) abort | |
line 1330: | |
line 1331: function! s:QueryLog(refspec) abort | |
line 1337: | |
line 1338: function! s:FormatLog(dict) abort | |
line 1341: | |
line 1342: function! s:FormatRebase(dict) abort | |
line 1345: | |
line 1346: function! s:FormatFile(dict) abort | |
line 1349: | |
line 1350: function! s:Format(val) abort | |
line 1359: | |
line 1360: function! s:AddHeader(key, value) abort | |
line 1373: | |
line 1374: function! s:AddSection(label, lines, ...) abort | |
line 1381: | |
line 1382: function! fugitive#BufReadStatus() abort | |
line 1594: | |
line 1595: function! fugitive#FileReadCmd(...) abort | |
line 1609: | |
line 1610: function! fugitive#FileWriteCmd(...) abort | |
line 1644: | |
line 1645: function! fugitive#BufReadCmd(...) abort | |
line 1755: | |
line 1756: function! fugitive#BufWriteCmd(...) abort | |
line 1759: | |
line 1760: function! fugitive#SourceCmd(...) abort | |
line 1772: | |
line 1773: " Section: Temp files | |
line 1774: | |
line 1775: if !exists('s:temp_files') | |
line 1776: let s:temp_files = {} | |
line 1777: endif | |
line 1778: | |
line 1779: function! s:SetupTemp(file) abort | |
line 1801: | |
line 1802: augroup fugitive_temp | |
line 1803: autocmd! | |
line 1804: autocmd BufNewFile,BufReadPost * exe s:SetupTemp(expand('<amatch>:p')) | |
line 1805: augroup END | |
line 1806: | |
line 1807: " Section: :Git | |
line 1808: | |
line 1809: call s:command("-bang -nargs=? -complete=customlist,s:GitComplete Git :execute s:Git(<bang>0,'<mods>',<q-args>)") | |
calling function <SNR>49_command('-bang -nargs=? -complete=customlist,s...ute s:Git(<bang>0,''<mods>'',<q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 1810: | |
line 1811: function! s:Git(bang, mods, args) abort | |
line 1843: | |
line 1844: let s:exec_paths = {} | |
line 1845: function! s:Subcommands() abort | |
line 1852: | |
line 1853: let s:aliases = {} | |
line 1854: function! s:Aliases() abort | |
line 1864: | |
line 1865: function! s:GitComplete(A, L, P) abort | |
line 1876: | |
line 1877: " Section: :Gcd, :Glcd | |
line 1878: | |
line 1879: function! s:DirComplete(A, L, P) abort | |
line 1882: | |
line 1883: function! s:DirArg(path) abort | |
line 1891: | |
line 1892: call s:command("-bar -bang -nargs=? -complete=customlist,s:DirComplete Gcd :exe 'cd<bang>' s:fnameescape(s:DirArg(<q-args>))") | |
calling function <SNR>49_command('-bar -bang -nargs=? -complete=customl...>'' s:fnameescape(s:DirArg(<q-args>))') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 1893: call s:command("-bar -bang -nargs=? -complete=customlist,s:DirComplete Glcd :exe 'lcd<bang>' s:fnameescape(s:DirArg(<q-args>))") | |
calling function <SNR>49_command('-bar -bang -nargs=? -complete=customl...g>'' s:fnameescape(s:DirArg(<q-args>))') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 1894: | |
line 1895: " Section: :Gstatus | |
line 1896: | |
line 1897: call s:command("-bar -bang -range=-1 Gstatus :execute s:Status(<bang>0, <count>, '<mods>')") | |
calling function <SNR>49_command('-bar -bang -range=-1 Gstatus :execute s:Status(<bang>0, <count>, ''<mods>'')') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 1898: call s:command("-bar -bang -range=-1 G :execute s:Status(<bang>0, <count>, '<mods>')") | |
calling function <SNR>49_command('-bar -bang -range=-1 G :execute s:Status(<bang>0, <count>, ''<mods>'')') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 1899: augroup fugitive_status | |
line 1900: autocmd! | |
line 1901: if !has('win32') | |
line 1902: autocmd ShellCmdPost * call fugitive#ReloadStatus() | |
line 1903: autocmd QuickFixCmdPost c*ile call fugitive#ReloadStatus() | |
line 1904: autocmd FocusGained * call fugitive#ReloadStatus() | |
line 1905: autocmd BufDelete term://* call fugitive#ReloadStatus() | |
line 1906: endif | |
line 1907: augroup END | |
line 1908: | |
line 1909: function! s:Status(bang, count, mods) abort | |
line 1937: | |
line 1938: function! s:StageSeek(info, fallback) abort | |
line 1996: | |
line 1997: function! s:ReloadStatus(...) abort | |
line 2005: | |
line 2006: function! fugitive#ReloadStatus(...) abort | |
line 2039: | |
line 2040: function! s:StageInfo(...) abort | |
line 2076: | |
line 2077: function! s:StageReveal(...) abort | |
line 2089: | |
line 2090: function! s:StageNext(count) abort | |
line 2097: | |
line 2098: function! s:StagePrevious(count) abort | |
line 2109: | |
line 2110: function! s:StageReloadSeek(target,lnum1,lnum2) abort | |
line 2114: | |
line 2115: function! s:StageInline(mode, ...) abort | |
line 2187: | |
line 2188: function! s:StageDiff(diff) abort | |
line 2214: | |
line 2215: function! s:StageDiffEdit() abort | |
line 2236: | |
line 2237: function! s:StageApply(info, lnum1, count, reverse, extra) abort | |
line 2293: | |
line 2294: function! s:StageDelete(lnum, count) abort | |
line 2321: | |
line 2322: function! s:StageToggle(lnum1, count) abort | |
line 2389: | |
line 2390: function! s:StageToggleOnly(section, lnum1, count) abort | |
line 2398: | |
line 2399: function! s:StagePatch(lnum1,lnum2) abort | |
line 2433: | |
line 2434: " Section: :Gcommit | |
line 2435: | |
line 2436: call s:command("-nargs=? -complete=customlist,s:CommitComplete Gcommit :execute s:Commit('<mods>', <q-args>)") | |
calling function <SNR>49_command('-nargs=? -complete=customlist,s:Commi...execute s:Commit(''<mods>'', <q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2437: | |
line 2438: function! s:Commit(mods, args, ...) abort | |
line 2522: | |
line 2523: function! s:CommitComplete(A,L,P) abort | |
line 2538: | |
line 2539: function! s:FinishCommit() abort | |
line 2552: | |
line 2553: " Section: :Gmerge, :Grebase, :Gpull | |
line 2554: | |
line 2556: call s:command("-nargs=? -bang -complete=custom,s:RevisionComplete Gmerge " . "execute s:Merge('merge', <bang>0, '<mods>', <q-args>)") | |
calling function <SNR>49_command('-nargs=? -bang -complete=custom,s:Rev...erge'', <bang>0, ''<mods>'', <q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2558: call s:command("-nargs=? -bang -complete=custom,s:RevisionComplete Grebase " . "execute s:Merge('rebase', <bang>0, '<mods>', <q-args>)") | |
calling function <SNR>49_command('-nargs=? -bang -complete=custom,s:Rev...base'', <bang>0, ''<mods>'', <q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2560: call s:command("-nargs=? -bang -complete=custom,s:RemoteComplete Gpull " . "execute s:Merge('pull --progress', <bang>0, '<mods>', <q-args>)") | |
calling function <SNR>49_command('-nargs=? -bang -complete=custom,s:Rem...ress'', <bang>0, ''<mods>'', <q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2561: | |
line 2562: function! s:RevisionComplete(A, L, P) abort | |
line 2566: | |
line 2567: function! s:RemoteComplete(A, L, P) abort | |
line 2578: | |
line 2579: function! s:RebaseSequenceAborter() abort | |
line 2591: | |
line 2592: function! fugitive#Cwindow() abort | |
line 2602: | |
line 2609: let s:common_efm = '' . '%+Egit:%.%#,' . '%+Eusage:%.%#,' . '%+Eerror:%.%#,' . '%+Efatal:%.%#,' . '%-G%.%#%\e[K%.%#,' . '%-G%.%#%\r%.%\+' | |
line 2610: | |
line 2623: let s:rebase_abbrevs = { 'p': 'pick', 'r': 'reword', 'e': 'edit', 's': 'squash', 'f': 'fixup', 'x': 'exec', 'd': 'drop', 'l': 'label', 't': 'reset', 'm': 'merge', 'b': 'break', } | |
line 2624: | |
line 2625: function! s:RebaseEdit(cmd, dir) abort | |
line 2628: | |
line 2629: function! s:Merge(cmd, bang, mods, args, ...) abort | |
line 2741: | |
line 2742: function! s:RebaseClean(file) abort | |
line 2756: | |
line 2757: augroup fugitive_merge | |
line 2758: autocmd! | |
line 2765: autocmd VimLeavePre,BufDelete git-rebase-todo if getbufvar(+expand('<abuf>'), '&bufhidden') ==# 'wipe' | call s:RebaseClean(expand('<afile>')) | if getfsize(FugitiveFind('.git/rebase-merge/done', +expand('<abuf>'))) == 0 | let s:rebase_continue = FugitiveGitDir(+expand('<abuf>')) | endif | endif | |
line 2769: autocmd BufEnter * nested if exists('s:rebase_continue') | exe s:Merge('rebase', 0, '', getfsize(fugitive#Find('.git/rebase-merge/git-rebase-todo', s:rebase_continue)) > 0 ? '--continue' : '--abort', remove(s:, 'rebase_continue')) | endif | |
line 2770: augroup END | |
line 2771: | |
line 2772: " Section: :Ggrep, :Glog | |
line 2773: | |
line 2774: if !exists('g:fugitive_summary_format') | |
line 2775: let g:fugitive_summary_format = '%s' | |
line 2776: endif | |
line 2777: | |
line 2778: function! s:GrepComplete(A, L, P) abort | |
line 2785: | |
line 2786: call s:command("-bang -nargs=? -complete=customlist,s:GrepComplete Ggrep :execute s:Grep('grep',<bang>0,<q-args>)") | |
calling function <SNR>49_command('-bang -nargs=? -complete=customlist,s...cute s:Grep(''grep'',<bang>0,<q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2787: call s:command("-bang -nargs=? -complete=customlist,s:GrepComplete Glgrep :execute s:Grep('lgrep',<bang>0,<q-args>)") | |
calling function <SNR>49_command('-bang -nargs=? -complete=customlist,s...ute s:Grep(''lgrep'',<bang>0,<q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2788: call s:command("-bar -bang -nargs=* -range=-1 -complete=customlist,s:GrepComplete Glog :call s:Log('grep',<bang>0,<line1>,<count>,<q-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -range=-1 -comple...ep'',<bang>0,<line1>,<count>,<q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2789: call s:command("-bar -bang -nargs=* -range=-1 -complete=customlist,s:GrepComplete Gllog :call s:Log('lgrep',<bang>0,<line1>,<count>,<q-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -range=-1 -comple...ep'',<bang>0,<line1>,<count>,<q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 2790: | |
line 2791: function! s:Grep(cmd,bang,arg) abort | |
line 2830: | |
line 2831: function! s:Log(cmd, bang, line1, line2, ...) abort | |
line 2875: | |
line 2876: " Section: :Gedit, :Gpedit, :Gsplit, :Gvsplit, :Gtabedit, :Gread | |
line 2877: | |
line 2878: function! s:UsableWin(nr) abort | |
line 2884: | |
line 2885: function! s:EditParse(args) abort | |
line 2902: | |
line 2903: function! s:BlurStatus() abort | |
line 2926: | |
line 2927: function! s:Edit(cmd, bang, mods, args, ...) abort | |
line 2965: | |
line 2966: function! s:Read(count, line1, line2, range, bang, mods, args, ...) abort | |
line 3004: | |
line 3005: function! s:EditRunComplete(A,L,P) abort | |
line 3012: | |
line 3013: call s:command("-bar -bang -nargs=* -complete=customlist,fugitive#Complete Ge execute s:Edit('edit<bang>', 0, '<mods>', <q-args>, <f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -comple...'', 0, ''<mods>'', <q-args>, <f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3014: call s:command("-bar -bang -nargs=* -complete=customlist,fugitive#Complete Gedit execute s:Edit('edit<bang>', 0, '<mods>', <q-args>, <f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -comple...'', 0, ''<mods>'', <q-args>, <f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3015: call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gpedit execute s:Edit('pedit', <bang>0, '<mods>', <q-args>, <f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -comple...ang>0, ''<mods>'', <q-args>, <f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3016: call s:command("-bar -bang -nargs=* -range=0 -complete=customlist,s:EditRunComplete Gsplit execute s:Edit((<count> ? <count> : '').'split', <bang>0, '<mods>', <q-args>, <f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -range=0 -comple...ang>0, ''<mods>'', <q-args>, <f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3017: call s:command("-bar -bang -nargs=* -range=0 -complete=customlist,s:EditRunComplete Gvsplit execute s:Edit((<count> ? <count> : '').'vsplit', <bang>0, '<mods>', <q-args>, <f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -range=0 -comple...ang>0, ''<mods>'', <q-args>, <f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3018: call s:command("-bar -bang -nargs=* -range=0 -complete=customlist,s:EditRunComplete" . (has('patch-7.4.542') ? ' -addr=tabs' : '') . " Gtabedit execute s:Edit((<count> ? <count> : '').'tabedit', <bang>0, '<mods>', <q-args>, <f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -range=0 -comple...ang>0, ''<mods>'', <q-args>, <f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3019: call s:command("-bar -bang -nargs=* -range=-1 -complete=customlist,s:EditRunComplete Gread execute s:Read(<count>, <line1>, <line2>, +'<range>', <bang>0, '<mods>', <q-args>, <f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -range=-1 -comple...ang>0, ''<mods>'', <q-args>, <f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3020: | |
line 3021: " Section: :Gwrite, :Gwq | |
line 3022: | |
line 3023: call s:command("-bar -bang -nargs=* -complete=customlist,fugitive#Complete Gwrite :execute s:Write(<bang>0,<f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -complete=customl...ite :execute s:Write(<bang>0,<f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3024: call s:command("-bar -bang -nargs=* -complete=customlist,fugitive#Complete Gw :execute s:Write(<bang>0,<f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -complete=customl... Gw :execute s:Write(<bang>0,<f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3025: call s:command("-bar -bang -nargs=* -complete=customlist,fugitive#Complete Gwq :execute s:Wq(<bang>0,<f-args>)") | |
calling function <SNR>49_command('-bar -bang -nargs=* -complete=customl...te Gwq :execute s:Wq(<bang>0,<f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3026: | |
line 3027: function! s:Write(force,...) abort | |
line 3166: | |
line 3167: function! s:Wq(force,...) abort | |
line 3179: | |
line 3180: augroup fugitive_commit | |
line 3181: autocmd! | |
line 3182: autocmd VimLeavePre,BufDelete COMMIT_EDITMSG execute s:sub(s:FinishCommit(), '^echoerr (.*)', 'echohl ErrorMsg|echo \1|echohl NONE') | |
line 3183: augroup END | |
line 3184: | |
line 3185: " Section: :Gpush, :Gfetch | |
line 3186: | |
line 3187: call s:command("-nargs=? -bang -complete=custom,s:RemoteComplete Gpush execute s:Dispatch('<bang>', 'push '.<q-args>)") | |
calling function <SNR>49_command('-nargs=? -bang -complete=custom,s:Rem...spatch(''<bang>'', ''push ''.<q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3188: call s:command("-nargs=? -bang -complete=custom,s:RemoteComplete Gfetch execute s:Dispatch('<bang>', 'fetch '.<q-args>)") | |
calling function <SNR>49_command('-nargs=? -bang -complete=custom,s:Rem...patch(''<bang>'', ''fetch ''.<q-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3189: | |
line 3190: function! s:Dispatch(bang, args) | |
line 3211: | |
line 3212: " Section: :Gdiff | |
line 3213: | |
line 3214: call s:command("-bang -bar -nargs=* -complete=customlist,fugitive#Complete Gdiff :execute s:Diff('',<bang>0,<f-args>)") | |
calling function <SNR>49_command('-bang -bar -nargs=* -complete=customl...:execute s:Diff('''',<bang>0,<f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3215: call s:command("-bang -bar -nargs=* -complete=customlist,fugitive#Complete Gvdiff :execute s:Diff('keepalt vert ',<bang>0,<f-args>)") | |
calling function <SNR>49_command('-bang -bar -nargs=* -complete=customl...ff(''keepalt vert '',<bang>0,<f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3216: call s:command("-bang -bar -nargs=* -complete=customlist,fugitive#Complete Gsdiff :execute s:Diff('keepalt ',<bang>0,<f-args>)") | |
calling function <SNR>49_command('-bang -bar -nargs=* -complete=customl... s:Diff(''keepalt '',<bang>0,<f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3217: | |
line 3218: augroup fugitive_diff | |
line 3219: autocmd! | |
line 3223: autocmd BufWinLeave * if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 2 | call s:diffoff_all(getbufvar(+expand('<abuf>'), 'git_dir')) | endif | |
line 3227: autocmd BufWinEnter * if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 1 | call s:diffoff() | endif | |
line 3228: augroup END | |
line 3229: | |
line 3230: function! s:can_diffoff(buf) abort | |
line 3235: | |
line 3236: function! fugitive#CanDiffoff(buf) abort | |
line 3239: | |
line 3240: function! s:diff_modifier(count) abort | |
line 3252: | |
line 3253: function! s:diff_window_count() abort | |
line 3260: | |
line 3261: function! s:diff_restore() abort | |
line 3275: | |
line 3276: function! s:diffthis() abort | |
line 3282: | |
line 3283: function! s:diffoff() abort | |
line 3291: | |
line 3292: function! s:diffoff_all(dir) abort | |
line 3307: | |
line 3308: function! s:CompareAge(mine, theirs) abort | |
line 3329: | |
line 3330: function! s:Diff(vert,keepfocus,...) abort | |
line 3411: | |
line 3412: " Section: :Gmove, :Gremove | |
line 3413: | |
line 3414: function! s:Move(force, rename, destination) abort | |
line 3453: | |
line 3454: function! s:RenameComplete(A,L,P) abort | |
line 3462: | |
line 3463: function! s:Remove(after, force) abort | |
line 3484: | |
line 3485: augroup fugitive_remove | |
line 3486: autocmd! | |
line 3492: autocmd User Fugitive if s:DirCommitFile(@%)[1] =~# '^0\=$' | exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,fugitive#PathComplete Gmove :execute s:Move(<bang>0,0,<q-args>)" | exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,s:RenameComplete Grename :execute s:Move(<bang>0,1,<q-args>)" | exe "command! -buffer -bar -bang Gremove :execute s:Remove('edit',<bang>0)" | exe "command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0)" | endif | |
line 3493: augroup END | |
line 3494: | |
line 3495: " Section: :Gblame | |
line 3496: | |
line 3497: function! s:Keywordprg() abort | |
line 3505: | |
line 3506: augroup fugitive_blame | |
line 3507: autocmd! | |
line 3508: autocmd FileType fugitiveblame setlocal nomodeline | if exists('b:git_dir') | let &l:keywordprg = s:Keywordprg() | endif | |
line 3509: autocmd Syntax fugitiveblame call s:BlameSyntax() | |
line 3513: autocmd User Fugitive if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' || filereadable(@%) | exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:Blame(<bang>0,<line1>,<line2>,<count>,'<mods>',[<f-args>])" | endif | |
line 3514: autocmd ColorScheme,GUIEnter * call s:RehighlightBlame() | |
line 3515: autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave') | |
line 3516: augroup END | |
line 3517: | |
line 3518: function! s:linechars(pattern) abort | |
line 3527: | |
line 3528: function! s:Blame(bang, line1, line2, count, mods, args) abort | |
line 3653: | |
line 3654: function! s:BlameCommit(cmd, ...) abort | |
line 3701: | |
line 3702: function! s:BlameJump(suffix) abort | |
line 3739: | |
line 3740: let s:hash_colors = {} | |
line 3741: | |
line 3742: function! s:BlameSyntax() abort | |
line 3790: | |
line 3791: function! s:RehighlightBlame() abort | |
line 3800: | |
line 3801: " Section: :Gbrowse | |
line 3802: | |
line 3803: call s:command("-bar -bang -range=0 -nargs=* -complete=customlist,fugitive#Complete Gbrowse :execute s:Browse(<bang>0,<line1>,<count>,<f-args>)") | |
calling function <SNR>49_command('-bar -bang -range=0 -nargs=* -complet...owse(<bang>0,<line1>,<count>,<f-args>)') | |
line 1: let s:commands += [a:definition] | |
function <SNR>49_command returning #0 | |
continuing in /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
line 3804: | |
line 3805: let s:redirects = {} | |
line 3806: | |
line 3807: function! s:Browse(bang,line1,count,...) abort | |
line 4012: | |
line 4013: " Section: Go to file | |
line 4014: | |
line 4015: nnoremap <SID>: :<C-U><C-R>=v:count ? v:count : ''<CR> | |
line 4016: function! fugitive#MapCfile(...) abort | |
line 4027: | |
line 4028: function! s:ContainingCommit() abort | |
line 4032: | |
line 4033: function! s:SquashArgument() abort | |
line 4040: | |
line 4041: function! s:NavigateUp(count) abort | |
line 4060: | |
line 4061: function! fugitive#MapJumps(...) abort | |
line 4109: | |
line 4110: function! s:StatusCfile(...) abort | |
line 4133: | |
line 4134: function! fugitive#StatusCfile() abort | |
line 4138: | |
line 4139: function! s:MessageCfile(...) abort | |
line 4160: | |
line 4161: function! fugitive#MessageCfile() abort | |
line 4165: | |
line 4166: function! s:cfile() abort | |
line 4319: | |
line 4320: function! s:GF(mode) abort | |
line 4336: | |
line 4337: function! fugitive#Cfile() abort | |
line 4351: | |
line 4352: " Section: Statusline | |
line 4353: | |
line 4354: function! fugitive#Statusline(...) abort | |
line 4366: | |
line 4367: function! fugitive#statusline(...) abort | |
line 4370: | |
line 4371: function! fugitive#head(...) abort | |
line 4378: | |
line 4379: " Section: Folding | |
line 4380: | |
line 4381: function! fugitive#Foldtext() abort | |
line 4423: | |
line 4424: function! fugitive#foldtext() abort | |
line 4427: | |
line 4428: augroup fugitive_folding | |
line 4429: autocmd! | |
line 4433: autocmd User Fugitive if &filetype =~# '^git\%(commit\)\=$' && &foldtext ==# 'foldtext()' | set foldtext=fugitive#Foldtext() | endif | |
line 4434: augroup END | |
line 4435: | |
line 4436: " Section: Initialization | |
line 4437: | |
line 4438: function! fugitive#Init() abort | |
line 4470: | |
line 4471: function! fugitive#is_git_dir(path) abort | |
line 4474: | |
line 4475: function! fugitive#extract_git_dir(path) abort | |
line 4478: | |
line 4479: function! fugitive#detect(path) abort | |
line 4482: | |
line 4483: " Section: End | |
finished sourcing /home/migacz/.vim/bundle/vim-fugitive/autoload/fugitive.vim | |
continuing in function FugitiveDetect | |
calling function FugitiveDetect[11]..fugitive#Init() | |
line 1: if exists('#User#FugitiveBoot') | |
line 2: try | |
line 3: let [save_mls, &modelines] = [&mls, 0] | |
line 4: doautocmd User FugitiveBoot | |
line 5: finally | |
line 6: let &mls = save_mls | |
line 7: endtry | |
line 8: endif | |
line 9: if !exists('g:fugitive_no_maps') | |
line 10: call s:map('c', '<C-R><C-G>', '<SID>fnameescape(fugitive#Object(@%))', '<expr>') | |
calling function FugitiveDetect[11]..fugitive#Init[10]..<SNR>49_map('c', '<C-R><C-G>', '<SID>fnameescape(fugitive#Object(@%))', '<expr>') | |
line 1: let flags = (a:0 ? a:1 : '') . (a:rhs =~# '<Plug>' ? '' : '<script>') | |
line 2: let head = a:lhs | |
line 3: let tail = '' | |
line 4: let keys = get(g:, a:mode.'remap', {}) | |
line 5: if type(keys) == type([]) | |
line 6: return | |
line 7: endif | |
line 8: while !empty(head) | |
line 9: if has_key(keys, head) | |
line 10: let head = keys[head] | |
line 11: if empty(head) | |
line 12: return | |
line 13: endif | |
line 14: break | |
line 15: endif | |
line 16: let tail = matchstr(head, '<[^<>]*>$\|.$') . tail | |
line 17: let head = substitute(head, '<[^<>]*>$\|.$', '', '') | |
line 18: endwhile | |
line 8: while !empty(head) | |
line 9: if has_key(keys, head) | |
line 10: let head = keys[head] | |
line 11: if empty(head) | |
line 12: return | |
line 13: endif | |
line 14: break | |
line 15: endif | |
line 16: let tail = matchstr(head, '<[^<>]*>$\|.$') . tail | |
line 17: let head = substitute(head, '<[^<>]*>$\|.$', '', '') | |
line 18: endwhile | |
line 8: while !empty(head) | |
line 9: if has_key(keys, head) | |
line 10: let head = keys[head] | |
line 11: if empty(head) | |
line 12: return | |
line 13: endif | |
line 14: break | |
line 15: endif | |
line 16: let tail = matchstr(head, '<[^<>]*>$\|.$') . tail | |
line 17: let head = substitute(head, '<[^<>]*>$\|.$', '', '') | |
line 18: endwhile | |
line 19: if flags !~# '<unique>' || empty(mapcheck(head.tail, a:mode)) | |
line 20: exe a:mode.'map <buffer>' flags head.tail a:rhs | |
line 20: cmap <buffer> <expr><script> <C-R><C-G> <SID>fnameescape(fugitive#Object(@%)) | |
line 21: if a:0 > 1 | |
line 22: let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') . '|sil! exe "' . a:mode . 'unmap <buffer> ' . head.tail . '"' | |
line 24: endif | |
line 25: endif | |
function FugitiveDetect[11]..fugitive#Init[10]..<SNR>49_map returning #0 | |
continuing in function FugitiveDetect[11]..fugitive#Init | |
line 11: call s:map('n', 'y<C-G>', ':<C-U>call setreg(v:register, fugitive#Object(@%))<CR>', '<silent>') | |
calling function FugitiveDetect[11]..fugitive#Init[11]..<SNR>49_map('n', 'y<C-G>', ':<C-U>call setreg(v:register, fugitive#Object(@%))<CR>', '<silent>') | |
line 1: let flags = (a:0 ? a:1 : '') . (a:rhs =~# '<Plug>' ? '' : '<script>') | |
line 2: let head = a:lhs | |
line 3: let tail = '' | |
line 4: let keys = get(g:, a:mode.'remap', {}) | |
line 5: if type(keys) == type([]) | |
line 6: return | |
line 7: endif | |
line 8: while !empty(head) | |
line 9: if has_key(keys, head) | |
line 10: let head = keys[head] | |
line 11: if empty(head) | |
line 12: return | |
line 13: endif | |
line 14: break | |
line 15: endif | |
line 16: let tail = matchstr(head, '<[^<>]*>$\|.$') . tail | |
line 17: let head = substitute(head, '<[^<>]*>$\|.$', '', '') | |
line 18: endwhile | |
line 8: while !empty(head) | |
line 9: if has_key(keys, head) | |
line 10: let head = keys[head] | |
line 11: if empty(head) | |
line 12: return | |
line 13: endif | |
line 14: break | |
line 15: endif | |
line 16: let tail = matchstr(head, '<[^<>]*>$\|.$') . tail | |
line 17: let head = substitute(head, '<[^<>]*>$\|.$', '', '') | |
line 18: endwhile | |
line 8: while !empty(head) | |
line 9: if has_key(keys, head) | |
line 10: let head = keys[head] | |
line 11: if empty(head) | |
line 12: return | |
line 13: endif | |
line 14: break | |
line 15: endif | |
line 16: let tail = matchstr(head, '<[^<>]*>$\|.$') . tail | |
line 17: let head = substitute(head, '<[^<>]*>$\|.$', '', '') | |
line 18: endwhile | |
line 19: if flags !~# '<unique>' || empty(mapcheck(head.tail, a:mode)) | |
line 20: exe a:mode.'map <buffer>' flags head.tail a:rhs | |
line 20: nmap <buffer> <silent><script> y<C-G> :<C-U>call setreg(v:register, fugitive#Object(@%))<CR> | |
line 21: if a:0 > 1 | |
line 22: let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') . '|sil! exe "' . a:mode . 'unmap <buffer> ' . head.tail . '"' | |
line 24: endif | |
line 25: endif | |
function FugitiveDetect[11]..fugitive#Init[11]..<SNR>49_map returning #0 | |
continuing in function FugitiveDetect[11]..fugitive#Init | |
line 12: endif | |
line 13: if expand('%:p') =~# ':[\/][\/]' | |
line 14: let &l:path = s:sub(&path, '^\.%(,|$)', '') | |
line 15: endif | |
line 16: if stridx(&tags, escape(b:git_dir, ', ')) == -1 | |
line 17: if filereadable(b:git_dir.'/tags') | |
line 18: let &l:tags = escape(b:git_dir.'/tags', ', ').','.&tags | |
line 19: endif | |
line 20: if &filetype !=# '' && filereadable(b:git_dir.'/'.&filetype.'.tags') | |
line 21: let &l:tags = escape(b:git_dir.'/'.&filetype.'.tags', ', ').','.&tags | |
line 22: endif | |
line 23: endif | |
line 24: try | |
line 25: let [save_mls, &modelines] = [&mls, 0] | |
line 26: call s:define_commands() | |
calling function FugitiveDetect[11]..fugitive#Init[26]..<SNR>49_define_commands() | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bang -nargs=? -complete=customlist,s:GitComplete Git :execute s:Git(<bang>0,'<mods>',<q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=? -complete=customlist,s:DirComplete Gcd :exe 'cd<bang>' s:fnameescape(s:DirArg(<q-args>)) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=? -complete=customlist,s:DirComplete Glcd :exe 'lcd<bang>' s:fnameescape(s:DirArg(<q-args>)) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -range=-1 Gstatus :execute s:Status(<bang>0, <count>, '<mods>') | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -range=-1 G :execute s:Status(<bang>0, <count>, '<mods>') | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -nargs=? -complete=customlist,s:CommitComplete Gcommit :execute s:Commit('<mods>', <q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -nargs=? -bang -complete=custom,s:RevisionComplete Gmerge execute s:Merge('merge', <bang>0, '<mods>', <q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -nargs=? -bang -complete=custom,s:RevisionComplete Grebase execute s:Merge('rebase', <bang>0, '<mods>', <q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -nargs=? -bang -complete=custom,s:RemoteComplete Gpull execute s:Merge('pull --progress', <bang>0, '<mods>', <q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bang -nargs=? -complete=customlist,s:GrepComplete Ggrep :execute s:Grep('grep',<bang>0,<q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bang -nargs=? -complete=customlist,s:GrepComplete Glgrep :execute s:Grep('lgrep',<bang>0,<q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -range=-1 -complete=customlist,s:GrepComplete Glog :call s:Log('grep',<bang>0,<line1>,<count>,<q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -range=-1 -complete=customlist,s:GrepComplete Gllog :call s:Log('lgrep',<bang>0,<line1>,<count>,<q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -complete=customlist,fugitive#Complete Ge execute s:Edit('edit<bang>', 0, '<mods>', <q-args>, <f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -complete=customlist,fugitive#Complete Gedit execute s:Edit('edit<bang>', 0, '<mods>', <q-args>, <f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gpedit execute s:Edit('pedit', <bang>0, '<mods>', <q-args>, <f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -range=0 -complete=customlist,s:EditRunComplete Gsplit execute s:Edit((<count> ? <count> : '').'split', <bang>0, '<mods>', <q-args>, <f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -range=0 -complete=customlist,s:EditRunComplete Gvsplit execute s:Edit((<count> ? <count> : '').'vsplit', <bang>0, '<mods>', <q-args>, <f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -range=0 -complete=customlist,s:EditRunComplete -addr=tabs Gtabedit execute s:Edit((<count> ? <count> : '').'tabedit', <bang>0, '<mods>', <q-args>, <f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -range=-1 -complete=customlist,s:EditRunComplete Gread execute s:Read(<count>, <line1>, <line2>, +'<range>', <bang>0, '<mods>', <q-args>, <f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -complete=customlist,fugitive#Complete Gwrite :execute s:Write(<bang>0,<f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -complete=customlist,fugitive#Complete Gw :execute s:Write(<bang>0,<f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -nargs=* -complete=customlist,fugitive#Complete Gwq :execute s:Wq(<bang>0,<f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -nargs=? -bang -complete=custom,s:RemoteComplete Gpush execute s:Dispatch('<bang>', 'push '.<q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -nargs=? -bang -complete=custom,s:RemoteComplete Gfetch execute s:Dispatch('<bang>', 'fetch '.<q-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bang -bar -nargs=* -complete=customlist,fugitive#Complete Gdiff :execute s:Diff('',<bang>0,<f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bang -bar -nargs=* -complete=customlist,fugitive#Complete Gvdiff :execute s:Diff('keepalt vert ',<bang>0,<f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bang -bar -nargs=* -complete=customlist,fugitive#Complete Gsdiff :execute s:Diff('keepalt ',<bang>0,<f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 2: command! -buffer -bar -bang -range=0 -nargs=* -complete=customlist,fugitive#Complete Gbrowse :execute s:Browse(<bang>0,<line1>,<count>,<f-args>) | |
line 3: endfor | |
line 1: for command in s:commands | |
line 2: exe 'command! -buffer '.command | |
line 3: endfor | |
function FugitiveDetect[11]..fugitive#Init[26]..<SNR>49_define_commands returning #0 | |
continuing in function FugitiveDetect[11]..fugitive#Init | |
line 27: doautocmd User Fugitive | |
Executing User Autocommands for "Fugitive" | |
autocommand if s:DirCommitFile(@%)[1] =~# '^0\=$' | exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,fugitive#PathComplete Gmove :execute s:Move(<bang>0,0,<q-args>)" | exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,s:RenameComplete Grename :execute s:Move(<bang>0,1,<q-args>)" | exe "command! -buffer -bar -bang Gremove :execute s:Remove('edit',<bang>0)" | exe "command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0)" | endif | |
line 0: if s:DirCommitFile(@%)[1] =~# '^0\=$' | exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,fugitive#PathComplete Gmove :execute s:Move(<bang>0,0,<q-args>)" | exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,s:RenameComplete Grename :execute s:Move(<bang>0,1,<q-args>)" | exe "command! -buffer -bar -bang Gremove :execute s:Remove('edit',<bang>0)" | exe "command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0)" | endif | |
calling function <SNR>49_DirCommitFile('login.html') | |
line 1: let vals = matchlist(s:Slash(a:path), '\c^fugitive:\%(//\)\=\(.\{-\}\)\%(//\|::\)\(\x\{40\}\|[0-3]\)\(/.*\)\=$') | |
calling function <SNR>49_DirCommitFile[1]..<SNR>49_Slash('login.html') | |
line 1: if exists('+shellslash') | |
line 2: return tr(a:path, '\', '/') | |
line 3: else | |
line 4: return a:path | |
function <SNR>49_DirCommitFile[1]..<SNR>49_Slash returning 'login.html' | |
continuing in function <SNR>49_DirCommitFile | |
line 2: if empty(vals) | |
line 3: return ['', '', ''] | |
function <SNR>49_DirCommitFile returning ['', '', ''] | |
continuing in User Autocommands for "Fugitive" | |
line 0: exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,fugitive#PathComplete Gmove :execute s:Move(<bang>0,0,<q-args>)" | exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,s:RenameComplete Grename :execute s:Move(<bang>0,1,<q-args>)" | exe "command! -buffer -bar -bang Gremove :execute s:Remove('edit',<bang>0)" | exe "command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0)" | endif | |
line 0: command! -buffer -bar -bang -nargs=1 -complete=customlist,fugitive#PathComplete Gmove :execute s:Move(<bang>0,0,<q-args>) | |
line 0: exe "command! -buffer -bar -bang -nargs=1 -complete=customlist,s:RenameComplete Grename :execute s:Move(<bang>0,1,<q-args>)" | exe "command! -buffer -bar -bang Gremove :execute s:Remove('edit',<bang>0)" | exe "command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0)" | endif | |
line 0: command! -buffer -bar -bang -nargs=1 -complete=customlist,s:RenameComplete Grename :execute s:Move(<bang>0,1,<q-args>) | |
line 0: exe "command! -buffer -bar -bang Gremove :execute s:Remove('edit',<bang>0)" | exe "command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0)" | endif | |
line 0: command! -buffer -bar -bang Gremove :execute s:Remove('edit',<bang>0) | |
line 0: exe "command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0)" | endif | |
line 0: command! -buffer -bar -bang Gdelete :execute s:Remove('bdelete',<bang>0) | |
line 0: endif | |
Executing User Autocommands for "Fugitive" | |
autocommand if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' || filereadable(@%) | exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:Blame(<bang>0,<line1>,<line2>,<count>,'<mods>',[<f-args>])" | endif | |
line 0: if get(b:, 'fugitive_type') =~# '^\%(file\|blob\|blame\)$' || filereadable(@%) | exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:Blame(<bang>0,<line1>,<line2>,<count>,'<mods>',[<f-args>])" | endif | |
line 0: exe "command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:Blame(<bang>0,<line1>,<line2>,<count>,'<mods>',[<f-args>])" | endif | |
line 0: command! -buffer -bar -bang -range=0 -nargs=* Gblame :execute s:Blame(<bang>0,<line1>,<line2>,<count>,'<mods>',[<f-args>]) | |
line 0: endif | |
Executing User Autocommands for "Fugitive" | |
autocommand if &filetype =~# '^git\%(commit\)\=$' && &foldtext ==# 'foldtext()' | set foldtext=fugitive#Foldtext() | endif | |
line 0: if &filetype =~# '^git\%(commit\)\=$' && &foldtext ==# 'foldtext()' | set foldtext=fugitive#Foldtext() | endif | |
line 0: set foldtext=fugitive#Foldtext() | endif | |
line 0: endif | |
line 28: finally | |
line 29: let &mls = save_mls | |
line 30: endtry | |
function FugitiveDetect[11]..fugitive#Init returning #0 | |
continuing in function FugitiveDetect | |
function FugitiveDetect returning #0 | |
continuing in BufRead Autocommands for "*" | |
Executing BufWinEnter Autocommands for "*" | |
autocommand if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 1 | call s:diffoff() | endif | |
line 0: if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 1 | call s:diffoff() | endif | |
calling function <SNR>49_can_diffoff(1) | |
line 1: return getwinvar(bufwinnr(a:buf), '&diff') && !empty(getbufvar(a:buf, 'git_dir')) && !empty(getwinvar(bufwinnr(a:buf), 'fugitive_diff_restore')) | |
function <SNR>49_can_diffoff returning #0 | |
continuing in BufWinEnter Autocommands for "*" | |
line 0: call s:diffoff() | endif | |
line 0: endif | |
Executing BufEnter Autocommands for "*" | |
autocommand sil call s:LocalBrowse(expand("<amatch>")) | |
line 0: sil call s:LocalBrowse(expand("<amatch>")) | |
calling function <SNR>28_LocalBrowse('/home/migacz/Coding/www/4Project/templates/login.html') | |
line 1: " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here. | |
line 2: " Otherwise, the BufEnter event gets triggered when attempts to write to | |
line 3: " the DBG buffer are made. | |
line 4: | |
line 5: if !exists("s:vimentered") | |
line 6: " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, | |
line 7: " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. | |
line 8: " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") | |
line 9: " call Dret("s:LocalBrowse") | |
line 10: return | |
function <SNR>28_LocalBrowse returning #0 | |
continuing in BufEnter Autocommands for "*" | |
Executing BufEnter Autocommands for "*" | |
autocommand if exists('s:rebase_continue') | exe s:Merge('rebase', 0, '', getfsize(fugitive#Find('.git/rebase-merge/git-rebase-todo', s:rebase_continue)) > 0 ? '--continue' : '--abort', remove(s:, 'rebase_continue')) | endif | |
line 0: if exists('s:rebase_continue') | exe s:Merge('rebase', 0, '', getfsize(fugitive#Find('.git/rebase-merge/git-rebase-todo', s:rebase_continue)) > 0 ? '--continue' : '--abort', remove(s:, 'rebase_continue')) | endif | |
line 0: exe s:Merge('rebase', 0, '', getfsize(fugitive#Find('.git/rebase-merge/git-rebase-todo', s:rebase_continue)) > 0 ? '--continue' : '--abort', remove(s:, 'rebase_continue')) | endif | |
line 0: endif | |
Executing VimEnter Autocommands for "*" | |
autocommand if empty(expand('<amatch>'))|call FugitiveDetect(getcwd())|endif | |
line 0: if empty(expand('<amatch>'))|call FugitiveDetect(getcwd())|endif | |
line 0: call FugitiveDetect(getcwd())|endif | |
line 0: endif | |
Executing VimEnter Autocommands for "*" | |
autocommand sil call s:VimEnter(expand("<amatch>")) | |
line 0: sil call s:VimEnter(expand("<amatch>")) | |
calling function <SNR>28_VimEnter('/home/migacz/Coding/www/4Project/templates/login.html') | |
line 1: " call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">") | |
line 2: let curwin = winnr() | |
line 3: let s:vimentered = 1 | |
line 4: windo call s:LocalBrowse(expand("%:p")) | |
line 4: call s:LocalBrowse(expand("%:p")) | |
calling function <SNR>28_VimEnter[4]..<SNR>28_LocalBrowse('/home/migacz/Coding/www/4Project/templates/login.html') | |
line 1: " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here. | |
line 2: " Otherwise, the BufEnter event gets triggered when attempts to write to | |
line 3: " the DBG buffer are made. | |
line 4: | |
line 5: if !exists("s:vimentered") | |
line 6: " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, | |
line 7: " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. | |
line 8: " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") | |
line 9: " call Dret("s:LocalBrowse") | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")") | |
line 14: | |
line 15: if has("amiga") | |
line 16: " The check against '' is made for the Amiga, where the empty | |
line 17: " string is the current directory and not checking would break | |
line 18: " things such as the help command. | |
line 19: " call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)") | |
line 20: if a:dirname != '' && isdirectory(a:dirname) | |
line 21: sil! call netrw#LocalBrowseCheck(a:dirname) | |
line 22: if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt | |
line 23: exe w:netrw_bannercnt | |
line 24: endif | |
line 25: endif | |
line 26: | |
line 27: elseif isdirectory(a:dirname) | |
line 28: " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") | |
line 29: " call Dredir("LocalBrowse ft last set: ","verbose set ft") | |
line 30: " call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
line 31: sil! call netrw#LocalBrowseCheck(a:dirname) | |
line 32: " call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
line 33: if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt | |
line 34: exe w:netrw_bannercnt | |
line 35: " call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
line 36: endif | |
line 37: | |
line 38: else | |
line 39: " not a directory, ignore it | |
line 40: " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") | |
line 41: endif | |
line 42: " call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
line 43: | |
line 44: " call Dret("s:LocalBrowse") | |
function <SNR>28_VimEnter[4]..<SNR>28_LocalBrowse returning #0 | |
continuing in function <SNR>28_VimEnter | |
line 5: exe curwin."wincmd w" | |
line 5: 1wincmd w | |
line 6: " call Dret("s:VimEnter") | |
function <SNR>28_VimEnter returning #0 | |
continuing in VimEnter Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
"login.html" 35 lines --2%-- | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
-- INSERT -- | |
Executing CursorMovedI Autocommands for "*" | |
autocommand if pumvisible() == 0|pclose|endif | |
line 0: if pumvisible() == 0|pclose|endif | |
line 0: pclose|endif | |
line 0: endif | |
Executing CursorMovedI Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMovedI Autocommands for "*" | |
Executing TextChangedI Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in TextChangedI Autocommands for "*" | |
Executing CursorMovedI Autocommands for "*" | |
autocommand if pumvisible() == 0|pclose|endif | |
line 0: if pumvisible() == 0|pclose|endif | |
line 0: pclose|endif | |
line 0: endif | |
Executing CursorMovedI Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMovedI Autocommands for "*" | |
Executing TextChangedI Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in TextChangedI Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
"login.html" [Modified] 35 lines --40%-- | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
Executing CursorMoved Autocommands for "*" | |
autocommand call s:Highlight_Matching_Pair() | |
line 0: call s:Highlight_Matching_Pair() | |
calling function <SNR>27_Highlight_Matching_Pair() | |
line 1: " Remove any previous match. | |
line 2: if exists('w:paren_hl_on') && w:paren_hl_on | |
line 3: silent! call matchdelete(3) | |
line 4: let w:paren_hl_on = 0 | |
line 5: endif | |
line 6: | |
line 7: " Avoid that we remove the popup menu. | |
line 8: " Return when there are no colors (looks like the cursor jumps). | |
line 9: if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
line 10: return | |
line 11: endif | |
line 12: | |
line 13: " Get the character under the cursor and check if it's in 'matchpairs'. | |
line 14: let c_lnum = line('.') | |
line 15: let c_col = col('.') | |
line 16: let before = 0 | |
line 17: | |
line 18: let text = getline(c_lnum) | |
line 19: let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
line 20: if empty(matches) | |
line 21: let [c_before, c] = ['', ''] | |
line 22: else | |
line 23: let [c_before, c] = matches[1:2] | |
line 24: endif | |
line 25: let plist = split(&matchpairs, '.\zs[:,]') | |
line 26: let i = index(plist, c) | |
line 27: if i < 0 | |
line 28: " not found, in Insert mode try character before the cursor | |
line 29: if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
line 30: let before = strlen(c_before) | |
line 31: let c = c_before | |
line 32: let i = index(plist, c) | |
line 33: endif | |
line 34: if i < 0 | |
line 35: " not found, nothing to do | |
line 36: return | |
line 37: endif | |
line 38: endif | |
line 39: | |
line 40: " Figure out the arguments for searchpairpos(). | |
line 41: if i % 2 == 0 | |
line 42: let s_flags = 'nW' | |
line 43: let c2 = plist[i + 1] | |
line 44: else | |
line 45: let s_flags = 'nbW' | |
line 46: let c2 = c | |
line 47: let c = plist[i - 1] | |
line 48: endif | |
line 49: if c == '[' | |
line 50: let c = '\[' | |
line 51: let c2 = '\]' | |
line 52: endif | |
line 53: | |
line 54: " Find the match. When it was just before the cursor move it there for a | |
line 55: " moment. | |
line 56: if before > 0 | |
line 57: let has_getcurpos = exists("*getcurpos") | |
line 58: if has_getcurpos | |
line 59: " getcurpos() is more efficient but doesn't exist before 7.4.313. | |
line 60: let save_cursor = getcurpos() | |
line 61: else | |
line 62: let save_cursor = winsaveview() | |
line 63: endif | |
line 64: call cursor(c_lnum, c_col - before) | |
line 65: endif | |
line 66: | |
line 67: if !has("syntax") || !exists("g:syntax_on") | |
line 68: let s_skip = "0" | |
line 69: else | |
line 70: " Build an expression that detects whether the current cursor position is | |
line 71: " in certain syntax types (string, comment, etc.), for use as | |
line 72: " searchpairpos()'s skip argument. | |
line 73: " We match "escape" for special items, such as lispEscapeSpecial. | |
line 74: let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
line 76: " If executing the expression determines that the cursor is currently in | |
line 77: " one of the syntax types, then we want searchpairpos() to find the pair | |
line 78: " within those syntax types (i.e., not skip). Otherwise, the cursor is | |
line 79: " outside of the syntax types and s_skip should keep its value so we skip | |
line 80: " any matching pair inside the syntax types. | |
line 81: " Catch if this throws E363: pattern uses more memory than 'maxmempattern'. | |
line 82: try | |
line 83: execute 'if ' . s_skip . ' | let s_skip = "0" | endif' | |
line 83: if !empty(filter(map(synstack(line("."), col(".")), 'synIDattr(v:val, "name")'), 'v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"')) | let s_skip = "0" | endif | |
line 83: let s_skip = "0" | endif | |
line 83: endif | |
line 84: catch /^Vim\%((\a\+)\)\=:E363/ | |
line 85: " We won't find anything, so skip searching, should keep Vim responsive. | |
line 86: return | |
line 87: endtry | |
line 88: endif | |
line 89: | |
line 90: " Limit the search to lines visible in the window. | |
line 91: let stoplinebottom = line('w$') | |
line 92: let stoplinetop = line('w0') | |
line 93: if i % 2 == 0 | |
line 94: let stopline = stoplinebottom | |
line 95: else | |
line 96: let stopline = stoplinetop | |
line 97: endif | |
line 98: | |
line 99: " Limit the search time to 300 msec to avoid a hang on very long lines. | |
line 100: " This fails when a timeout is not supported. | |
line 101: if mode() == 'i' || mode() == 'R' | |
line 102: let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
line 103: else | |
line 104: let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
line 105: endif | |
line 106: try | |
line 107: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
line 108: catch /E118/ | |
line 109: " Can't use the timeout, restrict the stopline a bit more to avoid taking | |
line 110: " a long time on closed folds and long lines. | |
line 111: " The "viewable" variables give a range in which we can scroll while | |
line 112: " keeping the cursor at the same position. | |
line 113: " adjustedScrolloff accounts for very large numbers of scrolloff. | |
line 114: let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
line 115: let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
line 116: let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
line 117: " one of these stoplines will be adjusted below, but the current values are | |
line 118: " minimal boundaries within the current window | |
line 119: if i % 2 == 0 | |
line 120: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 121: ^Ilet stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
line 122: ^Ilet stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
line 123: else | |
line 124: ^Ilet stopline = min([bottom_viewable, c_lnum + 100]) | |
line 125: endif | |
line 126: let stoplinebottom = stopline | |
line 127: else | |
line 128: if has("byte_offset") && has("syntax_items") && &smc > 0 | |
line 129: ^Ilet stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
line 130: ^Ilet stopline = max([top_viewable, byte2line(stopbyte)]) | |
line 131: else | |
line 132: ^Ilet stopline = max([top_viewable, c_lnum - 100]) | |
line 133: endif | |
line 134: let stoplinetop = stopline | |
line 135: endif | |
line 136: let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
line 137: endtry | |
line 138: | |
line 139: if before > 0 | |
line 140: if has_getcurpos | |
line 141: call setpos('.', save_cursor) | |
line 142: else | |
line 143: call winrestview(save_cursor) | |
line 144: endif | |
line 145: endif | |
line 146: | |
line 147: " If a match is found setup match highlighting. | |
line 148: if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
line 149: if exists('*matchaddpos') | |
line 150: call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
line 151: else | |
line 152: exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
line 154: endif | |
line 155: let w:paren_hl_on = 1 | |
line 156: endif | |
function <SNR>27_Highlight_Matching_Pair returning #0 | |
continuing in CursorMoved Autocommands for "*" | |
E37: No write since last change (add ! to override) | |
Executing BufWinLeave Autocommands for "*" | |
autocommand if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 2 | call s:diffoff_all(getbufvar(+expand('<abuf>'), 'git_dir')) | endif | |
line 0: if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 2 | call s:diffoff_all(getbufvar(+expand('<abuf>'), 'git_dir')) | endif | |
calling function <SNR>49_can_diffoff(1) | |
line 1: return getwinvar(bufwinnr(a:buf), '&diff') && !empty(getbufvar(a:buf, 'git_dir')) && !empty(getwinvar(bufwinnr(a:buf), 'fugitive_diff_restore')) | |
function <SNR>49_can_diffoff returning #0 | |
continuing in BufWinLeave Autocommands for "*" | |
line 0: call s:diffoff_all(getbufvar(+expand('<abuf>'), 'git_dir')) | endif | |
line 0: endif | |
Executing BufWinLeave Autocommands for "*" | |
autocommand execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave') | |
line 0: execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave') | |
line 0: | |
Writing viminfo file "/home/migacz/.viminfo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment