Commits

ZyX_I committed 30f3340

@/commands, @/mappings: Made them use isftplugin key

  • Participants
  • Parent commits 2eb6fda

Comments (0)

Files changed (2)

File plugin/frawor/commands.vim

                 \'funs': [],
                 \  'fs': {},
                 \}
-    if a:plugdict.type is# 'ftplugin'
-        let cmd.filetype=matchstr(a:plugdict.id, '\v^[^/]*', 9)
+    if a:plugdict.isftplugin
+        let cmd.filetype=matchstr(a:plugdict.id, '\v\/@<=[^/]+')
     endif
     let cmdstring=''
     let addargs=[]
     let cmd.rsp=s:F.getspfunc(a:plugdict.id, a:cid, a:copts, 'r')
     "▶3 Create :command -options
     for [key, value] in sort(items(s:cmddefaults))
-        if a:plugdict.type is# 'ftplugin' && key is# 'buffer'
+        if a:plugdict.isftplugin && key is# 'buffer'
             let value=1
         elseif has_key(a:copts, key)
             "▶4 Completion

File plugin/frawor/mappings.vim

                     \    'sid': a:plugdict.sid,
                     \   'maps': {},
                     \ 'leader': '',
-                    \ 'buffer': (a:plugdict.type is# 'ftplugin'),
+                    \ 'buffer': a:plugdict.isftplugin,
                     \ 'nouser': (mgid[0] is# '_'),
                     \'dontmap': 0,}
         "▶3 Add options: presence -> mgroup (nouser, dontmap, buffer)
         "▲4
     endif
     "▶3 filetype
-    if !mgroup.dontmap && a:plugdict.type is# 'ftplugin'
-        let mgroup.filetype=matchstr(a:plugdict.id, '\v^[^/]*', 9)
+    if !mgroup.dontmap && a:plugdict.isftplugin
+        let mgroup.filetype=matchstr(a:plugdict.id, '\v\/@<=[^/]+')
         let mgroup.dontmap=1
     endif
     "▲3