📄 psf.vim
字号:
" Vim syntax file" Language: Software Distributor product specification file" (POSIX 1387.2-1995)." Maintainer: Rex Barzee <rex_barzee@hp.com>" Last change: 25 Apr 2001if version < 600 " Remove any old syntax stuff hanging around syn clearelseif exists("b:current_syntax") finishendif" Product specification files are case sensitivesyn case matchsyn keyword psfObject bundle category control_file depot distributionsyn keyword psfObject end file fileset host installed_software mediasyn keyword psfObject product root subproduct vendorsyn match psfUnquotString +[^"# ][^#]*+ containedsyn region psfQuotString start=+"+ skip=+\\"+ end=+"+ containedsyn match psfObjTag "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*" containedsyn match psfAttAbbrev ",\<\(fa\|fr\|[aclqrv]\)\(<\|>\|<=\|>=\|=\|==\)[^,]\+" containedsyn match psfObjTags "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\(\s\+\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\)*" containedsyn match psfNumber "\<\d\+\>" containedsyn match psfFloat "\<\d\+\>\(\.\<\d\+\>\)*" containedsyn match psfLongDate "\<\d\d\d\d\d\d\d\d\d\d\d\d\.\d\d\>" containedsyn keyword psfState available configured corrupt installed transient containedsyn keyword psfPState applied committed superseded containedsyn keyword psfBoolean false true contained"Some of the attributes covered by attUnquotString and attQuotString:" architecture category_tag control_directory copyright" create_date description directory file_permissions install_source" install_type location machine_type mod_date number os_name os_release" os_version pose_as_os_name pose_as_os_release readme revision" share_link title vendor_tagsyn region psfAttUnquotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+[^#" ]~rs=e-1 contains=psfUnquotString,psfComment end=~$~ keepend onelinesyn region psfAttQuotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+"~rs=e-1 contains=psfQuotString,psfComment skip=~\\"~ matchgroup=psfQuotString end=~"~ keepend" These regions are defined in attempt to do syntax checking for some" of the attributes.syn region psfAttTag matchgroup=psfAttrib start="^\s*tag\s\+" contains=psfObjTag,psfComment end="$" keepend onelinesyn region psfAttSpec matchgroup=psfAttrib start="^\s*\(ancestor\|applied_patches\|applied_to\|contents\|corequisites\|exrequisites\|prerequisites\|software_spec\|supersedes\|superseded_by\)\s\+" contains=psfObjTag,psfAttAbbrev,psfComment end="$" keependsyn region psfAttTags matchgroup=psfAttrib start="^\s*all_filesets\s\+" contains=psfObjTags,psfComment end="$" keependsyn region psfAttNumber matchgroup=psfAttrib start="^\s*\(compressed_size\|instance_id\|media_sequence_number\|sequence_number\|size\)\s\+" contains=psfNumber,psfComment end="$" keepend onelinesyn region psfAttTime matchgroup=psfAttrib start="^\s*\(create_time\|ctime\|mod_time\|mtime\|timestamp\)\s\+" contains=psfNumber,psfComment end="$" keepend onelinesyn region psfAttFloat matchgroup=psfAttrib start="^\s*\(data_model_revision\|layout_version\)\s\+" contains=psfFloat,psfComment end="$" keepend onelinesyn region psfAttLongDate matchgroup=psfAttrib start="^\s*install_date\s\+" contains=psfLongDate,psfComment end="$" keepend onelinesyn region psfAttState matchgroup=psfAttrib start="^\s*\(state\)\s\+" contains=psfState,psfComment end="$" keepend onelinesyn region psfAttPState matchgroup=psfAttrib start="^\s*\(patch_state\)\s\+" contains=psfPState,psfComment end="$" keepend onelinesyn region psfAttBoolean matchgroup=psfAttrib start="^\s*\(is_kernel\|is_locatable\|is_patch\|is_protected\|is_reboot\|is_reference\|is_secure\|is_sparse\)\s\+" contains=psfBoolean,psfComment end="$" keepend onelinesyn match psfComment "#.*$"" Define the default highlighting." For version 5.7 and earlier: only when not done already" For version 5.8 and later: only when an item doesn't have highlighting yetif version >= 508 || !exists("did_psf_syntax_inits") if version < 508 let did_psf_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink psfObject Statement HiLink psfAttrib Type HiLink psfQuotString String HiLink psfObjTag Identifier HiLink psfAttAbbrev PreProc HiLink psfObjTags Identifier HiLink psfComment Comment delcommand HiLinkendif" Long descriptions and copyrights confuse the syntax highlighting, so" force vim to backup at least 100 lines before the top visible line" looking for a sync location.syn sync lines=100let b:current_syntax = "psf"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -