Skip to content

Instantly share code, notes, and snippets.

@smathot
Created January 3, 2016 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smathot/018374e0443f0d02f6d3 to your computer and use it in GitHub Desktop.
Save smathot/018374e0443f0d02f6d3 to your computer and use it in GitHub Desktop.
Script to start Atom with non-English spellchecking on Linux
#!/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