8000 This line only works in .vim files · Issue #118 · wincent/wincent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This line only works in .vim files #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and cont 8000 act 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

Closed
abzrg opened this issue Aug 20, 2021 · 2 comments
Closed

This line only works in .vim files #118

abzrg opened this issue Aug 20, 2021 · 2 comments

Comments

@abzrg
Copy link
abzrg commented Aug 20, 2021

I'm not sure why this bit of code works in .vim files and not in anything else.

-- Highlight up to 255 columns (this is the current Vim max) beyond 'textwidth'

I took it from one of your videos. So what I have in my set up is:

vim.opt.colorcolumn = '79'
vim.opt_local.colorcolumn = '+' .. vim.fn.join(vim.fn.range(0,254), ',+')
@abzrg
Copy link
Author
abzrg commented Aug 20, 2021

I made a mistake. Instead of setting 'textwidth' to 79 I set 'colorcolumn' to 79. Sorry for the noise.

- vim.opt.colorcolumn = '79'
+ vim.opt.textwidth = 79
vim.opt_local.colorcolumn = '+' .. vim.fn.join(vim.fn.range(0,254), ',+')

@abzrg abzrg closed this as completed Aug 20, 2021
@wincent
Copy link
Owner
wincent commented Aug 20, 2021

Yep, those + values are relative to the textwidth.

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
0