Created
January 3, 2016 10:55
-
-
Save smathot/018374e0443f0d02f6d3 to your computer and use it in GitHub Desktop.
Script to start Atom with non-English spellchecking on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# atom-locale [locale] | |
# Example (for French): | |
# atom-locale fr_FR | |
# Important note: | |
# This permanently changes the locale for atom spellchecker. | |
# To reset back to English, start with en_US locale. | |
ATOM_HUNSPELL_FOLDER="/opt/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/vendor/hunspell_dictionaries" | |
HUNSPELL_FOLDER="/usr/share/hunspell" | |
sudo mv "$ATOM_HUNSPELL_FOLDER/en_US.aff" "$ATOM_HUNSPELL_FOLDER/en_US.aff.bak" | |
sudo mv "$ATOM_HUNSPELL_FOLDER/en_US.dic" "$ATOM_HUNSPELL_FOLDER/en_US.dic.bak" | |
sudo cp "$HUNSPELL_FOLDER/$1.aff" "$ATOM_HUNSPELL_FOLDER/en_US.aff" | |
sudo cp "$HUNSPELL_FOLDER/$1.dic" "$ATOM_HUNSPELL_FOLDER/en_US.dic" | |
atom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment