Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with the man page keybinding tables #1033

Open
ilyagr opened this issue Aug 8, 2022 · 5 comments
Open

Issues with the man page keybinding tables #1033

ilyagr opened this issue Aug 8, 2022 · 5 comments

Comments

@ilyagr
Copy link

ilyagr commented Aug 8, 2022

  • The key table in the visual mode subsubsection of the Multiple selections subsection of the Vim commands section is messed up. For example, <C-u> should correspond to making the previous selection primary and <C-k> should probably not be in the table at all.

  • Specifically in the HTML version of the man page linked to from the README, http://martanne.github.io/vis/man/vis.1.html#Multiple_Selections, the corresponding rows in this and many other tables are misaligned. It's hard to know which key combination corresponds to which description.

    This is what it looks like to me on Chrome (the screenshot demonstrates both problems):

    image

@ilyagr ilyagr changed the title Some issues with the man page Some issues with the man page keybinding tables Aug 8, 2022
@ilyagr ilyagr changed the title Some issues with the man page keybinding tables Issues with the man page keybinding tables Aug 8, 2022
@ilyagr
Copy link
Author

ilyagr commented Aug 8, 2022

This is strictly speaking a separate issue, but I'll put it here. In all documentation, I'm quite confused by the description of the <C-c> command as "Remove count selection column" and the similar description of the <C-l> command.

After some experimentation, I think it removes all the selections that overlap the count column, or the current column by default, but I'm not entirely sure.

@mcepl
Copy link
Contributor

mcepl commented Dec 23, 2022

I guess, I would say “patches welcome”. Somebody has to go and study how to fix those manpages. Could it be you, please?

@rnpnr
Copy link
Collaborator

rnpnr commented May 3, 2023

For the first issue <C-k> and <C-u> do the same thing in visual mode. This is the same for the <C-d> and <C-j> pair. This is slightly more clear when using a manpager in the terminal but I will submit a patch making it more explicit.

For the second issue this seems to be a bug in mandoc.css which was just taken from upstream mandoc. I'm not intimately familiar with CSS so I don't know what the correct fix is but it can be hacked around with the following patch which has minimal effect on the rest of the page:

diff --git a/man/mandoc.css b/man/mandoc.css
index d75700a..50c54ec 100644
--- a/man/mandoc.css
+++ b/man/mandoc.css
@@ -143,7 +143,7 @@ h2.Ss {		margin-top: 1.2em;
 		overflow: auto; }
 .Bl-compact {	margin-top: 0em; }
 .Bl-compact > dd {
-		margin-bottom: 0em; }
+		margin-bottom: 0.15em; }
 .Bl-compact > dt {
 		margin-top: 0em; }

The problem is that the gh-pages branch is automatically generated. I guess I could submit a patch that applies the above using sed in the github workflow but it seems hacky.

rnpnr added a commit to rnpnr/vis that referenced this issue May 3, 2023
it is hard to tell which line <C-u> and <C-d> are supposed to belong to
in the current version.

see martanne#1033
@rnpnr
Copy link
Collaborator

rnpnr commented May 7, 2023

I'm quite confused by the description of the <C-c> command as "Remove count selection column" and the similar description of the <C-l> command.

For this I don't think there is anything wrong with what the manpage says. It just that this is something that is hard to grasp without an example. Consider the following text and perform the steps that follow:

1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
  1. Select everything vi<Tab>
  2. Split the selection up :x/[1-5]/
  3. Remove all but count column 3<C-l>

Repeat but do the following instead:

  1. Remove count selection column 3<C-c>

Hope this helps!

@ilyagr
Copy link
Author

ilyagr commented May 11, 2023

I still find it a little confusing. I think one of the following would be clearer (note that the two options describe different behavior):

  • For each line, remove the count-th selection on that line
  • For each line, remove the selection containing the count-th column

Thank you for the example, though. I haven't used vis for a while, but if I did, it would have helped (and I could figure out which of the options above it is).

ninewise pushed a commit that referenced this issue May 23, 2023
it is hard to tell which line <C-u> and <C-d> are supposed to belong to
in the current version.

see #1033
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants