kristijanhusak / vim-hybrid-material

Material color scheme for Vim based on w0ng/vim-hybrid color scheme
MIT License
547 stars 46 forks source link

vim? #2

Closed ripollcid closed 9 years ago

ripollcid commented 9 years ago

when will this come for vim/iterm?

kristijanhusak commented 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.

kristijanhusak commented 9 years ago

@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.

smutch commented 9 years ago

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!

kristijanhusak commented 9 years ago

@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.

smutch commented 9 years ago

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.

seanwash commented 9 years ago

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!

preview

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.

thomasbritton commented 9 years ago

very nice @seanwash !

kristijanhusak commented 9 years ago

@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.

seanwash commented 9 years ago

@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!

kristijanhusak commented 9 years ago

Great! Keep up the good work!

seanwash commented 9 years ago

@kristijanhusak what all would you like be to commit? Maybe the base16 yaml file, vim files and shell files?

seanwash commented 9 years ago

ehhh. this is going to take a good bit more tweaking. Set variable color to red, open a ruby file, var is aqua ¯(ツ)

kristijanhusak commented 9 years ago

@seanwash add it to folder. I'm not even sure what's required to make that work. Anything you think is needed, commit.

smutch commented 9 years ago

@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.

thomasbritton commented 9 years ago

Any updates on this?

seanwash commented 9 years ago

Sorry, but not yet. My brother has been in town visiting so I've been on vacation!

seanwash commented 9 years ago

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

seanwash commented 9 years ago

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.

thomasbritton commented 9 years ago

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

kristijanhusak commented 9 years ago

@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.

ELD commented 9 years ago

@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?

base16 material color scheme

kristijanhusak commented 9 years ago

@ELD what terminal are you using? Which os?

ELD commented 9 years ago

@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.

kristijanhusak commented 9 years ago

I think @seanwash can help you, he was testing it on iTerm2.

seanwash commented 9 years ago

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

ELD commented 9 years ago

@seanwash Oh okay, I'll try that and see how that goes. Thanks for the help!

ELD commented 9 years ago

@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!

hoandang commented 9 years ago

@ELD Can you give more details how to get it work? Im still struggling on how to use the base64 builder and stuff. Thanks!

ELD commented 9 years ago

@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.

hoandang commented 9 years ago

@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.

ELD commented 9 years ago

@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.

hoandang commented 9 years ago

@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.

screen shot 2015-08-17 at 10 44 04 am
ELD commented 9 years ago

@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:

screenshot 2015-08-16 18 51 18

And this is what I see after doing an ls on the base16 builder output directory:

screenshot 2015-08-16 18 51 27
seanwash commented 9 years ago

^ 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

hoandang commented 9 years ago

@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?

screen shot 2015-08-17 at 11 09 30 am
ELD commented 9 years ago

@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.

ELD commented 9 years ago

@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!

seanwash commented 9 years ago

@ELD No worries. The pull request will include a file for base16-shell, the vim scheme, and the iterm scheme + a small readme.

hoandang commented 9 years ago

@ELD Hi, I think I did it but the color is not quite same as @seanwash ?

screen shot 2015-08-17 at 11 37 44 am
ELD commented 9 years ago

@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?

hoandang commented 9 years ago

@ELD the 256 one actually breaks the colorscheme, I had to try the non-256?

ELD commented 9 years ago

@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:

screenshot 2015-08-16 20 58 38

So, I don't know if he changed the color scheme or if something is going haywire. Hopefully he can comment further :smile:

seanwash commented 9 years ago

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.

ELD commented 9 years ago

@seanwash Okay, good to know. Thanks for the heads up! Still looks good though.

ELD commented 9 years ago

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!

kristijanhusak commented 9 years ago

Updated readme with link to installation for vim. Thanks @seanwash once more!