Atom
Version vom 5. Januar 2018, 09:41 Uhr von Jochen (Diskussion | Beiträge)
Package: atom-mdtoc
Dieses Atom Package liefert den folgenden Fehler:
Uncaught RangeError: Invalid array length
Dieser kann in folgender Datei behoben werden:
~/.atom/packages/atom-mdtoc/lib/toc-view.coffee
Hierzu müssen folgende Ersetzungen vorgenommen werden:
// replace
String::repeat = (n) -> Array(n+1).join(this)
// to
String::_repeat_ = (n) -> Array(n+1).join(this)
//replace
@tocContent += ' '.repeat(level - 1)
//to
@tocContent += ' '._repeat_(level - 1)
//replace
@tocContent += ' '.repeat(level - 1) + '- '
//to
@tocContent += ' '._repeat_(level - 1) + '- '
Deutsche Rechtschreibkorrektur - Probleme mit Umlauten
Bei der Verwendung des Pakets spell-check, welches standardmäßig installiert ist, werden Wörter mit Umlaufen nicht als falsch markiert. In den Vorschlägen sind die Umlaute falsch kopiert. Der folgende Beitrag korrigiert dies unter Linux. Das Original ist hier zu finden.
That works indeed!
But it might not be immediately clear what one has to do exactly to achieve this. Therefore the following step-by-step workaround for (Swiss) German Linux/Ubuntu users (type all the commands into a standard terminal):
- List all the system-wide installed hunspell dictionaries:
hunspell -DYou might have to install the package hunspell beforehand.- Create a new directory for the custom dictionary files with UTF-8 encoding; I'd recommend:
mkdir ~/.atom/custom_spellchecker_dictionaries/Of course you could also directly convert the original dictionary files. But since I don't know what potential side effects in conjunction with other programs that could have, I wouldn't recommend it.- Create UTF-8 versions of all the relevant dictionary files in the new directory. Example for (Swiss) German and English dictionaries:
iconv -f ISO-8859-1 -t UTF-8 /usr/share/hunspell/de_CH.aff | sed 's/^SET ISO8859-1$/SET UTF-8/g' > ~/.atom/custom_spellchecker_dictionaries/de_CH.afficonv -f ISO-8859-1 -t UTF-8 /usr/share/hunspell/de_CH.dic > ~/.atom/custom_spellchecker_dictionaries/de_CH.diciconv -f ISO-8859-1 -t UTF-8 /usr/share/hunspell/de_DE.aff | sed 's/^SET ISO8859-1$/SET UTF-8/g' > ~/.atom/custom_spellchecker_dictionaries/de_DE.afficonv -f ISO-8859-1 -t UTF-8 /usr/share/hunspell/de_DE.dic > ~/.atom/custom_spellchecker_dictionaries/de_DE.diciconv -f ISO-8859-1 -t UTF-8 /usr/share/hunspell/en_US.aff | sed 's/^SET ISO8859-1$/SET UTF-8/g' > ~/.atom/custom_spellchecker_dictionaries/en_US.afficonv -f ISO-8859-1 -t UTF-8 /usr/share/hunspell/en_US.dic > ~/.atom/custom_spellchecker_dictionaries/en_US.dicYou might have to adjust the paths to the ouptut of hunspell -D; the above are valid in Ubuntu 16.04 LTS.- Set the path to the new folder in the option Locale Paths of the Atom spell-check package (note that you can only use absolute paths, so no ~ shortcut). If you followed the recommendation under 1), the path would be: /home/USERNAME/.atom/custom_spellchecker_dictionaries/.
- Restart Atom.