This is a spellchecking plugin for Micro editor. For help see the help file.
priner / micro-aspell-plugin Goto Github PK
View Code? Open in Web Editor NEWSpellchecker plugin for Micro editor
License: MIT License
Spellchecker plugin for Micro editor
License: MIT License
This is a spellchecking plugin for Micro editor. For help see the help file.
This is more of a feature request than an issue, but it would be fantastic if support for multiple simultaneous dictionaries were added. I often find myself writing in more than one language in a single file, which results in lots of "misspelled" words. I know that aspell supports this through the use of the --extra-dicts
option, and it would be very useful to have that implemented in this plugin. If not I'd be happy to take a look into implementing it myself, but I figured I should bring it up first. Any help would be appreciated!
I installed MSYS2, opened MSYS2 MSYS and then:
pacman -Syu
pacman -S aspell-devel aspell6-en
Currently, aspell-devel
corresponds to version 0.68, which adds support for Markdown.
In Windows I added C:\msys64\usr\bin
to the user %PATH% and wrote a launcher script for micro:
@ echo off
set MICRO_TRUECOLOR=1
set LANG=en_US.UTF-8
micro.exe %1
Setting the %LANG% environment variable is crucial for the correct functioning of aspell. It took me hours to learn this.
It is also important that C:\msys64\usr\bin
is searched before any other location where sh.exe
is available. E.g. the GitBash installation directory. sh
is the program executed by micro to launch external commands.
Thank you so much for writing this plugin!
Why do I get this error when I ask plugins to update?
╰─➤ micro -plugin list
The following plugins are currently installed:
aspell (1.1.0)
filemanager (3.5.0)
fzf (1.1.0)
joinLines (1.1.6)
manipulator (1.4.0)
status (1.0.0)
autoclose (1.0.0)
comment (1.0.0)
diff (1.0.0)
ftoptions (1.0.0)
linter (1.0.0)
literate (1.0.0)
╰─➤ micro -plugin update
Checking for plugin updates
unable to find a matching version for "aspell"
As the title says, is it not possible to change language while editing, or at least during load WITHOUT changing the settings file each time?
Hi Priner,
this is something that happens quite often, the plugin doesn't start properly most of the time. I need to open each file 2 or 3 time in order to notice underlined words.
This happens on Debian 11 (and testing) as well as on FreeBSD 11 with Micro 2.0.8 and with the 2.0.9 binary (Debian).
Thanks,
Cicorione
micro-misspell-plugin spell-checks on save, and I can now see why. As I type using micro-aspell-plugin, my sentence gets shifted two characters to the right as >>
is prefixed to indicate a misspelled (really incomplete) word and then two characters to the left as it removes ">>" once if I finish typing the word. Once I start typing the next word, the same thing happens. This is very jarring.
You could similarly spell check on save only, reserve the two left most columns for >>
, or simply rely upon the underlining alone.
Hi Priner,
thank you very much for this plugin is really useful.
I love using micro for writing my blog however I am not a coder and I couldn't figuring out what this means:
lua:aspell.addpersonal
Could you help me with a real example as you did to explain other features of your plugin?
Thanks in advance and sorry for dumb question!
Cicorione
Would you accept a PR that adds a function to toggle the spellchecking?
Pro: having it on all the times is annoying, I don't know how anyone can cope with aspell underlining everything when you write code
Contra: It's a hack, a real solution would be to add a command to micro that toggles buffer settings (however in this case, the spellchecker needs to re-run, so the real solution would need onBufferModified()
too)
This is what I have in my local fork currently:
function togglecheck(bp, args)
local buf = bp.Buf
if buf.Settings["aspell.check"] == "on" then
buf.Settings["aspell.check"] = "off"
else
buf.Settings["aspell.check"] = "on"
end
spellcheck(buf)
end
The docs say "only XML, C++, C, HTML, Perl TeX and Markdown." I've manually included text files, but I think it should be in auto as well.
Is there a way I can disable/enable spellcheck of an already opened file?
I can run setlocal aspell.check on
/off
but that seems to behave rather odd - it only starts happening when I change the buffer.
I guess adding a custom command that does the above + calls spellcheck(bp.Buf)
might work. I can try submitting a PR if this would be acceptable.
Hi there,
is it possible using multiple languages and dictionaries at the same time?
Thanks!
C.
This is fantastic, thank you!
Will it be possible to support replacing a mispelled word with a suggested one?
The bounce plugin allows navigating between lines flagged by e.g. a linter or containing words flagged by the aspell plugin. What is needed is to increase the granularity of this navigation to be able to move the cursor to every flagged word in a line.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.