I am using Atom for over year now and recently I have started to write my own snippets but I am struggling with using them properly. Snippets from Atom packages are showed in autocomplete panel before mine. Is there any option to prioritize your custom snippets in Atom?
e.g: I have the custom snippet for console.log statement and I would like to have it as the first choice in autocomplete panel.
My colleagues are using vs-code and there is the option for doing that:
“editor.snippetSuggestions”: “top”
I was looking for a similar solution in Atom's doc but without success.
Any help will be appreciated.
Related
This Gutenberg update looks sweet, but it's immediately frustrating trying to follow any of the documentation.
I started with the very simple looking tutorial that is the first result on Google. It has code that looks to make sense for what I'm trying to do here. Great.
Except it says nothing about where to put this code to make it work.
Other tutorials are all about "download our plugin and we'll create one for you" - but I don't want to add that huge nest of code when what I'm really looking for is a fairly simple static block of code I can have users drop into a page.
Back in the day we'd just register a short code in the functions.php file and call it a day.
Can someone explain to me:
Where to put this registration code?
Where to put this JS code it references?
If I'm somehow going about this with a huge misunderstanding of how Gutenberg works?
Thanks
To actually solve this properly would need a couple of chapters of a book... but here's the very condensed answer.
Taking a very quick look at the link you shared, the code should be put in a plugin as there are calls to the function plugins_url(). So you need to first create a plugin. It's not difficult to build a simple plugin but it does take a bit of time getting used to how things need to be registered and how everything is glued together (that's why I said that a proper answer would take a couple of chapters of a book :D).
Once you have the plugin, the code should be within the plugin (or in any PHP file that is included by the plugin) and the JS file should go inside the plugin directory in a folder called step-01
There's a git repo from WordPress with some Gutenberg examples. I haven't looked to hard at them, but It might be a good idea to follow the code in there with the tutorial of how to build a plugin (and the WordPress code reference site opened too :D). If you are going to be developing things for WP, I recommend you to get Zeal or Dash to be able to browse the documentation in an easy and fast way.
Edit
I just found that you can create the scaffolding with wp cli. Wordpress has a tutorial on how to use the wp scaffold block command here.
I am coding in atom text editor for writing react native mobile application. I want code suggestions like when I am writing inbuilt classes of react native library. I have to write completely own, seems like I am writing code in notepad.
Atom is not hinting & autocomplete for in built methods/classes of react native while typing.
Do I need to install any plugin to get this working ?
Atom alone is not able to provide autocomplete for builtin react-native classes nor your own classes, but its plugin-architecture allows you bring this up nevertheless.
A little sidenote
Apparently the people behind atom.io changed their URL-structure. The following URLs might not work anymore. Instead of downvoting this answer everybody is invited to find out the right URLs and edit this answer with the new URLs. Don't be so destructive
First you should install "nuclide" as it comes with special features for your react native development.
Moreover you need this:
https://atom.io/packages/atom-react-native-autocomplete
There are further usefull plugins like:
https://github.com/aakashns/atom-react-native-snippets
https://atom.io/packages/react-native-components
and so on
You should use the search within the "install packages" section in Atoms preferences pane.
As a side note:
However, after working one year with Atom i switched to Microsofts Visual Studio Code which is much more performant and really brilliant with autocompletion and typehinting once you configured it the right way and installed some plugins. Checkout Google for further information. There are some usefully blog posts around this topic:
https://medium.com/react-native-training/vscode-for-react-native-526ec4a368ce
http://equimper.github.io/2017/02/25/why-i-moved-away-from-atom-to-visual-studio-code-and-my-setup/
Be prepared: the first link offers at the end(!) a fast way to setup everything from scratch with only one step.
I'm looking for a WordPress Plugin, or any other way to display ELM code in my blog. I tried to use Crayon, but since it has no special support for elm, the code is colored wrong.
How can I do so?
This https://runelm.io/new provides a way to embed runnable snippets of Elm code on an Elm website. I don't know how easy to do this is because I haven't tested it but the example they give looks promising.
When writing an RMarkdown file in RStudio, I'd like to be able to insert common text snippets using a keyboard shortcut. On the one hand, there are code snippets in RStudio, but they don't seem to work for Markdown. So I'd settle for any other way to create a custom keyboard shortcut for inserting a pre-specified piece of custom text, while I wait for that bug to be fixed.
Turns out you can use code snippets in Markdown in RStudio. Although they don't seem to work at first, you can force snippet expansion using Shift+Tab, as described here. The RStudio team says they'll add that to the official documentation in the future.
so.. I am trying out Adobe Brackets as my editor right now and I really like it so far, but there is one thing I am missing and I wonder if there is an extension for that..
I mainly code php, css and javascript for wordpress themes / plugins etc. I was using sublime 3 before, where I had a plugin that, if I type a wordpress function name and use the autocomplete, automatically inserts the parameters of that function. So in sublime it looks like this http://i.imgur.com/FxxUOy8.png
In Adobe Brackets I tried every wordpress extension that I found but I cant get the same result. The hints for wordpress functions do work but when I accept a hint it wont insert the parameters of that function http://i.imgur.com/25HsuSe.png
So I wondered if anyone knows an extension that offers autocompletion like in the sublime screenshot. Or am I missing sth else to get that?
Thanks in advance!
I haven't yet installed this, but I came across it today and will be trying it out myself. It's an extension for Brackets called "Brackets WordPress Hint". It looks like the repository hasn't been contributed to in a while, but I haven't (yet) found anything newer.
https://github.com/Tusko/brackets-wp-hint