Updated Terminal specific (markdown)

Pavel Pertsev
2014-04-08 14:18:04 -07:00
parent 55ee6c9cff
commit 29201e7685

@@ -1,16 +1,41 @@
(...).
If you're using GUI version of vim that should be enough. Otherwise let me guide through the hell of terminal specific issues.
* (Recommended) 256-color palette with gruvbox-palette shell script
* 16 colors palette mode with gruvbox terminal colorscheme
First of all you should check this screenshot, as how it **shouldn't** look:
![Screenshot](https://camo.githubusercontent.com/26c7f6f2495059d00675afe881d2e4709f0801ad/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323331343037342f313236323431302f37326165323337362d326333652d313165332d383330622d3063363235376434656462362e706e67)
Troubleshooting
---------------
### Issues
#### 1. Italics gets inverted
Most terminals doesn't handle italics so the text, that must be italicized, instead goes inverted. To prevent that disable `g:gruvbox_italic` option at your .vimrc:
```
if !has("gui_running")
let g:gruvbox_italic=0
endif
```
#### 2. Colors are off
By default gruvbox will act as usual 256-color theme, but colors wouldn't be that vivid due to limitations of 256-palette. Compare the **wrong** screenshot above with README preview or any from the [Gallery](https://github.com/morhetz/gruvbox/wiki/Gallery). The difference isn't edgy, but pretty visible enough (changes in red color and shades of gray should be most noticeable). You could run side by side vim in terminal and GUI version.
### Italics gets inverted (terminal)
There are three possible ways to get right colors at the terminal:
- using 256-color gruvbox palette shellscript
- using terminal 16-color base colorscheme
- using urxvt-256-xresources
Most terminals doesn't allow italics so the text, that must be italicized, goes inverted. To prevent that disable `g:gruvbox_italic` option.
##### a. (Recommended) 256-color gruvbox palette shellscript
Gruvbox contains shellscript ([default](https://github.com/morhetz/gruvbox/blob/master/gruvbox_256palette.sh) and [osx-iterm2](https://github.com/morhetz/gruvbox/blob/master/gruvbox_256palette_osx.sh) versions), which would overload system default 256-color palette with precise gruvbox colors. Try running terminal vim before and after executing this script to check the difference. To avoid the necessity of reexecuting it each time you're opening terminal, you should start this script from .bashrc//.zshrc//.profile either like this:
```
~/.vim/bundle/gruvbox/gruvbox_256palette.sh
```
or, using osx-iterm version:
```
~/.vim/bundle/gruvbox/gruvbox_256palette_osx.sh
```
where `~/.vim/bundle/` is your preferred plugin manager bundles installation path
### Effect of gruvbox_256palette.sh gets reset on Alt-Tab
##### b. terminal 16-color base colorscheme
##### c. urxvt-256-xresources
### Troubleshooting
#### 1. Effect of gruvbox_256palette.sh gets reset on Alt-Tab
That's known issue with Ubuntu GTK-themes. Refer [†][1] for more details. Known affected terms are Gnome Terminal, Terminator and Lilyterm and probably more VTE-based. Though with Lilyterm option 'Dim text when inactive' set off everything works fine.