Difference between revisions of "Atom"
Added categories
imported>Kicoax m (Changed 'n' to and) |
imported>Qazaaq (Added categories) |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Atom is a completely free, open-source, highly-extensible text editor based on Chromium and Node.js. | '''Atom''' is a completely free, open-source, highly-extensible text editor based on Chromium and Node.js. | ||
It was created and is being actively developed by the GitHub team. | It was created and is being actively developed by the GitHub team. | ||
It can be downloaded from the [https://atom.io/ official Atom site]. | It can be downloaded from the [https://atom.io/ official Atom site]. | ||
Atom's interface and functionality is very similar to Sublime Text, so it's a fairly painless transition if you have experience with it. | Atom's interface and functionality is very similar to [[Sublime Text]], so it's a fairly painless transition if you have experience with it. | ||
Atom has an extremely flexible package system that allows customization of virtually everything about the editor. | Atom has an extremely flexible package system that allows customization of virtually everything about the editor. | ||
{{See Wikipedia|Atom (text editor)}} | |||
==Installation== | ==Installation== | ||
Line 9: | Line 11: | ||
#Go to [https://atom.io/ the Atom website], download the setup file, and run it. | #Go to [https://atom.io/ the Atom website], download the setup file, and run it. | ||
===Install | ===Install packages=== | ||
* Fallout 4 [https://atom.io/packages/language-papyrus language-papyrus] | |||
* F4SE [https://github.com/Neanka/atom-language-papyrus language-papyrus] | |||
Syntax highlighting and snippets are provided by the one of the language packages. | |||
Compilation is provided by the [https://atom.io/packages/build build] and [https://atom.io/packages/build-papyrus build-papyrus] packages. | Compilation is provided by the [https://atom.io/packages/build build] and [https://atom.io/packages/build-papyrus build-papyrus] packages. | ||
#In Atom, open the settings tab (File -> Settings, or {{key press|Ctrl|,}}) | #In Atom, open the settings tab (File -> Settings, or {{key press|Ctrl|,}}) | ||
Line 27: | Line 32: | ||
==Usage== | ==Usage== | ||
===Snippets=== | ===Snippets=== | ||
The available snippets are nearly identical to the [[Sublime Text#Existing_Snippets|Sublime Text plugin's snippets]]. | |||
To use a snippet, just begin typing the name of a function/event/other snippet, and a list of matched snippets will appear. | |||
You can choose which one to use with the arrow keys or mouse, and complete it by pressing {{key press|Tab}} or clicking on it. | |||
Immediately after autocompletion, you may be able to cycle through pieces of it by pressing {{key press|Tab}} again, depending on the snippet. | |||
===Compilation=== | ===Compilation=== | ||
Line 43: | Line 51: | ||
You should only have one project/configuration file in any folder, as build-papyrus only uses the first one it locates. | You should only have one project/configuration file in any folder, as build-papyrus only uses the first one it locates. | ||
Upon adding or removing a project/configuration file, make sure you run the <code>Build: Refresh Targets</code> command in the palette ({{key press|Ctrl|Shift|P}}). | Upon adding or removing a project/configuration file, make sure you run the <code>Build: Refresh Targets</code> command in the palette ({{key press|Ctrl|Shift|P}}). | ||
More information is available in the [https://github.com/Gawdl3y/atom-build-papyrus/blob/master/README.md build-papyrus readme file]. | |||
====Project file==== | ====Project file==== | ||
Line 49: | Line 59: | ||
====Manual configuration==== | ====Manual configuration==== | ||
Place the below text into a file called <code>.build-papyrus.yml</code> in the base folder you have open in Atom: | Place the below text into a file called <code>.build-papyrus.yml</code> in the base folder you have open in Atom: | ||
< | <source lang="yaml"> | ||
game: fallout4 | |||
output: C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Data\Scripts\ | |||
imports: | imports: | ||
- C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\User | - C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\User | ||
Line 56: | Line 68: | ||
- C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\DLC01 | - C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\DLC01 | ||
- C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\Base | - C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\Base | ||
</source> | |||
If your mod's scripts are outside of the game's scripts directory, make sure you add it to the <code>imports</code> setting, and change the <code>output</code> directory. | If your mod's scripts are outside of the game's scripts directory, make sure you add it to the <code>imports</code> setting, and change the <code>output</code> directory. | ||
If you do not have the DLC, simply remove them from the <code>imports</code> setting. | If you do not have the DLC, simply remove them from the <code>imports</code> setting. | ||
==Tips and | ==Tips and tricks== | ||
*Pressing {{key press|Ctrl|P}} will open a fuzzy finder for all files in the folder you have open. It will list files that match your search in real-time. You can type file names in just about any shorthand you can think of, and it will find them correctly. "comph" will match "CompanionsHousekeepingScript", for example. | *The command palette ({{key press|Ctrl|Shift|P}}) lists every single command available in Atom, with a fuzzy finder. If you ever forget a hotkey, you can search for the command with its full/partial name or whatever shorthand you come up with. Searching {{kbd|brt}} will find <code>Build: Refresh Targets</code>, for example. | ||
*Pressing {{key press|Ctrl|P}} will open a fuzzy finder for all files in the folder you have open. It will list files that match your search in real-time. You can type file names in just about any shorthand you can think of, and it will find them correctly. "comph" will match a file named "CompanionsHousekeepingScript.psc", for example. | |||
*After compiling, if there are any errors, you can cycle through them with {{key press|Ctrl|Alt|G}} or {{key press|F4}}. You can also jump straight to the first error with {{key press|Ctrl|Alt|H}} or {{key press|Shift|F4}}. Additionally, you can click on the errors at the bottom of the window to jump to them. The linter package will also list the errors in a much prettier, more usable way. | *After compiling, if there are any errors, you can cycle through them with {{key press|Ctrl|Alt|G}} or {{key press|F4}}. You can also jump straight to the first error with {{key press|Ctrl|Alt|H}} or {{key press|Shift|F4}}. Additionally, you can click on the errors at the bottom of the window to jump to them. The linter package will also list the errors in a much prettier, more usable way. | ||
*Holding {{key press|Ctrl}} allows you to move lines up and down with the arrow keys. | *Holding {{key press|Ctrl}} allows you to move lines up and down with the arrow keys. | ||
Line 85: | Line 97: | ||
*[https://atom.io/packages/clipboard-plus clipboard-plus] - Keeps your clipboard history | *[https://atom.io/packages/clipboard-plus clipboard-plus] - Keeps your clipboard history | ||
==See Also== | |||
*[[:Category:Text Editors|Other Text Editors]] | |||
[[Category:Text Editors]] | |||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category: | [[Category:Tooling]] |