Цвет Vim FoldColumn отличается в Debian / Ubuntu

perl -sle '
  my(@e, @AoA) = qw/ 24 12 /;
  $AoA[$1][$2]++ while /\[([01])]\h+(?:(?!\d)\S)+0*(\d+)$/mg;
  for my $enc ( 0.. $#e ) {
     for my $m_slot ( grep { ! defined $AoA[$enc][$_] } 0.. $e[$enc]-1 ) {
         print "in enclosure $enc - Slot$m_slot is missing.";
     }
  }
 ' -- -_="$DISK_INFO";

Explicación:

°  Initialize the array @e which holds the number of slots in the various enclosures. 

° The Disk info variable is passed into the command line as $_ initialized to $DISK_INFO. 

°  progressively scan and match the $_ variable using the while loop and look for the numbers in the '[..]' and the 'Slot...'  locations. Using these we update the array of array @AoA, it can be viewed as a matrix. 

°  Now once we have ingested all the data, its time to process it now in two for loops. 

° The outer for loops on the enclosures, in our case, they are two. 

° The inner for loop computes the indices of the current enclosure elements that are undefined, IOW, those slots that were never encountered during the data collection drive in the while loop. 
2
31.07.2014, 17:24
1 ответ

Проблема в том, что вы используете ctermbgи ctermfg, что означает, что когда вы находитесь в телетайпе, фон будет черным, а передний план (=текст ). Если вы хотите установить цвет для gui/xorg, используйте guibgи guifg, например:

hi FoldColumn  guibg=black guifg=LightGray ctermbg=black ctermfg=LightGray

Надеюсь, это решит вашу проблему.

0
11.03.2021, 06:35

Теги

Похожие вопросы