Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit core files in Atom Editor

Tags:

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?

like image 372
Pietro Coelho Avatar asked Jul 16 '15 02:07

Pietro Coelho


People also ask

How do I edit Atom files?

Editing a file is pretty straightforward. You can click around and scroll with your mouse and type to change the content. There is no special editing mode or key commands. If you prefer editors with modes or more complex key commands, you should take a look at the Atom package list.

How do I customize Atom editor?

The Settings tab in the Settings view provides your options for customising Atom, but you can go beyond the default options by adding JavaScript or CSS within your config. Every instance of Atom has a . atom directory that contains its configuration settings, where you can create custom behaviour or styles.

Is Atom a good editor?

Looking for a free and open-source code editor? Visual Studio Code and Atom are the two strongest candidates. If you're searching for the perfect code editor, there's a good chance that you've run into both Atom and Visual Studio Code. There are plenty of other editors, but these two are among the most talked about.


1 Answers

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 [email protected]: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.

like image 103
Alexander O'Mara Avatar answered Nov 15 '22 09:11

Alexander O'Mara