Closed ripollcid closed 9 years ago
I need to check colors availability in the 256 range for it. Also, i will probably need help for iTerm because i'm using ubuntu.
@ripollcid What system are you using? I cannot manage to test Xresources, but here's the gist that i think should work https://gist.github.com/kristijanhusak/4976238ad8580f4f0cee.
Maybe this could be done using base16-builder?
I tried to have a go at this myself but my lack of experience with colour schemes meant that I didn't have a lot of success. I'd be happy to help test any potential ports of hybrid_material to terminal vim though. I'm loving it in macvim. Thanks for the great work!
@smutch The problem here is with limited amount of colors available in terminal. The ones that are used in material theme are just not available in 256 color range. I'm not sure how to make Xresources to work, so i cannot test it if it works with that.
My understanding (although I definitely could be wrong here) is that one of the things that the base16-builder allows you to do is to generate a shell script that overloads the standard 256 colours to be anything you want. These modified colours can then be used in the vim colour scheme as long as the corresponding shell script is also distributed with the repo. This is similar to what chriskempson/gruvbox does.
Hey @kristijanhusak, I've started on a vim/iterm2 port using the base16 builder as you suggested @smutch. It's working pretty well so far!
I've also used base16 shell in the past and it worked great. I'm pretty sure we'd be able to make something work for non gvim.
very nice @seanwash !
@seanwash Nice work! I wanted to test it out, just coundn't figure out which colors to put, because everything is named base\ in the builder template. When you finish it please create a PR, i'll gladly merge it in.
@kristijanhusak Sounds good! It's taking me a bit of trial and error to do it, but I'm making sure to comment each line with what it actually equates to in the theme. I have that open, your vim scheme file open, and the browser preview open... feels like I'm doing front end work haha!
Great! Keep up the good work!
@kristijanhusak what all would you like be to commit? Maybe the base16 yaml file, vim files and shell files?
ehhh. this is going to take a good bit more tweaking. Set variable color to red, open a ruby file, var is aqua ¯(ツ)/¯
@seanwash add it to folder. I'm not even sure what's required to make that work. Anything you think is needed, commit.
@seanwash this looks fantastic!
I had a little go myself (although with results that were not as great). One thing I noticed is that base16 only uses fewer colours than hybrid_material uses. One thing I've been trying is to modify material_hybrid to only use the 256 colours of 17 and above and then to add more colours to the shell script generated by base16. That way we can do a direct mapping of the gui colours whilst still leaving the user's default 16 colours intact.
If I have any luck then I'll post my results here. I definitely think that @seanwash 's efforts are looking pretty great though so I think it best to stick with that.
Any updates on this?
Sorry, but not yet. My brother has been in town visiting so I've been on vacation!
Just submitted a pull req @thomasbritton. For now I just threw the entire base16 folder in there. https://github.com/kristijanhusak/vim-hybrid-material/pull/3
There's also this which could be interesting. I could give it a try and let you know how it works. It could be as easy as recommending this to non gui vim users.
Nice, couldn't get this to work though in iTerm2, was following the instructions in the hybrid_material.vim
file for iTerm2 installation.
The error message is:
Couldn't find colorscheme hybrid
@thomasbritton That instruction is not valid, it needs to be updated. Follow the instructions here https://github.com/chriskempson/base16-builder and just use yml file from this repo.
I will update the readme and instructions in scheme files.
@kristijanhusak So I tried the instructions on the bas16-builder page and ran the generator against the YML file from this repo. The resulting vim color scheme looks off for some reason. Is it supposed to look like this, or did I do something wrong?
@ELD what terminal are you using? Which os?
@kristijanhusak iTerm 3 beta (I'll try it in iTerm 2, as well, I just remembered I'm using that beta version), and OS X 10.10.5.
I think @seanwash can help you, he was testing it on iTerm2.
Hey @ELD, yeah, it's it a bit rough around the edges still. That green background makes me think that you also have to install base16 shell with the material file that the builder also gives you. See here: https://github.com/chriskempson/base16-vim#green-line-numbers & https://github.com/chriskempson/base16-shell
@seanwash Oh okay, I'll try that and see how that goes. Thanks for the help!
@seanwash Sorry for taking awhile to get back to you, but yeah, installing the material theme in iTerm2 made the color scheme in Vim work. Thanks!
@ELD Can you give more details how to get it work? Im still struggling on how to use the base64 builder and stuff. Thanks!
@hoandang In a nutshell, you want to either clone this repo or include it in your Vundle (or whatever your preferred Vim package manager is) file and pull in this theme.
Once you've done that, you'll want to clone the Base 16 Builder repo (https://github.com/chriskempson/base16-builder) in the location of your choice. From there, you'll run the base16 script (./base16
) and send in the scheme file from this repository (base16-material/material.yaml
).
To run the script and just generate the base16 material theme you'll want to call the base16 script like this: ./base16 -s /path/to/vim-hybrid-material/theme/base16-material/material.yaml
. The resulting generated themes will be in the output
folder. The base16 builder utility creates different schemes for editors and terminals, so assuming you're using iTerm2 and Vim, you'd copy the Vim theme to the .vim/colors
directory (or wherever your installed themes are located) and then import the iTerm2 theme and then use it.
Make sure you have your terminal set to use the base16 color scheme. Otherwise, oddities like that screenshot I posted will happen when using the base16 material theme in Vim.
If this has been confusing, I can record a video in the next day or so to go through it step-by-step. Again, I'm assuming you're also on OS X, so let me know if I'm wrong.
@ELD Hi, thanks for the instruction, I tried to put the material.yaml into the base64 folder and ran ./base64 material.yaml, but it didn't generate anything in the output folder? Did I miss something?
I am using Iterm2 on OS X btw.
@hoandang Try it again using the -s
flag. If your material.yaml
file is in the root of the base16 builder directory, then the command you would run would be ./base16 -s material.yaml
. Try that and see if it generates some output.
@ELD Hi Eric, here is the response, it returned whole bunch of erb files but still nothing in the output folder or any other folders.
@hoandang Strangely enough, that's the exact same output I see too when I run the command. If I do an ls
on my output directory, I see a series of directories containing themes for various terminal emulators and text editors.
Would you mind showing me a screen shot of an ls
of your output
directory?
This is what I see after running the command:
And this is what I see after doing an ls
on the base16 builder output directory:
^ I was just about to say the same. There should be files in your output dir now.
Also, fwiw, I just submitted a PR to include the vim schemes that this yaml file will build - https://github.com/kristijanhusak/vim-hybrid-material/pull/6
@ELD Sorry, my bad, I didn't check the output folder properly, there is a base16-material file. But the colorscheme now is quite horrified?
@hoandang Did you make sure you imported the iTerm2 scheme and set it to your terminal theme as well? I mentioned it in my first reply to you, but it was buried pretty deeply in there.
@seanwash Just read your reply in its entirety, that'll be nice to have the schemes included directly into the repository rather than having to generate them. I'm a huge fan of this material theme port to Vim/terminal. Thanks for all your work!
@ELD No worries. The pull request will include a file for base16-shell, the vim scheme, and the iterm scheme + a small readme.
@ELD Hi, I think I did it but the color is not quite same as @seanwash ?
@hoandang There's a 256 color variant for iTerm. I'm not sure what the difference between the non-256 and 256 variant are. Maybe @seanwash could comment further?
@ELD the 256 one actually breaks the colorscheme, I had to try the non-256?
@hoandang You're right, it does. I never realized that until now. I wonder why our colors are slightly off then...
Update: I just typed out the original snippet that @seanwash posted and it came out like this:
So, I don't know if he changed the color scheme or if something is going haywire. Hopefully he can comment further :smile:
Yeah, the preview I took a screenshot of was the preview page that the base16-builder gives you. My actual vim looks like the shot above. Computers, man.
@seanwash Okay, good to know. Thanks for the heads up! Still looks good though.
Just a heads up, since adding the base16 files to the repository, everything seems to be working fine. Thanks for all your work @seanwash and @kristijanhusak!
Updated readme with link to installation for vim. Thanks @seanwash once more!
when will this come for vim/iterm?