Where can I find a Vim syntax file for TYPO3 Fluid Templates? If it doesn't exist what syntax file could be used as example to create one?
OK, I created vim-fluid, a Vim plugin for the Fluid Template Engine offering indention and syntax highlighting for fluid code together with plain HTML and JavaScript and CSS code. It's working for me.
I have not found one for Fluid templates. However, as the file extension is html, I think the easiest way to include Fluid Regions would be to use the html syntax file. If I find the time, I'll give it a shot.
Even though you did not ask, this is what I use for typoscript:
https://github.com/elmar-hinz/vim.typoscript
The syntax highlighting for fluid looks like this for me:
So the only two things I really miss are an autoformatter that respects fluid tags as well as a fluid inline syntax highlighter. Otherwise it's quite neat already. Looking forward to other answers.
Related
Is there currently any way in javascript to convert a KaTeX formular to MathJax, I want to support exporting to Anki which just works with MathJax.
If not, is there a table which shows which commands of KaTeX are not supported in MathJax, I can't seem to find one.
I just need the conversion from KaTeX to MathJax, not the other way around
A workaround might be the new addon for anki that supports katex. I'm not ready to use it yet (there appears to be some bugs with line-breaking. See comments on the link).
https://ankiweb.net/shared/info/1087328706
I have the same use case as you. I write markdown and katex in vscode (with Markdown+Math extension), and export to anki (using ankdown - slightly modified).
I find that sometimes mathjax causes problems - for example with tags.
I've asked a related question here: Show unmatched html tags in Notepad++
Having only begun to use vim, I love it. I love the fact that I can launch a file in vim and exclusively use the keyboard for editing it. And, it's so quick and easy to do it once you get the hang of it...
Aside from all that, I'm wondering if there's a way to highlight unmatched html tags in vim. I've searched SOF and also looked around the web, but I'm either not searching hard enough or nobody's posted how to do this or the ability to search for unmatched html tags in vim doesn't exist.
I'd like to focus on html tags in particular, but I'd also like to say that I'm looking for a way to show ANY unmatched tags in a document (tags being in the form of "<SOME_TAG_NAME></SOME_TAG_NAME>").
Even if I could be pointed to a good tutorial on creating plugins for vim that would be helpful. I would have made a plugin for notepad++ myself, but it requires the use of Visual Studio which I don't have. I use open source technologies (particularly Java) for my development. I'm assuming and hoping that vim doesn't require Visual Studio to write a plugin...
Try syntastic. When you run :SyntasticCheck or when you write, it will run a syntax check on the html and flag the unmatched tags.
Note: You will need htmltidy.
Also note, on gvim win32, you may need to edit syntastic's syntax_checkers\html.vim as mentioned here.
how to pretty print source code of common languages in browser html output with javascript?
I mean so that there is some indentation and code formatting.
Currently i only got
http://alexgorbatchev.com/SyntaxHighlighter/
for coloring the syntax.
But i would also like some indentation and other formatting.
Example:
user puts in some code.
system formats and highlights code in the browser view.
so-> is there a general code formatter for formatting code?
best in javascript
I am grateful for any help.
Probably SyntaxHighlighter is the most popular. But you have a choice, have a look at 16 Free Javascript Code Syntax Highlighters For Better Programming
If you mean real time syntax highlighter, you can also try JS-CodeEdit:
JS-CodeEdit is a JavaScript editor
that converts your HTML textareas into
a code editor with realtime syntax
highlighting. If added into a form,
the content can be submitted e.g. to
be written to a file. A nice thing is
that you can add as many editors as
you want within a HTML page.
But it support a bit limited list of languages: JavaScript, PHP, Perl, HTML, CSS, XML, SQL (this list is increased with each release).
You might want to check out Giki : http://guyht.github.com/Giki/examples/wiki.html
Its a real time syntax highlighter, very easy to customise.
GitHub Repo: https://github.com/guyht/Giki
Here is a open source command line program, with optional GUI, which can format and highlight approx. 100 programming languages, with configurable colour themes and output as HTML, XHTML, RTF, TeX, LaTeX, terminal escape sequences, SVG and BBCode format. See the complete feature list, examples, screenshots and screencast.
There is also a macOS quick view plugin available, too.
This is not Javascript but you can do the stuff ex. via AJAX.
I am trying to use Vim for web development but having trouble dealing with multiple languages in the same file. I may have php, html, javascript, and css all in the same file, but Vim will base the indentation, coloring, plugins, etc. just based on one of the languages.
Know of any plugins or vimrc hacks to fix this? Thanks.
You can use the dotted 'filetype' syntax. For example, you can :set ft=html.php when you are working on a file containing both HTML and PHP code. I personally do this to activate snipMate's HTML and PHP snippets for the file being edited.
I am trying to use Vim for web development but having trouble dealing with multiple languages in the same file.
I have never tried that myself, but official VIM Wiki has the dedicate article for that: Different syntax highlighting within regions of a file.
Is it possible to do Code Syntax highlighting on sites.google.com websites like the way we do it on Blogger.com or Wordpress.com?
Unfortunately there is until now no support for syntax highlighting within Google Sites. As a workaround you could use http://tohtml.com/ and enter your code there and copy the colored output (not the HTML) directly into your Google Sites page.
This works perfectly, as long as you don't need to edit large pieces of the code regularly.
I have tried creating a gadget myself with Google Code Prettify, and there were a few issues.
One is that classes aren't supported, so you will have to follow what Stack Overflow is doing to prettify.
http://www.codingthewheel.com/archives/syntax-highlighting-stackoverflow-google-prettify
The other problem I faced was the interaction between the iframe and the parent frame. You will notice that there is a domain permission problem, and so you will be unable to access the parent.document from your iframe.
This should save some people a few hours of hacky testing.
Yes, you can!
Just select the desired text, and go to "Formatting" -> "Code" OR "Block Code"
You can insert gadgets into Google Sites pages. You could create a gadget that did syntax highlighting using any number of open source javascript syntax highlighters.
Not an ideal solution but would get you what you want. Lemme know if you want further pointers.
I've found an alternative way.
If you use IntelliJ, just copy the code from the IntelliJ editor and paste it into your Google site text (not in html mode).
Works out-of-the-box!