From 5a0d5c2bb7d700343adbef66185675215cc983e5 Mon Sep 17 00:00:00 2001 From: mjfernez Date: Tue, 11 Jul 2023 23:31:16 -0400 Subject: HTML generation --- ...how-to-fix-neovim-nerdtree-rendering-issue.html | 180 +++++++++++++++++++-- 1 file changed, 170 insertions(+), 10 deletions(-) (limited to 'tutorials/vim') diff --git a/tutorials/vim/how-to-fix-neovim-nerdtree-rendering-issue.html b/tutorials/vim/how-to-fix-neovim-nerdtree-rendering-issue.html index 075d777..17f8c84 100644 --- a/tutorials/vim/how-to-fix-neovim-nerdtree-rendering-issue.html +++ b/tutorials/vim/how-to-fix-neovim-nerdtree-rendering-issue.html @@ -6,6 +6,146 @@ how-to-fix-neovim-nerdtree-rendering-issue @@ -85,22 +227,40 @@
  • The Actual Solution
  • -

    I really like neovim since COC is integrated with it to work nicely. Plus, I like the defaults and the fact there's a lot of active development on extensions. I didn't use it for a long time because I needed NerdTree but every time I'd scroll the window, I'd get a mess.

    +

    I really like neovim since COC is integrated with +it to work nicely. Plus, I like the defaults and the fact there's a lot +of active development on extensions. I didn't use it for a long time +because I needed NerdTree but every time I'd scroll the window, +I'd get a mess.

    The Problem

    -

    Now, yes, I know I'm a heretic for using the arrow keys and not just jumping around, but I thought it was weird I didn't see this issue anywhere else. Also, vim doesn't have this problem.

    +

    Now, yes, I know I'm a heretic for using the arrow keys and not just +jumping around, but I thought it was weird I didn't see this issue +anywhere else. Also, vim doesn't have this problem.

    -

    It's also not because of my meme tmux setup, the same issue happens in terminator, which I happened to have installed.

    +

    It's also not because of my meme tmux setup, the same issue happens +in terminator, which I happened to have installed.

    The Attempt

    -

    There's a better way to do this, but I first figured just triggering a redraw on scroll would do the trick. You can do so by adding the following line to your init.vim file:

    +

    There's a better way to do this, but I first figured just triggering +a redraw on scroll would do the trick. You can do so by adding the +following line to your init.vim file:

    au WinScrolled * redraw!
    -

    As it turns out, the "WinScrolled" event only exists in neovim, so this command won't work in plain vim (see :help autocmd-events for the list of events in each program).

    +

    As it turns out, the "WinScrolled" event only exists in +neovim, so this command won't work in plain vim (see +:help autocmd-events for the list of events in each +program).

    The Actual Solution

    -

    After installing COC and running a healthcheck, I realized that my TERM variable was set to 'xterm'. I'm not sure if I did that intentionally to run something or if it's just a legacy thing I left in from Debian's default bashrc, but all I had to do was change it:

    -
    export TERM='tmux256-color'
    +

    After installing COC and running a healthcheck, I realized that my +TERM variable was set to 'xterm'. I'm not sure if I did that +intentionally to run something or if it's just a legacy thing I left in +from Debian's default bashrc, but all I had to do was change it:

    +
    export TERM='tmux256-color'

    No more hacky autocommands!

    -

    If I had the foresight to test the issue in xterm first, I probably would have seen it right away....

    +

    If I had the foresight to test the issue in xterm first, I probably +would have seen it right away....

    -- cgit v1.2.3