How to do JavaScript autocompletion in Geany? - autocomplete

Is it possible to make in Geany JavaScript autocompletion?
If it is possible it would be better if it will work without Ctrl+Space like in sublime

Unfortunately, your question is not very clear in terms what you expect from auto completion. Geany is supporting e.g. static tags -- which can be self generated or downloaded from the wiki. To enable them go to Tools->Load tags. Also it supports some session based autocompletion, which is turned on by default.
Please take care, as there is a difference between inline JavaScript and explicit JavaScript-file.

Related

Custom VSCode extension: embed native editor in webview

Goal
I want to have a webview, that embeds the native editor (see image).
The embedded part does not need to have a tabbing-feature. It would be enough to have the editor object, that I fill and update manually per Javascript.
Question
Is that possible? How would I do that?
Background
I want to show various file contents within my own webview. These contents should be editable and have all functionality, that the vscode editor has (e.g. syntax highlighting, multiple cursors, intellisense,...). At best, also 3rd party extensions should work within them.
I don't want to start implementing the whole editor again, so I'm searching for a way to embed the editor.
It is not possible to embed the native editor that comes with VS Code. The extension API simply does not support it.
The closest you can get is to import the code of the editor into your webview. The editor is called Monaco and is available via the npm package monaco-editor. It supports most (or all?) of the features offered by VS Code editor, such as IntelliSense.
However, since this editor would be unaware of the installed VS Code extensions, themes and configuration options, it will behave differently than native editors. You might be able to improve the user experience by manually propagating configuration options and themes, but this would require a significant amount of work and might not be possible for other things, such as support for language servers or third party extensions.

coffeescript-react (.cjsx) Support in Webstorm

Is there a way to get any kind of syntax highlighting for .cjsx (jsx in coffeescript) files in WebStorm?
Currently, I'm using a Sublime plugin, which is great, but I'd prefer to stay in WebStorm if possible.
I understand WebStorm supports TextMate bundles, so that may be a viable option but I couldn't find one for cjsx.
Atom, the hackable editor, written in coffeescript, has great support for cjsx. (yes, look at that, another really, really, really large project using coffeescript)
I'm using the community (a really, really large community) supported package cjsx-language https://atom.io/packages/language-cjsx
I've almost broken the $1200 chain of IntelliJ. Here is a gist of my atom setup and packages: https://gist.github.com/littlebee/34a60734de79f6f78c56
This was saved by this genius little package: https://atom.io/packages/sync-settings. It wont let you backup to my gist without a key but it might let you restore from it.
Use this textmate bundle (meant for webstorm cjsx): https://github.com/ruswerner/cjsx.tmbundle
I would advice against using CoffeeScript in WebStorm for large projects (see comments section). If you really need to, then you can always use backticks to tell the CoffeeScript compiler to skip the code within the backticks.
render: () ->
return `<div>Hi</div>`;
WebStorm will highlight this just fine if in Settings you select "JSX Harmony" as in the Javascript settings. Now let these cjsx files compile in 2 steps: CoffeeScript -> JavaScript with JSX, then JavaScript with JSX -> JavaScript. If you're using Webpack, it's as simple as:
{include: /\.cjsx$/, loaders: ["coffee-loader", "jsx-loader"]}

Is there an auto complete in Sublime Text 2 when integrating it with SASS?

I've noticed that it does auto completes CSS properties and values, but not the case with SCSS.
Check out the sass-textmate-bundle port for ST2. According to the readme,
This add-on adds syntax highlighting and tab/code completion for Sass and SCSS files. It features Zen Coding shortcuts for many CSS properties, making you look like some kind of stylesheet wizard to everyone around you. You've got to like that.
You might also want to take a look at SublimeCodeIntel. While not specifically for SASS/SCSS, it features context-sensitive autocomplete based on what you've already typed in the file, so it may be useful on top of what ST2 already provides.
Both of these are available through Package Control.

In the Eclipse HTML editor, is there an easy way to have custom tags available in content assist (autocomplete)?

I'm learning to use a new hosted e-commerce system at work which uses a proprietary markup/scripting language for its page templates. They are similar to JSP pages (although the server tags don't have a prefix, i.e. there is no "xsp:") and use ${expressions} similar to Expression Language. We are transitioning from a .Net system, so all of my fellow devs are very used to having thorough IntelliSense available in our editors.
So, my question is whether it is possible to make these custom tags available in content assist, and whether it is worth the hassle if there is any. (I'm aware the latter is subjective - I'm a reasonable guy and open to opinions.)
FYI, I'm more concerned with auto-completion of tags, but expressions would be great as well depending on how much work is involved. We are using eclipse for Java EE, Juno (core IDE v4.2.1) with WTP... Sorry I'm not really sure how or what to share as far as versions and components go! Let me know if any additional info would help.
Thanks in advance.
A decidedly non-hassle-free answer would be to create an Eclipse plug-in to support your proprietary template language. One place to start might be Veloeclipse, a HTML/XML/JSP/Velocity Editor for Eclipse, which claims to have the following features which you may find interesting:
Smart indentation of velocity directives (on pressing return or when using tabs)
Code folding
Code Formatting
Smart indentation of html tags (on pressing return or when using tabs)
Syntax highlighting for both html and velocity
Autocompletion and Content assist for tags, directives and references (Ctrl + space in html attribute values or when opening or closing tags)
Sources here: http://code.google.com/p/veloeclipse/source/checkout

Authoring HTML5 in Emacs?

What's the best solution for authoring HTML5 in Emacs? Is there a mode that will do conformance checking?
My best suggestion is to use nxml-mode (available as packages in several linux distributions if you're on that platform) and load the html5 RelaxNG compact format specifications from HTML5 specification page (or any other source if you have one).
Nxml-mode validates xml files on the fly according to relaxNG specifications and give you nice customization features and handy functions for writing documents faster like inserting end-tags and such. Written by James Clark, so you know the author knows his XML.
If you load it like a system package you can probably just add it to your auto-mode-alist and be good to go. I have just set the following two variables for auto-completion and more docs is available at the first link.
(nxml-bind-meta-tab-to-complete-flag t)
(nxml-slash-auto-complete-flag t)
When it is loaded, just load the file you want and specify the location of the schema for html5, save its location through the menu and you should be on your way. There are also more links to documentation on nxml-mode in the link I provided.
I've just seen this project, which apparently takes care of the necessary work to teach nxml-mode about HTML5:
http://github.com/hober/html5-el/tree/master
An easier to install solution may be web-mode. It definitely plays well with HTML5 and doesn't require you to jump through the XHTML hoops.
JavaScript and CSS blocks work as you would hope.
It also includes the ability to handle common templating languages like php, erb, handlebars, etc.
Check out http://web-mode.org for more details. It's available as a package, at least on MELPA.
I had nXML previously but found the schemas quite cumbersome to install, meaning I didn't get it to work with HTML5. I now use web-mode. Drawback is that there is no real-time validation. But that's cool as there are online-tools for that.
I recommend emmet mode. https://emmet.io/download/
This mode can be enabled in other editors rather than Emacs.