What file association will get the correct highlighting for *.tpl files in Pycharm? I have tried HTML and PHP, but neither seem to get it 100%.
I am using bottle and python 2.7 on a Windows machine.
Just setting it like the picture:
Choose Editor -> File Types -> Recognized File Types -> HTML
Add a Registered Patterns: *.tpl
Your question will be solved.
Related
The usual answer to this question is, "download and add a suitable TextMate bundle." I have done that.
I'm working in WebStorm on a React project using GraphQL. It has a lot of .vtl (Velocity Template Language) files that do not have syntax highlighting. I found out that I can add a TextMate bundle for VTL in order to get highlighting. I got this bundle from https://github.com/textmate/java-velocity.tmbundle. After adding it to WebStorm, there still isn't an appropriate file type, and .vtl files still don't have syntax highlighting.
So, I tried to create a new custom file type, manually supplying lists of keywords to highlight, which make the code slightly more readable. However, every .vtl file is now entirely marked with squiggly red, saying, "Unexpected tokens." I just wanted keyword highlighting, not incorrect assumptions about grammar.
Is this a problem with WebStorm, the bundle, or me? How can I get some basic syntax highlighting specifically for .vtl files?
Note that the TextMate plugin is installed.
The bundle only provides highlighting for *.vm files. Please check if the issue persists if you open java-velocity.tmbundle\Syntaxes\Velocity.tmLanguage file in some text editor and add vtl to the list of supported extensions:
<key>fileTypes</key>
<array>
<string>vm</string>
<string>vtl</string>
</array>
and re-start the IDE?
Note that you need to remove your custom file type to get the extension recognized
Id like to know the relevance of what-input.min.js include in Zurbs foundation-6 framework , in the js/vendor directory , this is because i keep getting an 404 not found error not loading while running the site , ... js/vendor/jquery.min.map file , is there any connection ?
You don't need the .map file which is used to map a minified file back to the original. It is available for download from jquery's site. Source maps are can be ignored in inspector settings which makes sense when you don't plan on debugging minified javascript files
It is unrelated to the source map file 404 but what-input.min.js is a JS library "to watch for mouse, keyboard and touch events"
They have a github page with more documentation: https://github.com/ten1seven/what-input
and a demo:
https://ten1seven.github.io/what-input/
"Tab, click or tap the links and form controls to see how What Input allows them to be styled differently"
I had this exact same problem on every site when using JointsWP with Foundation 6 framework. I finally just figured it out. I turned off css source mapping and still received the error. It turns out that it wasn't lying to me and the js file really does not exist where it is trying to load it from:
/vendor/what-input/what-input.min.js
But it is under the dist folder within that same directory. So if you find your enqueue-scripts.php file where the what-input.min.js is loaded, you can fix the directory path to:
/vendor/what-input/dist/what-input.min.js
And no more 404!
I would like to be able to use Sublime 3 as my SAS text editor but cannot seem to configure Sublime to do so. I've visited http://implementing-vdw.blogspot.com/2012/10/new-sublime-text-package-available-for.html and haven't been able to actually get the SAS syntax highlighting to work in
Sublime.
Here's what I did, I don't have/know github so I downloaded the zip file as instructed and placed its contents in C:\Program Files\Sublime Text 3\Packages\SAS. I closed sublime and reopened but don't see SAS as an available syntax.
I'm sure I need to perform another step or two but I don't know what.
Determined what the issue was, the 'Packages' directory where I installed Sublime Text 3 isn't the exact directory where you need to place the SAS folder. As a doublecheck to ensure you are placing the SAS folder in the correct location open Sublime -> Preferences -> Browse Packages..., this is the location where the SAS folder should be placed. Once done you will see SAS syntax available under View -> Syntax.
Here's how I got this to work:
download the zip file from the above blogspot location (I also tried
using git but got a publickey access error)
use Sublime -> Preferences -> Browse Packages to find the directory where this needs to be unzipped
unzip the zip file into the appropriate directory (on MacOS, it was ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/)
rename the unzipped folder to SAS
at this point, I can select the SAS syntax in Sublime via View -> Syntax -> SAS
I am using Fedora 18 on Virtual Box on my Windows XP desktop to learn Django. After going through the .txt documentation files, I discovered these files were written using restructuredText. I've been spending the last day or so trying to figure out how to convert the files into something readable (HTML, Latex, PDF, etc.). First thing I did, was install docutils (from source - download page) and used rst2html.py to convert the files to HTML to be readable.
When I used this tool, I was getting the Unknown interpreted text role "doc", Unknown interpreted text role "ref", Unknown interpreted text role "term" errors, and more when opening the docs/intro/index.txt, docs/intro/install.txt and docs/intro/tutorial01.txt files. I was able to find very little on Google describing the exact problem I was having so I tried to use a different option.
Naively thinking the errors were native to docutils I decided to search for another tool and found this page and installed restview. Well, I didn't realize restview used docutils so I ended up back at square one.
How do I get rid of these and other errors? Did I install docutils and restview correctly?
Please tell me if I need to add more info
You need to use Sphinx. This tool is used by the Django project and it defines additional reStructuredText constructs to complement those defined by docutils. Such as
http://sphinx-doc.org/markup/inline.html#role-doc
http://sphinx-doc.org/markup/inline.html#role-ref
http://sphinx-doc.org/markup/inline.html#role-term
I recently wrote a few scripts for Javascript which I am trying to run as a native app on my iPad in offline mode.
The scripts do nothing complex, simply run off a bunch of prompts and generate a document.write() based on the information the user has entered.
So I set up my own little website to host the scripts on and went about setting up an application cache. I am new to this sort of thing however from what I gather, I have followed instructions correctly. To set up my app cache, I did the following:
Added the following two lines to my .htaccess file:
AddType text/cache-manifest .manifest
AddType text/manifest .manifest
Made a new file called "generator.manifest", which has the following lines:
CACHE MANIFEST
generator.html
answergenerator.js
And added in to my generator.html file:
Apart from a few functions used to prompt some iOS features, all I have in my generator.html file is this:
along with the other stock standard html tags.
That is my appcache setup. The generator.manifest file is in the exact same directory as the generator.html file.
When I enter Firefox and go to my site, I can run the script, allow it to cache files for offline usage (Firefox comes up with a prompt), and then run the script in offline mode.
HOWEVER, whenever I try to do this on my iPad (4.2.1), I simply get the error: "Generator could not be opened because it is not connected to the Internet."
Where have I gone wrong? Can someone help me fix this please?
A huge thanks in advance,
Haz.
You might look at this answer. iOS does seem to have some issues. I found that I had to power cycle my iPad (in addition to clearing open Safari's) before it would recognize the appcache.