Comments (2)
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.
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)
- Exception when getting into visual mode HOT 4
- feat: add support for other visual modes HOT 1
- [bug]: wrong background highlight HOT 2
- perf: don't process the entire body of text for every movement HOT 2
- Show zero width characters HOT 3
- Error when using CRLF HOT 5
- Invalid 'col': out of range -> When using CRLF and space (0x20) is following HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visual-whitespace.nvim.