I hope you can use these tips to customize tab characters to your own preference. Go now has the tab character display that I like. Let me try the more neutral greys that I would rather have. Currently I have a color scheme for iTerm that is set, however I believe that terminal vim just inherits the color from your current terminal, however. I now see the ridiculous colors shining through. It would be nice if there was a way to customize the colors in the :terminal feature. Which I like, but I want something more precise. Vim's highlighting system is fairly sophisticated, in this case I can change the colors of this particular syntactic element with: :highlight SpecialKey ctermfg=grey ctermbg=black I would like a neutral grayĪnd a dark grey background to differentiate the whitespace determined by the tab character from the space In this case I'm going to shorten the tab width with :set tabstop=4 or set ts=4.
![macvim customize colors guifg macvim customize colors guifg](https://i.stack.imgur.com/2Hhm3.png)
A bit better, yes? Tab widthĪs a matter of personal preference I prefer shorter tabs. listchars is the option that governs what characters you see and my default setting (which you can check with :set listchars) is: listchars = tab :> ,trail :-,extends :>,precedes :,precedes:,precedes:<,nbsp:+ The first step is replacing the > character with something more pleasing to my eye, like a pipe ( |). I want something clean looking that doesn't detract from the code but still conveys the sense of whitespace. Also check out the guicursor option, to set the colors for the cursor in various modes. The other settings for the Normal highlight group are not used. Go is a beautiful language and it deserves to look good in my editor. (which looks nice): :highlight Normal guibggrey90 The 'guibg' and 'guifg' settings override the normal background and foreground settings. That problem is: Whenever I open a file in vim for a language that uses tabs rather than spaces to indent I see the > char followed by 8 spaces.
![macvim customize colors guifg macvim customize colors guifg](https://i.stack.imgur.com/WhMkj.png)
Tabs characters can be distracting in vim
#MACVIM CUSTOMIZE COLORS GUIFG HOW TO#
Vim Vim can have better tab characters for GolangĪ short tutorial showing how to display beautiful tabs for a beautiful language: Golang.