GithubHelp home page GithubHelp logo

Comments (2)

mcauley-penney avatar mcauley-penney commented on May 18, 2024

I'm open to this, and have something really basic already implemented for it, but I'll have to think about it a bit more. I don't want to force users into it so it would definitely be opt-in.

It is simple for eol but there are multiple types of space and tab listchars.

To adhere to listchars strictly, I'll have to check how many spaces there are and where they are at in the line, given that listchars affords space, lead, trail, multispace, leadmultispace.

If the file uses tabs, the plugin will have to deal with the fact that tabs and the tab listchars have flexible lengths, such as with tab:xy and tab:xyz. I'll have to check at least the tabstop length, get the tab listchar, then trim it correctly (it is shortened and expanded differently depending on if you give xy or xyz).

If we expect strict adherence to listchars and you have listchars set but don't use each of the ones listed above, it becomes worthless because you have to set options somewhere anyway. If you do use each of the given listchars, you can already see them in visual mode. If we do not expect strict adherence, we then have to choose which listchars to use.

from visual-whitespace.nvim.

vollowx avatar vollowx commented on May 18, 2024

Thanks for your reply first!

To be honest, I didn't think of the complexity of reading vim.opt.listchars as default config before, as I personally use single-char for each type. Now configurating separated seems to be the better choice.

However, there's another idea: we could only read the listchars if its length is 1, otherwise we just ignore it.

from visual-whitespace.nvim.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.