Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The first thing you can check is what <code>:highlight</code> groupings are being applied to your import statement, I have a key mapping for a function which can do this:</p> <pre><code>" Show the stack of syntax hilighting classes affecting whatever is under the " cursor. function! SynStack() echo join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), " &gt; ") endfunc nnoremap &lt;F8&gt; :call SynStack()&lt;CR&gt; </code></pre> <p>If you <code>:source</code> a file containing this or put this in your <code>.vimrc</code> and reopen vim, we can now check what highlighting is being applied to import.</p> <p>When I press F8 on an import I receive the message <em>pythonInclude</em>, now if you don't see that there may be something wrong with the parsing of python file and the keyword <em>import</em> hasn't been picked up on. We can then look at what rules are being applied to that-</p> <pre><code>:highlight pythonInclude </code></pre> <p>This gives me-</p> <pre><code>pythonInclude xxx links to Include </code></pre> <p>If we follow this then we can see what rules are being applied to <em>Include</em> group. This will probably go deeper, <code>Include xxx links to PreProc</code>. If you get this far your highlighting groups are probably correct. If you didn't link to PreProc there maybe another plugin overwriting the highlight group, or a similar issue. You can then check what colors the <em>PreProc</em> is setting. You can override a highlight group link, <code>:highlight link pythonInclude Function</code> this will now display imports as the same color as Functions!</p> <p>You can also modify the colors and formatting applied to different highlight groupings however I will leave you to discover those on your own. Much more help can be found in <code>:h :highlight</code>, but I hope this helps start your debugging process!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload