Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Gentoo syntax files and xptemplates
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Krzysztof  
View profile  
 More options Jan 8 2012, 6:47 am
From: Krzysztof <krzysztof.ka...@gmail.com>
Date: Sun, 8 Jan 2012 12:47:59 +0100
Local: Sun, Jan 8 2012 6:47 am
Subject: Gentoo syntax files and xptemplates
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 .

Proposed patch :
diff --git a/plugin/classes/FiletypeScope.vim
b/plugin/classes/FiletypeScope.vim index 8a3b96f..a37c2d6 100644
--- a/plugin/classes/FiletypeScope.vim
+++ b/plugin/classes/FiletypeScope.vim
@@ -31,7 +31,9 @@ fun! s:SetSnippetLoaded( filename ) dict "{{{

     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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile   Translate to Translated (View Original)
 More options Jan 10 2012, 9:41 pm
From: dr-dr xp <drdr...@gmail.com>
Date: Wed, 11 Jan 2012 10:41:09 +0800
Local: Tues, Jan 10 2012 9:41 pm
Subject: Re: Gentoo syntax files and xptemplates

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..

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krzysztof  
View profile  
 More options Jan 11 2012, 1:16 pm
From: Krzysztof <krzysztof.ka...@gmail.com>
Date: Wed, 11 Jan 2012 19:16:49 +0100
Local: Wed, Jan 11 2012 1:16 pm
Subject: Re: Gentoo syntax files and xptemplates
Don't think ISO and whole system is needed.
Gentoo ships some files like

/usr/share/vim/vimfiles/ftdetect/gentoo.vim

which in turn provide some additional functionality for system
configuration files.
The one above contains:

" make.conf
au BufNewFile,BufRead make.{conf,globals}
    \     set filetype=gentoo-make-conf

second ones like

/usr/share/vim/vimfiles/syntax/gentoo-make-conf.vim

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile  
 More options Jan 12 2012, 12:45 pm
From: dr-dr xp <drdr...@gmail.com>
Date: Fri, 13 Jan 2012 01:45:22 +0800
Local: Thurs, Jan 12 2012 12:45 pm
Subject: Re: Gentoo syntax files and xptemplates

oh i see.

I've used too strict regular expression. Now all of the chars except "/"
can be used by filetype.

New release updated on both vim.org and github.

On Thu, Jan 12, 2012 at 2:16 AM, Krzysztof <krzysztof.ka...@gmail.com>wrote:

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krzysztof  
View profile  
 More options Jan 12 2012, 5:57 pm
From: Krzysztof <krzysztof.ka...@gmail.com>
Date: Thu, 12 Jan 2012 23:57:27 +0100
Local: Thurs, Jan 12 2012 5:57 pm
Subject: Re: Gentoo syntax files and xptemplates
On Fri, 13 Jan 2012 01:45:22 +0800

dr-dr xp <drdr...@gmail.com> wrote:

Checked. Works. Great.

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »