I recently started using gentoo distribution. I have used xptemplates for some time. Gentoo is so kind(or not so kind) that it distributes vim files for its specific files but not so kind to change filetype to sth like gentoo-*. For example vi /etc/make.conf -c":echo &ft" will yeld gentoo-make-conf.
This causes problem with xptemplates because It can't find matching file type. Problem code file: plugin/classes/FiletypeScope.vim line 29 (in my git version) fun! s:SetSnippetLoaded( filename ) dict "{{{ let self.loadedSnipFiles[ a:filename ] = 1
let fn = substitute(a:filename, '\\', '/', 'g') let shortname = matchstr(fn, '\Vftplugin\/\zs\w\+\/\.\*\ze.xpt.vim') let self.loadedSnipFiles[shortname] = endfunction "}}}
I the same is for 0.4.8.1220. One solution is patch below, it may fix some other problems. Second is to add some gentoo file matching to xptemplates .
On Sun, Jan 8, 2012 at 7:47 PM, Krzysztof <krzysztof.ka...@gmail.com> wrote: > Hi,
> I recently started using gentoo distribution. > I have used xptemplates for some time. > Gentoo is so kind(or not so kind) that it distributes vim files for > its specific files but not so kind to change filetype to sth like > gentoo-*. > For example vi /etc/make.conf -c":echo &ft" > will yeld gentoo-make-conf.
> This causes problem with xptemplates because It can't find matching > file type. > Problem code > file: plugin/classes/FiletypeScope.vim line 29 (in my git version) > fun! s:SetSnippetLoaded( filename ) dict "{{{ > let self.loadedSnipFiles[ a:filename ] = 1
> let fn = substitute(a:filename, '\\', '/', 'g') > let shortname = matchstr(fn, '\Vftplugin\/\zs\w\+\/\.\*\ze.xpt.vim') > let self.loadedSnipFiles[shortname] = > endfunction "}}}
> I the same is for 0.4.8.1220. > One solution is patch below, it may fix some other problems. > Second is to add some gentoo file matching to xptemplates .
> let fn = substitute(a:filename, '\\', '/', 'g') > let shortname = matchstr(fn,'\Vftplugin\/\zs\w\+\/\.\*\ze.xpt.vim') > - let self.loadedSnipFiles[shortname] = 1 > + if ( shortname != "" ) > + let self.loadedSnipFiles[shortname] = 1 > + endif > endfunction "}}}
> -- > You received this message because you are subscribed to the Google Groups > "xptemplate" group. > To post to this group, send email to xptemplate@googlegroups.com. > To unsubscribe from this group, send email to > xptemplate+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/xptemplate?hl=en.
provide syntax highlighting. But using the xptemplates at first time for that file results in error:
Error detected while processing function XPTemplateStart..<SNR>52_GetContextFTObj..XPTsnippetFileInit..<SNR>37_Check AndSetSnippetLoaded..<SNR>37_SetSnippetLoaded: line 6: E713: Cannot use empty key for Dictionary
after that everything is ok. I can send you the file in question if you want.
dr-dr xp <drdr...@gmail.com> wrote: > I'm going to have a try within gentoo. According to your description > xpt fails to extract short name of plugin file, right?
> Downloading ISO..
> On Sun, Jan 8, 2012 at 7:47 PM, Krzysztof <krzysztof.ka...@gmail.com> > wrote:
> > Hi,
> > I recently started using gentoo distribution. > > I have used xptemplates for some time. > > Gentoo is so kind(or not so kind) that it distributes vim files for > > its specific files but not so kind to change filetype to sth like > > gentoo-*. > > For example vi /etc/make.conf -c":echo &ft" > > will yeld gentoo-make-conf.
> > This causes problem with xptemplates because It can't find matching > > file type. > > Problem code > > file: plugin/classes/FiletypeScope.vim line 29 (in my git version) > > fun! s:SetSnippetLoaded( filename ) dict "{{{ > > let self.loadedSnipFiles[ a:filename ] = 1
> > let fn = substitute(a:filename, '\\', '/', 'g') > > let shortname = matchstr(fn, > > '\Vftplugin\/\zs\w\+\/\.\*\ze.xpt.vim') let > > self.loadedSnipFiles[shortname] = endfunction "}}}
> > I the same is for 0.4.8.1220. > > One solution is patch below, it may fix some other problems. > > Second is to add some gentoo file matching to xptemplates .
> > let fn = substitute(a:filename, '\\', '/', 'g') > > let shortname = > > matchstr(fn,'\Vftplugin\/\zs\w\+\/\.\*\ze.xpt.vim') > > - let self.loadedSnipFiles[shortname] = 1 > > + if ( shortname != "" ) > > + let self.loadedSnipFiles[shortname] = 1 > > + endif > > endfunction "}}}
> > -- > > You received this message because you are subscribed to the Google > > Groups "xptemplate" group. > > To post to this group, send email to xptemplate@googlegroups.com. > > To unsubscribe from this group, send email to > > xptemplate+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/xptemplate?hl=en.
> provide syntax highlighting. > But using the xptemplates at first time for that file results in error:
> Error detected while processing function
> XPTemplateStart..<SNR>52_GetContextFTObj..XPTsnippetFileInit..<SNR>37_Check AndSetSnippetLoaded..<SNR>37_SetSnippetLoaded: > line 6: E713: Cannot use empty key for Dictionary
> after that everything is ok. > I can send you the file in question if you want.
> On Wed, 11 Jan 2012 10:41:09 +0800 > dr-dr xp <drdr...@gmail.com> wrote:
> > I'm going to have a try within gentoo. According to your description > > xpt fails to extract short name of plugin file, right?
> > Downloading ISO..
> > On Sun, Jan 8, 2012 at 7:47 PM, Krzysztof <krzysztof.ka...@gmail.com> > > wrote:
> > > Hi,
> > > I recently started using gentoo distribution. > > > I have used xptemplates for some time. > > > Gentoo is so kind(or not so kind) that it distributes vim files for > > > its specific files but not so kind to change filetype to sth like > > > gentoo-*. > > > For example vi /etc/make.conf -c":echo &ft" > > > will yeld gentoo-make-conf.
> > > This causes problem with xptemplates because It can't find matching > > > file type. > > > Problem code > > > file: plugin/classes/FiletypeScope.vim line 29 (in my git version) > > > fun! s:SetSnippetLoaded( filename ) dict "{{{ > > > let self.loadedSnipFiles[ a:filename ] = 1
> > > let fn = substitute(a:filename, '\\', '/', 'g') > > > let shortname = matchstr(fn, > > > '\Vftplugin\/\zs\w\+\/\.\*\ze.xpt.vim') let > > > self.loadedSnipFiles[shortname] = endfunction "}}}
> > > I the same is for 0.4.8.1220. > > > One solution is patch below, it may fix some other problems. > > > Second is to add some gentoo file matching to xptemplates .
> > > -- > > > You received this message because you are subscribed to the Google > > > Groups "xptemplate" group. > > > To post to this group, send email to xptemplate@googlegroups.com. > > > To unsubscribe from this group, send email to > > > xptemplate+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > > http://groups.google.com/group/xptemplate?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "xptemplate" group. > To post to this group, send email to xptemplate@googlegroups.com. > To unsubscribe from this group, send email to > xptemplate+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/xptemplate?hl=en.
> > provide syntax highlighting. > > But using the xptemplates at first time for that file results in > > error:
> > Error detected while processing function
> > XPTemplateStart..<SNR>52_GetContextFTObj..XPTsnippetFileInit..<SNR>37_Check AndSetSnippetLoaded..<SNR>37_SetSnippetLoaded: > > line 6: E713: Cannot use empty key for Dictionary
> > after that everything is ok. > > I can send you the file in question if you want.
> > On Wed, 11 Jan 2012 10:41:09 +0800 > > dr-dr xp <drdr...@gmail.com> wrote:
> > > I'm going to have a try within gentoo. According to your > > > description xpt fails to extract short name of plugin file, right?
> > > Downloading ISO..
> > > On Sun, Jan 8, 2012 at 7:47 PM, Krzysztof > > > <krzysztof.ka...@gmail.com> wrote:
> > > > Hi,
> > > > I recently started using gentoo distribution. > > > > I have used xptemplates for some time. > > > > Gentoo is so kind(or not so kind) that it distributes vim > > > > files for its specific files but not so kind to change > > > > filetype to sth like gentoo-*. > > > > For example vi /etc/make.conf -c":echo &ft" > > > > will yeld gentoo-make-conf.
> > > > This causes problem with xptemplates because It can't find > > > > matching file type. > > > > Problem code > > > > file: plugin/classes/FiletypeScope.vim line 29 (in my git > > > > version) fun! s:SetSnippetLoaded( filename ) dict "{{{ > > > > let self.loadedSnipFiles[ a:filename ] = 1
> > > > I the same is for 0.4.8.1220. > > > > One solution is patch below, it may fix some other problems. > > > > Second is to add some gentoo file matching to xptemplates .
> > > > -- > > > > You received this message because you are subscribed to the > > > > Google Groups "xptemplate" group. > > > > To post to this group, send email to > > > > xptemplate@googlegroups.com. To unsubscribe from this group, > > > > send email to xptemplate+unsubscribe@googlegroups.com. > > > > For more options, visit this group at > > > > http://groups.google.com/group/xptemplate?hl=en.
> > -- > > You received this message because you are subscribed to the Google > > Groups "xptemplate" group. > > To post to this group, send email to xptemplate@googlegroups.com. > > To unsubscribe from this group, send email to > > xptemplate+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/xptemplate?hl=en.