Difference between revisions of "Kate Text Editor"
m |
m (→Spell Check Not Working) |
||
Line 22: | Line 22: | ||
Run kate from console. | Run kate from console. | ||
In kate goto | In kate goto | ||
− | * | + | * Tools -> Spelling -> Automatic Spell Checking |
If you see the following errors in console: | If you see the following errors in console: | ||
Sonnet: No speller backends available! | Sonnet: No speller backends available! | ||
No language dictionaries for the language: "en" | No language dictionaries for the language: "en" | ||
+ | |||
+ | The fix is done in a few simple steps. | ||
+ | |||
+ | Step #1 - Close Kate | ||
+ | |||
+ | Step #2 - Install sonnet-plugins | ||
+ | sudo apt-get install sonnet-plugins | ||
+ | |||
+ | Step #3 - Open Kate and Disable automatic language detection and set defaults | ||
+ | * Settings -> Configure kate -> Editor Component, Editing -> and select the "Spellcheck" TAB | ||
+ | * Default language: American English (United States) | ||
+ | * [ ] uncheck "enable autodetection of language" | ||
+ | * [x] check Automatic spell checking enabled by default | ||
+ | * Click APPLY and OK | ||
+ | |||
+ | Now Kate should be working with automatic spell checking as you type, misspelled words will be underline red. | ||
+ | |||
+ | More details... | ||
+ | |||
sonnet-plugins (see packages.ubuntu.com) spell checking library for Qt by installing it with | sonnet-plugins (see packages.ubuntu.com) spell checking library for Qt by installing it with | ||
sudo apt-get install sonnet-plugins | sudo apt-get install sonnet-plugins | ||
Line 43: | Line 62: | ||
You can simply install all the dictionaries with (not recommended) | You can simply install all the dictionaries with (not recommended) | ||
dnf -y install hunspell* | dnf -y install hunspell* | ||
+ | |||
+ | Language "auto-detection" can cause problems. The problematic setting which is enabled by default is [x] Enable autodetection of language. [https://linuxreviews.org/HOWTO_make_spellchecking_in_KDE_applications_function_properly You absolutely have to disable this setting] in order to use spell checking in KDE applications. | ||
== references == | == references == |
Revision as of 16:18, 5 March 2020
F7 Command Line
internal command line
text entry at the bottom of the editor area; to show it select View → Switch to Command Line or use the shortcut (default is F7).
To execute a command, type the command then press the return key.
If you entered the command line by pressing F7 it will automatically hide after a few seconds. To clear the message and enter a new command, press F7 again.
list of all available commands issue help list
help list help <command>
commands are provided by the editor component, and allow you to configure the active document and view only.
Open File Dialog
Kate does not use its own internal open file dialog. If you run Kate with KDE window manager then Kate should use the KDE file open dialog which offers configurable options like "show file extension" or allowing you to sort by file extension. If Kate is installed on a non-KDE system such as a Ubuntu system or Mint system then the GTK very limited "sucky" file dialog is used. The GTK dialog is total crap and lacks many useful features. You can't filter the file view to do things such as show only text files, you can't sort by file extension, and you cant see image thumbnails. There does not seem to be a way to not use the GTK File Chooser under a GNOME, Cinnamon or XFCE desktop. GTKFileChooser just sucks.
Spell Check Not Working
Run kate from console. In kate goto
- Tools -> Spelling -> Automatic Spell Checking
If you see the following errors in console:
Sonnet: No speller backends available! No language dictionaries for the language: "en"
The fix is done in a few simple steps.
Step #1 - Close Kate
Step #2 - Install sonnet-plugins
sudo apt-get install sonnet-plugins
Step #3 - Open Kate and Disable automatic language detection and set defaults
- Settings -> Configure kate -> Editor Component, Editing -> and select the "Spellcheck" TAB
- Default language: American English (United States)
- [ ] uncheck "enable autodetection of language"
- [x] check Automatic spell checking enabled by default
- Click APPLY and OK
Now Kate should be working with automatic spell checking as you type, misspelled words will be underline red.
More details...
sonnet-plugins (see packages.ubuntu.com) spell checking library for Qt by installing it with
sudo apt-get install sonnet-plugins
KDE uses "Sonnet" as the spelling framework. Apparently it can use Hunspell underneath (and also Aspell). Sonnet is the spelling checker used by KDE applications such as Kate, KMail, and KWord. It is a GUI frontend to various free spell checkers.
Check for installed dictionaries
dpkg -l | grep -iE "dict|spell.*(check|correct)"
or
KDE's spellchecker uses a framework called sonnet which simply acts as a middle-man for hunspell or the older aspell spellcheckers. The dictionaries for hunspell are typically packaged by distributions in separate packages named hunspell-$languagecode. You can see which are available on your platform with a command such as
apt search hunspell-
and
dnf search hunspell-
You can simply install all the dictionaries with (not recommended)
dnf -y install hunspell*
Language "auto-detection" can cause problems. The problematic setting which is enabled by default is [x] Enable autodetection of language. You absolutely have to disable this setting in order to use spell checking in KDE applications.