Friday, July 6, 2018

Re: Syntax Completion works only for one language



On Thu, Jul 5, 2018 at 12:38 PM 'Ameesh Oza' via vim_use <vim_use@googlegroups.com> wrote:
On Wednesday, July 4, 2018 at 5:08:51 AM UTC-7, David Fishburn wrote:
...
: version output

:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jul 24 2015 02:22:44)
Included patches: 1-207, 209-629
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
Huge version with GTK2 GUI.  Features included (+) or not (-):


My completion window opens for only one language. For other language. I get message  -- Omni completion (^O^N^P) Pattern not found. But syntax highlighting works for second language.


Hmm, pattern not found.  That sounds like it has not picked up the syntax list.

Can you run through the following commands exactly as I have done.
I tried to pick languages that Vim knows how to syntax highlight but do not already have their own complete plugins.

I just tried the following with my Windows 7.4
:ver
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep  7 2016 08:32:39)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-2342

:e dave.tcl

:setl
--- Local option values ---
  autoindent          comments=:#         cursorcolumn        errorformat=        grepprg=            lispwords=          nrformats=bin,hex   shiftwidth=4        tags=
--autoread            commentstring=#%s   cursorline          expandtab           include=            makeprg=            path=               syntax=tcl
  backupcopy=         cryptmethod=        define=             filetype=tcl        keywordprg=         modified            scroll=24           tagcase=
  formatoptions=tcroql
  formatlistpat=^\s*\(\d\+[\]:.)}\t ]\|-\)\s*
  indentexpr=GetTclIndent()
  indentkeys=0{,0},!^F,o,O,0]
  omnifunc=syntaxcomplete#Complete
  undolevels=-123456
 
i<CTRL-X><CTRL-O>

I get a list of words:
TODO
abs
accelerator
acos

:echo OmniSyntaxList()
['TODO', 'abs', 'accelerator', 'acos', ...]

:e dave.moo

:setl
--- Local option values ---
  autoindent          cryptmethod=        define=             filetype=moo        keywordprg=         modified            scroll=24           tagcase=
--autoread            cursorcolumn        errorformat=        grepprg=            lispwords=          nrformats=bin,hex   shiftwidth=4        tags=
  backupcopy=         cursorline          expandtab           include=            makeprg=            path=               syntax=moo
  comments=b:#,:%,n:>
  formatoptions=cqtro
  formatlistpat=^\s*\(\d\+[\]:.)}\t ]\|-\)\s*
  omnifunc=syntaxcomplete#Complete
  undolevels=-123456


i<CTRL-X><CTRL-O>

I get a list of words:
@
ERR
FLOAT
INT

:echo OmniSyntaxList()
['@', '@', '@', '@', '@', 'ERR', 'FLOAT', 'INT', ...]



:echo g:loaded_syntax_completion
130  (aka 13.0)

Please check your version of the syntax complete plugin.

You can download an updated copy of it from here:


After loading the buffer:

:syntax list
--- Syntax items ---
mooUncommentedError xxx match +\*/+  display
                   links to Error
mooCStyleCommentError xxx match +/\ze\*+  display contained
                   links to Error
mooComment     xxx match #[\t !%&*+,\-/<=>?@^|]\@<!\s*"\([^\"]\|\\.\)*"\s*;#  contains=mooStringError,mooCommentSpecialChar
                   links to Comment

What happens after you:
:echo OmniSyntaxList()

David


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: