<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jibundit</title>
    <description>The latest articles on DEV Community by jibundit (@jibundit).</description>
    <link>https://dev.to/jibundit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F872471%2F3376926d-8d1c-418a-a01e-ecc3f6b2cb9c.jpeg</url>
      <title>DEV Community: jibundit</title>
      <link>https://dev.to/jibundit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jibundit"/>
    <language>en</language>
    <item>
      <title>Undercurl Display on Neovim and tmux with iTerm2</title>
      <dc:creator>jibundit</dc:creator>
      <pubDate>Wed, 19 Oct 2022 14:37:51 +0000</pubDate>
      <link>https://dev.to/jibundit/undercurl-display-on-neovim-and-tmux-with-iterm2-3pi0</link>
      <guid>https://dev.to/jibundit/undercurl-display-on-neovim-and-tmux-with-iterm2-3pi0</guid>
      <description>&lt;p&gt;As you may know, it can't enable an undercurl on any English word mispelled on iTerm2 with Neovim even if setting t_Cs and t_Ce. &lt;/p&gt;

&lt;p&gt;This shared information are based on the dotfile from Takuya Matsuyama setting and zsh on your SHELL configuration.&lt;/p&gt;

&lt;p&gt;First thing first, export your TERM on your ~/.zshrc. Source your .zshrc is necessary.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export TERM="xterm-256color"
[[ -n $TMUX ]] &amp;amp;&amp;amp; export TERM="screen-256color"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your .vimrc or init.lua need to add these two options&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim.opt.spell = true
vim.opt.spelllang = { 'en_us' }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, add Smulx=\E[4:%p1%dm, to your TERM. &lt;br&gt;
For example smul=\E[4m, &lt;strong&gt;&lt;em&gt;Smulx=\E[4:%p1%dm,&lt;/em&gt;&lt;/strong&gt; tbc=\E[3g, tbc=\E[3g, ...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;infocmp &amp;gt; /tmp/${TERM}.ti
Add Smulx=\E[4\:%p1%dm, after smul=\E[4m,
tic -x /tmp/${TERM}.ti
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then edit any file you prefer. This example uses base.lua file. _vim ~/.config/nvim/lua/user/base.lua&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foew88h2roxra9daalwre.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foew88h2roxra9daalwre.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Move to tmux, your tmux session should inherit the TERM from .zshrc setting by switching to use screen-256color instead of xterm-256color. Performing the same process of TERM reconfiguration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;infocmp &amp;gt; /tmp/${TERM}.ti
Add Smulx=\E[4\:%p1%dm, after smul=\E[4m,
tic -x /tmp/${TERM}.ti
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje5sjk3vjbp5gvae2dqn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje5sjk3vjbp5gvae2dqn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can recheck your TERMINFO using the additional setting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;infocmp -l -x | grep Smulx
        vpa=\E[%i%p1%dd, Smulx=\E[4\:%p1%dm,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your tmux session can also display the undercurl line of each misspelled word.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9b7cnm4209byrdu7z1y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9b7cnm4209byrdu7z1y.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>help</category>
      <category>tutorial</category>
      <category>nvim</category>
      <category>tmux</category>
    </item>
  </channel>
</rss>
