RL_Dane,
@RL_Dane@fosstodon.org avatar

Hey #vim / #NeoVim gurus,

Is there any way to make the spelling checker ignore words with numbers in them?

Couldn't find a good answer online.

normalmode,
@normalmode@mastodon.social avatar

@RL_Dane Kind of. You can do this:

:syntax match WordsWithNumbers /\w*\d\w*/ containedin=ALL contains=@NoSpell

...but that will also prevent other highlighting from starting inside those words, which may or may not be an issue for you.

If it is an issue, you might be able to get around it by tacking on an extra contains=ALL, but it really depends on the rest of your syntax highlighting as to whether that will improve things or make it worse!

RL_Dane,
@RL_Dane@fosstodon.org avatar

@normalmode

Ah, that sounds kinda dodgy. I guess I'll leave it as is.

Thanks for the info, though!

scy,
@scy@chaos.social avatar

@RL_Dane As far as I understand it, this is not configurable. See the WORDS section in https://vimhelp.org/spell.txt.html.

You could maybe hack something by having syntax highlighting match the words you wish to exclude and tag them with contains=@NoSpell (see :h spell-syntax), but I haven't tested this and it's probably full of side effects.

d0debf9fb12def81f43d7c69429bb784812ac1e4d2d53a202db6aac7ea4b466c,
@d0debf9fb12def81f43d7c69429bb784812ac1e4d2d53a202db6aac7ea4b466c@mostr.pub avatar

Doesn't the dictionary file accept patterns? If not, it definitely should 😅

RL_Dane,
@RL_Dane@fosstodon.org avatar

@d0debf9fb12def81f43d7c69429bb7@mostr.pub

Maybe? I haven't seen any info about that.

But then again, I use maybe 1% of n?vim's features. XD

  • All
  • Subscribed
  • Moderated
  • Favorites
  • vim
  • ngwrru68w68
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • kavyap
  • cubers
  • megavids
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines