‘I will take the Ring,’ he said, ‘though I do not know the way.’ J.R.R Tolkien
Atom plugin for operating with group of related files as single file (open, switch, close, create). You can open files in split view and easily navigate around all fellows.
Using apm
:
apm install atom-fellowship
Or search for atom-fellowship
in Atom settings view.
This plugin useless without configuration.
For configuring fellows you need to provide array with 3 (or more. See below) values:
Configuration for simple header-source project structure
./inc/file.h
./src/file.c
will be like this:
.*inc.*.h, .h
.*src.*.c, .c
Configuration for simple MVC project structure
./project/controllers/file.js
./project/views/file.xml
./project/styles/file.css
will be like this:
.*controllers.*.js, /controllers/, .js
.*views.*.xml, /views/, .xml
.*styles.*.css, /styles/, .css
./lib/controllers/ns-file.js
./prj/controllers/_file.js
./prj/views/_file.js
Configuration:
.*lib\/controllers/.*.js, lib/controllers/, _ns-
.*prj\/controllers/.*.js, prj/controllers/, _
.*prj\/views.*.js, prj/views/, _
./lib/controllers/foo-file.js
./prj/controllers/bar-file.js
./prj/styles/baz-file.css
Configuration:
.*lib\/controllers/.*.js, lib/controllers/, foo-, .js
.*prj\/controllers/.*.js, prj/controllers/, bar-, .js
.*prj\/styles.*.css, prj/styles/, baz-, .css
Check your config by opening Application: Open your config
for any cases.
If you need you can add more than 3 fellows via your config.cson
. But not more than 9 because this is limitation of Fellowship of the Ring!
fellow1: [".*lib\\/controllers/.*.js""lib/controllers/ns-""foo-"".js"]fellow2: [".*prj\\/controllers/.*.js""prj/controllers/""bar-"".js"]fellow3: [".*prj\\/styles.*.css""prj/styles/""baz-"".css"]fellow4: [".*prj\\/views.*.xml""prj/views/""waldo-"".xml"]
Seriously you could not comfortably work more with 4 splitted views.
You can provide more than 3 replace strings (unlimited potentially), but probably you don't need that.
Please note that Windows FS paths should be like this:
In Atom config:
*some\\path*.scss
some\replace
In cson should be:
".*some\\\\path.*.scss""some\\replace""_ns-"
This plugin cannot cover cases where:
""
cannot replace "ns-"
. Plugin will work only on namespaced files, and you can use settings to somehow work with thisshift-alt-F
to load plugin and open all related files or shift-alt-C
to create fellowssplitHoriz:false
side by side layoutonlyFirstCloseOthers:true
only first fellow close othersonlyFirstSwitchOthers:false
only first fellow switch othersopenEvenIfNotExist:false
create fellows if they not exist on openatom-fellowship:openFellows
, default shift-alt-F
: load plugin and open all related files
atom-fellowship:createFellows
, default shift-alt-C
: load plugin, open all related files and create if someone not exist
Any help is welcome 🙏
MIT © Dima Nechepurenko
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.