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

Smart relative line number too close to code in Notebook view #7130

Closed
AnsonH opened this issue Oct 5, 2021 · 4 comments
Closed

Smart relative line number too close to code in Notebook view #7130

AnsonH opened this issue Oct 5, 2021 · 4 comments

Comments

@AnsonH
Copy link

AnsonH commented Oct 5, 2021

Problem

When smart relative line number is enabled ("vim.smartRelativeLine": true), the line numbers in the Jupyter Notebook cell is too close to the code if the cursor is not on those lines. Is it possible to add right margin to these line numbers?

👇 When smart relative line number is enabled
screenshot

Steps to Reproduce

  1. Enable smart relative line number with "vim.smartRelativeLine": true
  2. Create a new Jupyter Notebook file (eg. foo.ipynb)
  3. Create a new cell in the Notebook and add some lines to the cell
  4. Notice that the line number except for the line the cursor is currently on lacks right margin

Environment

  • Extension (VsCodeVim) version: v1.21.8
  • VSCode version: v1.60.2
  • Jupyter extension version: v2021.8.2041215044
  • OS: Windows 10 Version 20H2 (Build 19042.1237)
@J-Fields
Copy link
Member

J-Fields commented Oct 6, 2021

This is almost certainly an issue with VS Code, not the plugin. If you just set editor.lineNumbers: 'relative' directly, do you have the same problem?

@AnsonH
Copy link
Author

AnsonH commented Oct 7, 2021

Line numbers are invisible (which is normal) for editor.lineNumbers: 'relative' and vim.smartRelativeLine: false:

screenshot

However, the weird line number behavior comes back for editor.lineNumbers: 'relative' and vim.smartRelativeLine: true

image

I'm not sure whether this extension is causing this behavior

@AnsonH
Copy link
Author

AnsonH commented Oct 12, 2021

This issue is now fixed in the latest Jupyter extension v2021.9.1001312534:

image

@AnsonH AnsonH closed this as completed Oct 12, 2021
@marcusfschmidt
Copy link

I seem to be getting this issue now, almost a year after the above.

Here, in normal mode:
image

And here in insert mode:
image

My environment is as follows:

  • VsCodeVim version: v1.23.2
  • VSCode version: v1.70.2
  • Jupyter extension version: v2022.7.1102252217
  • OS: Windows 10 Version 21H2 (Build 19044.1889)

As far as I can tell, the fix has been broken at some point.
Thanks in advance.

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