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

Request: Is it possible to conceal before and after the effected values? #18

Closed
sethwoodworth opened this issue Apr 15, 2012 · 1 comment

Comments

@sethwoodworth
Copy link
Contributor

There are a number of math.foo functions that wrap the values they operate on that I would like to be considered for vim-cute-python:

     | a |        math.abs(a)         Absolute Value
    ⌊ a ⌋      math.floor(a)        Floor (although ⌊a was used in APL as the floor operator)
    ⌈ a ⌉      math.ceiling(a)     Ceiling

Two questions:

  1. Is it possible to use vim's conceal to change things before and after a value?
  2. Are you interested in adding these to vim-cute-python?
@ehamberg
Copy link
Owner

Hi,

As far as I know this is not easily doable since it's not possible to specify a conceal character for each end of of concealed region. I guess it would be possible by matching e.g. “math.abs(” and also using look-behind to conceal “)” when it follows “math.abs(” and an argument, but I don't think this is possible to do in a good way. (For example, one cannot match parentheses with a regex pattern.)

I would love to get a patch if this is possible to do in a not-super-hackish way, though. :-)

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