Conversation
Codecov Report
@@ Coverage Diff @@
## master #4291 +/- ##
==========================================
- Coverage 81.41% 79.94% -1.48%
==========================================
Files 115 108 -7
Lines 145384 141951 -3433
==========================================
- Hits 118370 113486 -4884
- Misses 27014 28465 +1451
Continue to review full report at Codecov.
|
|
This looks like a good idea. I think using z? would be OK. I don't think there is something else that this command would do. This is a todo note for using it to search in not-folded text, but that could perhaps better be done with a regexp item. |
|
I just realized that adding an upper-cased variant for z? to add a rare word to the internal word list will be impossible. Are we okay with that? I think that would be fine, but just checking. |
Fine with me. If I want to have a word marked as rare, I would like to have it marked not only for the current session, but always. |
|
I just realized that adding an upper-cased variant for z? to add a
rare word to the internal word list will be impossible. Are we okay
with that?
I think that would be fine, but just checking.
You are right, that restricts the usage. I think we should try hard to
make this consistent.
We could use z/ and z?, on a US keyboard ? is the shifted character of
/. But it's hard to see the relation with "rare".
There are not many "z" letter commands still available:
zp
zq
zu
zy
Perhaps zq/zQ could be used, as I can't think of any other use for them.
It's a bit dangerous though, since ZQ is equivalent to ":q!", drops all
changes. Perhaps a warning would be sufficient? Or the user could map
ZQ to zQ to avoid trouble, if he never uses ZQ now.
…--
PRINCE: He's come to rescue me, father.
LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ...
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
On 2019-04-24, Bram Moolenaar wrote:
> I just realized that adding an upper-cased variant for z? to add a
> rare word to the internal word list will be impossible. Are we okay
> with that?
>
> I think that would be fine, but just checking.
You are right, that restricts the usage. I think we should try hard to
make this consistent.
We could use z/ and z?, on a US keyboard ? is the shifted character of
/. But it's hard to see the relation with "rare".
There are not many "z" letter commands still available:
zp
zq
zu
zy
Perhaps zq/zQ could be used, as I can't think of any other use for them.
It's a bit dangerous though, since ZQ is equivalent to ":q!", drops all
changes. Perhaps a warning would be sufficient? Or the user could map
ZQ to zQ to avoid trouble, if he never uses ZQ now.
Using zQ when a slip of the shift-key finger could easily change it
to ZQ with disastrous results seems like a bad idea. A warning
would be annoying, especially since one presumably would use ZQ
instead of :q! to avoid keystrokes.
How about zu/zU for z-uncommon?
Regards,
Gary
|
|
zu is part of the zug/zuG/zuw/zuW chains. I don't think we can use that (that was also my first choice!) I don't think zQ/ZQ typos are that likely? At least, not how I type it. Perhaps it is different for others. More importantly, zq doesn't strike me as very mnemonic, whereas z? kind-of is. I think z/ makes more sense (or rather, it's the option that sucks the least). |
|
|
|
Yeah, that's definitely an option as far as I'm concerned, and also the reason I didn't add any normal mode commands in the initial patch. I can add some docs on how to map it in the :spellrare docs for convenience. |
|
I updated the PR to mention normal mode mappings in the docs, and I added a few tests. I put them in vim_spellfile.vim. That seemed to make sense to me, since it's testing spellfile.c. I can put it in vim_spell.vim too, if people prefer. |
|
@brammool If this PR were to be updated to merge cleanly, would you be willing to merge it? I’m happy to do the work as long as it wouldn’t be a wasted effort :-) |
|
@brammool If this PR were to be updated to merge cleanly, would you be
willing to merge it? I’m happy to do the work as long as it wouldn’t
be a wasted effort :-)
It seems useful and consistent. I see you added a remark in the docs
about adding mappings, that's a reasonable answer to the Normal mode
command discussion.
…--
To keep milk from turning sour: Keep it in the cow.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
I updated the patch; should apply cleanly to latest master now; tested again, and seems all good. |
Add :spellrare as a compliment to :spellgood and :spellwrong. I didn't add the normal mode commands, as zr and zR is already taken for folding, so I added docs to mention normal mode mappings.
Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim#4291)
…lrare Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim/vim#4291) vim/vim@08cc374
…lrare Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim/vim#4291) vim/vim@08cc374
…lrare Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim/vim#4291) vim/vim@08cc374
…lrare Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim/vim#4291) vim/vim@08cc374
Add :spellrare as a compliment to :spellgood and :spellwrong.
I didn't add the normal mode commands, as zr and zR is already taken for
folding. I'm not sure which keys would make sense, if any? The only
letters that are still free are zp, zq, and zy. Another alternative
might be z?