The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

Run :set t_ut and reboot terminal.


2

This is certainly possible, but it requires a bit of VimScript. The following function does the basic thing: func SwapHiGroup(group) let id = synIDtrans(hlID(a:group)) for mode in ['cterm', 'gui'] for g in ['fg', 'bg'] exe 'let '. mode.g. "= synIDattr(id, '". \ g."#', '". mode. "')" exe "let "....


0

Not sure if it's a good idea at all, but it's certainly possible: function! HiliteSwap(group) let l:hi = execute('hi ' . a:group) let l:ctermfg = matchstr(l:hi, 'ctermfg=\zs\S*') let l:ctermbg = matchstr(l:hi, 'ctermbg=\zs\S*') let l:guifg = matchstr(l:hi, 'guifg=\zs\S*') let l:guibg = matchstr(l:hi, 'guibg=\zs\S*') call execute(...


5

As you can read from :h 'termguicolors': 'termguicolors' 'tgc' boolean (default off) global Enables 24-bit RGB color in the TUI. Uses "gui" :highlight attributes instead of "cterm" attributes. So your highlighting command can not work since it doesn't provide a guifg attribute. I think the following should do the trick: highlight ...


0

I use <Leader><Enter> as a shortcut to :hls and have my leader set as space. let mapleader = "\<Space>" nmap <silent> <leader><Esc> :set hls!<cr> After searching an item will be highlighted, to turn it off, hit <Space><Esc>. And if you decide you want to redisplay the search results, hit <Space>&...


0

I do this in GUI Vim by setting the font to a bold font: :set guifont=Menlo-Bold:h13 To choose various fonts just use :set guifont=* and you'll get a dialog chooser. After you've chosen your preferred font use :set guifont? to see the font specification that you need to put in your vimrc. For console Vim fandom wiki says "Console Vim uses whatever font ...


0

(?<=pattern) is PCRE syntax. In Vim, you need to use :help /\@<= Try this: syn match cCustomClassName "\(^class\s\)\@<=\w\+" N.B. Your cCustomParen and cCustomFunc don't look right, either, but I don't know Perl syntax very well, so I'm not sure what you're trying to do there. As a side note, the way you're including this file in your config ...


Top 50 recent answers are included