How to edit core files in Atom Editor - atom-editor

I want to edit the tree-view package in Atom. I want to add a new item to the context menu. But i can't file where are the files. I can open the config folder and I can see all the community packages I have installed, but where do I find the core files of the editor?

They are packed inside the app.asar file. This file is located at the following location in the OS X version.
Atom.app/Contents/Resources/app.asar
This file is generated by this build script.
Of course, this package is open-source, so you can view the code for tree-view on GitHub.
GitHub also has some documentation for developing on official Atom packages.
The first step is creating your own clone.
For example, if you want to make changes to the tree-view package,
fork the repo on your github account, then clone it:
> git clone git#github.com:your-username/tree-view.git
Next install all the dependencies:
> cd tree-view
> apm install
Installing modules ✓
Now you can link it to development mode so when you run an Atom window
with atom --dev, you will use your fork instead of the built in
package:
> apm link -d
Also, if all you want to do is add another menu item, I wouldn't be surprised if there is an API for doing so from another plugin.

Related

Unable to add the git url to connect project in Rstudio with git repository

Im trying to connect an existing project in R studio with an external git repository. I have installed it and verified that there is communication between this and rstudio. Then I
Execute the Project Options command (from the Project menu)
Choose Version Control options
Change the version control system from (None) to Git
Confirm that you wish to initialize a new Git repository
but I cannot put inside the git url as the relative input (Origin) cannot be clicked. Anybody has the same issue? I am following this tutorial.

Installing Cordova plugin to meteor project using a github tarball link

I'm trying to install a package to my meteor project using a repository in github.
The only way Meteor allow me to install it is using a "tarball" specific link like this:
https://github.com/Wizcorp/phonegap-facebook-plugin/tarball/d8b0f6935a7c6e586188bf85f9da88a1c160790b
Although, the package version referenced in the link is not the one I need (I got that link from an old support post).
Could someone explain me how to obtain that type of link (tarball) from this repository and version (0.12.0)?
https://github.com/Wizcorp/phonegap-facebook-plugin/releases/tag/v0.12.0
So far I have tried:
Copy the tar.gz download link of the right version and running:
meteor add cordova:com.phonegap.plugins.facebookconnect#https://github.com/aogilvie/phonegap-facebook-plugin/archive/0.6.0.tar.gz
Result: "Meteor requires either an exact version, a Git URL with a SHA
reference"
Installing it using the version number:
meteor add cordova:com.phonegap.plugins.facebookconnect#0.12.0
Result: I got "Package installed" but when run ios-device I got the error:
"Failed to fetch plugin com.phonegap.plugins.facebookconnect#0.12.0 via registry".
Downloading the zip file, unzip and put folder in packages folder.
Result: Is not working because is not a package.js inside the folder.
Thanks in advance
You are actually trying to add a Cordova plugin (meteor add cordova:...), not a Meteor package.
Therefore, your trial 3 (local package / plugin) needs a similar meteor add cordova:your-plugin-name#file://packages/folder-to-local-cordova-plugin instead of a meteor add package-name (which will look for a package.js file).
Trial 2 (version number) works only for published plugins.
You should stick with your trial 1 but you have to specify the commit hash (git endpoint + # + commit hash) instead of the tarball link:
meteor add cordova:com.phonegap.plugins.facebookconnect#https://github.com/Wizcorp/phonegap-facebook-plugin.git#c0f8da97a1d65397ada73e958dafed3aeef2e491
See Meteor Guide > Build > Mobile > Native features with Cordova plugins > Installing plugins > Installing a plugin from Git

Develop and Debug Atom Package

I have just began working on Atom.io Package development, and based on this tutorial, have learnt from how to create package development skelton file to how to publish your package.
However, I do not know how to check/debug/develop your package. I know I can use Jasmine via alt-cmd-I or Developer Console (for Atom is based on Chromium), still if you want to check the behavior of your package, do I have to re-publish or install your package manually every time?
When working on packages locally, here's the recommended workflow:
Clone your package from GitHub using apm develop <package-name>. This will clone the package's repo to your local ~/.atom/dev/packages/<package-name>
cd into this directory
Start Atom in this directory using atom -d .
Now you can work on the package, make changes, etc. Once you're ready to reload, you can use View > Developer > Reload Window to restart Atom with the changed package.
If you have your package sources locally on your machine, you can skip the first step (apm develop) and simply create a symbolic link from your sources to ~/.atom/dev/packages/<package-name.
Already have a local repo of the package?
To add to nwinkler's answer, if you already have a repo of the package locally, you can use
apm link --dev
to automatically create a symbolic link to the ~/.atom/dev/packages/ directory.
Make sure to completely restart atom in developer mode with
atom -d
or in View > Developer > Open In Dev Mode...
If you just want to use a local package (not in dev mode), you can use apm link directly. And apm unlink to remove the symbolic link to ~/.atom/packages.

How To modify quantmod package with GIT

I currently have quantmod installed. I would like to modify the source code.
Do I need to uninstall the current version?
I currently was trying
(1) Installed GIT
(2) then I went to New Project>> Version Control >>create a new project form version control GIT and when I click that I get this error
"Git was not detected in the system path. to create projects from GIT repositories you should install GIT and then restart Rstudio. Not tha tif GIT is installed an not on the path then you can specify its location using the options dialog."
(3) So I went to the global options>>GIT/SVN>>Git executable and put this path
C:\Users\me\AppData\Local\Programs\Git\bin\git.exe
(4) then I restarted RSTUDIO and now I get further so when I go to
New Project>> Version Control >>create a new project form version control GIT>>CLONE GIT REPISITORY
Here it asks for a Repository URL, Project Directory name, and Create project as subdirectory of. Here is where I am unsure where I need to put this project so that the modification I make to the quantmod package will be picked up by my version of R
For Repository URL I was going ot put:
https://github.com/joshuaulrich/quantmod
For Project Directory I am unsure: can you advise??
For Create project as sub directory I am unsure: can you advise??
My R libraries are here: C:\Users\me\Documents\R-3.1.2\library
Also currently I have quantmod installed here:
C:\Users\me\Documents\R-3.1.2\library\quantmod
Do I need to uninstall that current version?
Appendix:
On My computer GIT is here: C:\Users\Me\AppData\Local\Programs\Git
On My computer R is here: C:\Users\Me\Documents\R-3.1.2
The project directory is just the name of the folder you will be putting the repo inside. Generally it is the name of package to make things clear. In your case quantmod.
The sub directory you can ignore unless you want to choose some other location (besides the current directory) for you code.
You don't need to uninstall the current version. My usual recommendation is to just increment the subversion of the package in the DESCRIPTION file. For example, increment:
Version: 1.0.1
to
Version: 1.0.2
Now when you rebuild and install you will have the new version. If you need the original again, you can just reinstall the old one (i.e. install.packages). Having both installed at the same time would likely result in conflicts between the packages and just causing a headache.

RStudio project and git repository in subdirectory

When developing packages in RStudio.
By default RStudio assume your package directory is the project directory and it looks like that:
But you are allowed to point the package location to a subdirectory of the project directory and it looks like that:
This way you can have some part of your project files, kept in the root project directory, not included in the package. You don't need to set git ignore etc.
But if you want to add RStudio git repo features, you are not allowed to point your git repo in subdirectory, even if you have already created git repo in your package dir (not project dir) you cannot set it in RStudio. I'm stuck at:
Is there any way to enable git repo features in RStudio having git repository in the subdirectory of the RStudio project? Maybe some .Rproj config tweaks?
Very good question. I've experienced the same trouble and it also does not go away with the latest pre-test release. So there's likely no super quick solution to this inside rstudio. Though it might be worth a feature request.
Personally I use the console / git bash with git and rstudio. That is I create a project inside R studio and manually run git init outside rstudio. Also I add, commit, merge, push and pull outside rstudio. If you don't like to manage git via console there's https://windows.github.com/ and https://mac.github.com/ also the folks at Atlassian provide some GUI tool called source tree: https://www.atlassian.com/software/sourcetree/overview
Plus there are many others, like Tortoise Git which I haven't tested, but I think R Studio's current git support is fine for simple things, but a git tool (console or gui) is definitely the way to go if you want to be more flexible.
That being said, sublime text edit is a powerful and easy to hack and customizable text editor which also has quite some packages to extend it. It's not entirely free but sometimes it's a nice supplement to rstudio. And it has a cool resolve conflict package etc.

Resources