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

Beta Version 629 #350

Closed
jefferysmall opened this issue Mar 17, 2023 · 6 comments
Closed

Beta Version 629 #350

jefferysmall opened this issue Mar 17, 2023 · 6 comments

Comments

@jefferysmall
Copy link

jefferysmall commented Mar 17, 2023

I understood that support for vim tab settings was included in the latest version of less so I downloaded and tried it. I did not find that it obeyed the commands at the top of the file such as:

# vim:ts=8
or
<!-- vim:ts=4

Also, this version was not acknowledging my lesskey settings. I see that this has changed so that it reads the source bindings directly rather than from a compiled file so I set LESSKEY to point to the source file but this didn't work.

Am I confused regarding both of these issues?

Thanks.

@gwsw
Copy link
Owner

gwsw commented Mar 17, 2023

For the first issue, you need to use the --modelines option to tell less to look for vim-compatible mode lines. See the description of --modelines in the man page for more details.

For the second, you should use the LESSKEYIN rather than LESSKEY environment variable to specify the lesskey source file. See the description of the --lesskey-src option and the KEY BINDINGS section in the man page for more details.

@jefferysmall
Copy link
Author

Great. Thanks for the pointers. The --modelines option fixed that problem. One other problem with the lesskey source file; I have many definitions that work, but I have two keys that issue:

<Esc>[55~ and <Esc>[56~

I have two lines in the lesskey file:

\e[55~          toggle-option x 4 \n
\e[56~          toggle-option x 8 \n

These worked in previous versions of less, but do not seem to be doing anything with version 629. I tried removing the --modelines option, but that didn't change anything. Has something changed regarding this command?

And while it's not a serious problem, Is there anyway to make a single key toggle the tabstops between 4 and 8?

Regards.

@gwsw
Copy link
Owner

gwsw commented Mar 17, 2023

Thanks, this is indeed a bug in less-629, triggered by the space after the "x". It is fixed in 6ad8ce0.

@jefferysmall
Copy link
Author

Great. Will this automatically be in the source for 629 that gets pulled from the download page (greenwoodsoftware.com/less/download.html) or do I need to do a pull request directly from GitHub? I don't use GitHub much so if the latter, can you tell me the command to pull the latest source? Thanks.

@gwsw
Copy link
Owner

gwsw commented Mar 17, 2023

The fix won't be added to less-629 but it will be in the next version, which will be less-630. I'll probably release that in a week or so. In the meantime, you have three options:

  1. Wait for less-630.
  2. Pull the latest source from github. To do that you would do "git clone https://github.com/gwsw/less".
  3. Workaround the problem by removing the space after the "x" in your lesskey file.

I'd recommend option 3.

@jefferysmall
Copy link
Author

I'll wait for the update and I did fix the lesskey file which solved the problem. Thanks again. The addition of the modelines option is awesome!

@gwsw gwsw closed this as completed Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants