yko / mojo.vim Goto Github PK
View Code? Open in Web Editor NEWVim syntax for mojo epl templates in Mojo projects
Home Page: http://www.vim.org/scripts/script.php?script_id=3168
License: Artistic License 2.0
Vim syntax for mojo epl templates in Mojo projects
Home Page: http://www.vim.org/scripts/script.php?script_id=3168
License: Artistic License 2.0
I have put these lines in my .vimrc
let mojo_highlight_data = 1
let mojo_disable_html = 1
When I load vim with file hello with file contents like this, the section below DATA isn't highlighted.
use Mojolicious::Lite;
get '/:fname/:lname' => sub {
shift->render('hello');
};
app->start;
DATA
@@ hello.html.ep
<!doctype html>
<title>Placeholders</title>
Hello <%= $fname %> <%= $lname %>
I am receiving warnings about missing body, html and other tags in a template where they are provided in the default layout. See screenshots below.
I have confirmed that this is coming from mojo.vim by uninstalling the HTML language server and mojo.vim. The problem recurs when I install mojo.vim and open the template/index.html.ep.
Thanks in advance for your help!
lbe
Adding .vimrc configuration snippets
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
Plug 'honza/vim-snippets'
Plug 'yko/mojo.vim'
let mojo_highlight_data = 1
let g:snipMate = { 'snippet_version' : 1 }
<%= label 'foo' => %{>Foo<%}%>
i++; i--;
Multiline code blocks are not highlighted properly
<%= 'Hello, '\\
. 'world' %>
Move ep syntax to separate file, redesign epl and MojoTempalate syntax to inclide ep.
L16 and L20 of MojoliciousTemplate.vim uses MojoTemplate.vim instead of MojoliciousTemplate.vim
As mentioned in #7 by rshadow:
% if(1) {
<tr class="<%= join ' ', @class %>" >
<td>
% }
Html code between {}
is highlited as it was perl.
To me it looks like in epl.vim
syn region PerlInside keepend start=+^\s*%=\{0,2}+hs=s end=+$+ contains=MojoSingleStart,@Perl
the keepend
is ignored. Maybe error in vim?
Anything between map/grep's curly brackets is not properly hilighted (no colour at all).
E.g.: grep { /$this_does_not_get_hilighted/i } @array;
epl_inline.vim or anything else.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.