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

Question: conditional styles #26

Open
mhartington opened this issue Sep 18, 2016 · 4 comments
Open

Question: conditional styles #26

mhartington opened this issue Sep 18, 2016 · 4 comments
Assignees

Comments

@mhartington
Copy link
Contributor

In oceanic-next, I have support setup for conditional italics/bolds, if the terminal supports it.

let s:bold = ""
if exists('g:oceanic_next_terminal_bold')
  let s:bold = "bold"

endif
let g:oceanic_next_terminal_bold = get(g:, 'oceanic_next_terminal_bold', 0)

And is used like so

call <sid>hi("markdownBold", s:gui0A, "", s:cterm0A, "", s:bold)

Would something like this be supported by estilo?

@jacoborus
Copy link
Owner

jacoborus commented Sep 18, 2016

I plan to support conditional styles in colorschemes, but I still don't know how to implement it in a template based generator. I'm open to ideas, do you have any suggestion?

@mhartington
Copy link
Contributor Author

No ideas right now, but can try to think of something and make a PR

@jacoborus
Copy link
Owner

I'll try this weekend

@jacoborus jacoborus self-assigned this Sep 25, 2016
@rakr
Copy link
Contributor

rakr commented Sep 28, 2016

I was thinking about this, and probably can be solved by some conventions.

let s:bold = ""
if exists('g:<<colorscheme_name>>_terminal_bold')
  let s:bold = "bold"

endif
let g:<<colorscheme_name>>_terminal_bold = get(g:, '<<colorscheme_name>>_terminal_bold', 0)

The issue is that if some users change their colorscheme often they end up having a lot of colorscheme-specific variables in their .vimrc. We can have a convention like this:

let s:bold = ""
if exists('g:estilo_terminal_bold')
  let s:bold = "bold"

endif
let g:<<estilo_name>>_terminal_bold = get(g:, 'estilo_terminal_bold', 0)

I'd be happy to give it a crack, but I'm not that confortable with Javascript, but this could be fun 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants