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

Support for conceal string - cstr in addition to cchar #4687

Open
XVilka opened this issue Jul 16, 2019 · 10 comments
Open

Support for conceal string - cstr in addition to cchar #4687

XVilka opened this issue Jul 16, 2019 · 10 comments
Labels

Comments

@XVilka
Copy link

@XVilka XVilka commented Jul 16, 2019

To show the string instead of the concealed text fragment, without various additional hacks. So, for example in addition to

 syntax keyword int int conceal cchar=

you would be able to write something like this:

syntax keyword int64 int64 conceal cstr='ℤ64'
@XVilka XVilka added the enhancement label Jul 16, 2019
@marcotrosi

This comment has been minimized.

Copy link

@marcotrosi marcotrosi commented Jul 20, 2019

I have a list of feature requests and this is one of them. thank you.
In my Vim user group we also discussed recently why conceal is limited to single characters.
cstr seems to make sense. I'm very interested to hear what @brammool thinks about it.

@brammool

This comment has been minimized.

Copy link
Member

@brammool brammool commented Jul 20, 2019

@marcotrosi

This comment has been minimized.

Copy link

@marcotrosi marcotrosi commented Jul 20, 2019

Thanks @brammool for the insight.
I could ask around and collect useful use cases to see if it is worth the effort someday in the future.

@ngenisis

This comment has been minimized.

Copy link

@ngenisis ngenisis commented Jul 30, 2019

Here's a use case I've run up against: when editing Mathematica code, I would like to conceal things like \[FormalQ] to (as in the Mathematica front-end), but cchar does not seem to support combining characters.

@ybearzi

This comment has been minimized.

Copy link

@ybearzi ybearzi commented Aug 7, 2019

Here's another use case. When spaces are used instead of tabs, I don't find a way of displaying tabs as "| " for example if tabs are 2 spaces, to better see alignment (especially in xml files).

@keshavchand

This comment has been minimized.

Copy link

@keshavchand keshavchand commented Sep 7, 2019

It would be better if cstr could include regex such as:

syntax keyword int '\vi(\d)' conceal cstr='\vℤ$1'
@mipmip

This comment has been minimized.

Copy link

@mipmip mipmip commented Sep 9, 2019

I could ask around and collect useful use cases to see if it is worth the effort someday in the future.

Forgive me if this is a stupid suggestion. I may have a use case for this feature, but I can not oversee if this features makes it possible. I would like to create a character based image previewer for markdown. E.g. using dotmatrix. It should conceal a markdown image link and show a dynamically created and cached image representation.

@marcotrosi

This comment has been minimized.

Copy link

@marcotrosi marcotrosi commented Sep 9, 2019

I don't know why, and it's not a feature request or so, but my brain is now always thinking "SIXEL graphics support in Vim"
https://en.wikipedia.org/wiki/Sixel

@mipmip

This comment has been minimized.

Copy link

@mipmip mipmip commented Sep 9, 2019

I would love this, but it seems far away.

@fritzophrenic

This comment has been minimized.

Copy link

@fritzophrenic fritzophrenic commented Sep 19, 2019

@ybearzi:

Here's another use case. When spaces are used instead of tabs, I don't find a way of displaying tabs as "| " for example if tabs are 2 spaces, to better see alignment (especially in xml files).

You don't need conceal for this. Take a look at:

:help 'list'
:help 'listchars'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.