VIM 7.2 Syntax


PowerGod

Forum Addict!
Joined
Jun 20, 2011
Messages
4,465
I didn't use VIM directly on the Pandora in the last years, the one from "opkg", but I found out that the default syntaxes are wrong for the current version (7.2).

You can find syntax files for the 7.2 version here:


INSTRUCTIONS:

1) Extract this folder from the archive: "vim72/runtime/syntax/"
2) Put all the extracted files inside the folder "~/.vim/syntax/"

This command can do the job in a sigle run.
Code:
tar -xvjf vim-7.2.tar.bz2 -C ~/.vim/syntax/ --wildcards 'vim72/runtime/syntax/*.vim' --strip-components 3

Now the editor will use the correct files.

WARNING:
If Vim is used from some PND package most probably will not use the system HOME folder, and in that case the path where to put the files could be different.
 
Last edited:
:nocompatible<cr>
?

That's obviously required to use highlight.

But the syntax files in the "/usr/share/vim" folder contains commands not known by the 7.2 version.

This is just an extract while sourcing "sh.vim", but it's almost the same for all the other syntaxes in the folder.
Code:
Error detected while processing /usr/share/vim/vim72/syntax/sh.vim:
line   79:
E117: Unknown function: and
E15: Invalid expression: and(g:sh_fold_enabled,1)
line   82:
E117: Unknown function: and
E15: Invalid expression: and(g:sh_fold_enabled,2)
line   85:
E117: Unknown function: and
E15: Invalid expression: and(g:sh_fold_enabled,4)
line  105:
E121: Undefined variable: s:sh_fold_functions
E15: Invalid expression: s:sh_fold_functions
line  110:
E121: Undefined variable: s:sh_fold_heredoc
E15: Invalid expression: s:sh_fold_heredoc
line  115:
E121: Undefined variable: s:sh_fold_ifdofor
E15: Invalid expression: s:sh_fold_ifdofor
line  245:
E492: Not an editor command: ShFoldIfDoFor syn region shDo^Itransparent^Imatchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>"^I^I^Icontains=@shLoopList
line  246:
E492: Not an editor command: ShFoldIfDoFor syn region shIf^Itransparent^Imatchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>"^Icontains=@shIfList
line  247:
E492: Not an editor command: ShFoldIfDoFor syn region shFor^I^Imatchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2^I^I^Icontains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
line  248:
E492: Not an editor command: ShFoldIfDoFor syn region shForPP^Imatchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
line  267:
E492: Not an editor command: ShFoldIfDoFor syn region  shCase^Icontained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)"  end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
line  268:
E492: Not an editor command: ShFoldIfDoFor syn region  shCaseEsac^Imatchgroup=shConditional start="\<case\>" end="\<esac\>"^Icontains=@shCaseEsacList

and so on....

EDIT:
I added more instructions in the first post.
 
Last edited:
  • Like
Reactions: rSl
Back
Top