Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Emille1723/eea34161da3112178ac5d66470e38116 to your computer and use it in GitHub Desktop.

Select an option

Save Emille1723/eea34161da3112178ac5d66470e38116 to your computer and use it in GitHub Desktop.

Revisions

  1. @andersevenrud andersevenrud revised this gist May 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -64,7 +64,7 @@ colorscheme yourfavcolorscheme

    > If you use `~/.vimrc` for your nvim configuration, use the above vim example because it's fully compatible.

    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that detects `termguicolors` automatically, so there's no need to set this in an upcoming release. I'll update this notice with a version once released as a public version.
    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that detects `termguicolors` automatically, so there's no need to set this in an upcoming release. ~~I'll update this notice with a version once released as a public version.~~ This came with the 0.10 release (May 16th 2024).

    In `~/.config/nvim/init.vim`

  2. @andersevenrud andersevenrud revised this gist Dec 13, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -64,7 +64,7 @@ colorscheme yourfavcolorscheme

    > If you use `~/.vimrc` for your nvim configuration, use the above vim example because it's fully compatible.

    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that detects `termguicolors` automatically, so there's no need to set this in an upcoming release.
    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that detects `termguicolors` automatically, so there's no need to set this in an upcoming release. I'll update this notice with a version once released as a public version.

    In `~/.config/nvim/init.vim`

  3. @andersevenrud andersevenrud revised this gist Dec 13, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,6 @@

    This should make True Color (24-bit) and *italics* work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentially makes some (or most?!) of these instructions unnecessary. I will follow up on this when it goes into a public release.
    ## Testing colors

    Running this script should look the same in tmux as without.
    @@ -66,6 +64,8 @@ colorscheme yourfavcolorscheme

    > If you use `~/.vimrc` for your nvim configuration, use the above vim example because it's fully compatible.

    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that detects `termguicolors` automatically, so there's no need to set this in an upcoming release.

    In `~/.config/nvim/init.vim`

    ```vim
  4. @andersevenrud andersevenrud revised this gist Dec 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    This should make True Color (24-bit) and *italics* work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentially makes some of these instructions unnecessary. I will follow up on this when it goes into a public release.
    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentially makes some (or most?!) of these instructions unnecessary. I will follow up on this when it goes into a public release.
    ## Testing colors

  5. @andersevenrud andersevenrud revised this gist Dec 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    This should make True Color (24-bit) and *italics* work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    > :bulb: neovim recently merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentially makes some of these instructions unnecessary. I will follow up on this when it goes into a public release.
    > :bulb: neovim recently (Dec 6th 2023) merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentially makes some of these instructions unnecessary. I will follow up on this when it goes into a public release.
    ## Testing colors

  6. @andersevenrud andersevenrud revised this gist Dec 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    This should make True Color (24-bit) and *italics* work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    > :bulb: neovim recently merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentialy makes some of these instructions unnecessary. I will follow up on this when it goes into a public release.
    > :bulb: neovim recently merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentially makes some of these instructions unnecessary. I will follow up on this when it goes into a public release.
    ## Testing colors

  7. @andersevenrud andersevenrud revised this gist Dec 12, 2023. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@

    This should make True Color (24-bit) and *italics* work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    > :bulb: neovim recently merged some [changes](https://github.com/neovim/neovim/pull/26407) that potentialy makes some of these instructions unnecessary. I will follow up on this when it goes into a public release.
    ## Testing colors

    Running this script should look the same in tmux as without.
    @@ -92,6 +94,7 @@ And if you found another solution I would really appreciate if you left a commen

    Shout-out to the nice folks that provided insightful feedback:

    * @mikeslattery [native neovim termguicolors support](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4789622#gistcomment-4789622)
    * @mikeslattery [black and white vim colorscheme](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4004222#gistcomment-4004222)
    * @sahibalejandro [env variable inside tmux configuration](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4239470#gistcomment-4239470)
    * @wonbinbk [wildcard in tmux terminal configuration](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4281467#gistcomment-4281467)
  8. @andersevenrud andersevenrud revised this gist Oct 7, 2022. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -35,8 +35,7 @@ set -g default-terminal "tmux-256color"
    set -ag terminal-overrides ",xterm-256color:RGB"
    # Or use a wildcard instead of forcing a default mode.
    # Some users in the comments of this gist have reported that this is the
    # only way to make it work on certain systems / software versions.
    # Some users in the comments of this gist have reported that this work better.
    #set -sg terminal-overrides ",*:RGB"
    # You can also use the env variable set from the terminal.
  9. @andersevenrud andersevenrud revised this gist Oct 7, 2022. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,8 @@ set -g default-terminal "tmux-256color"
    set -ag terminal-overrides ",xterm-256color:RGB"
    # Or use a wildcard instead of forcing a default mode.
    # Some users in the comments of this gist have reported that this is the only way to make it work on certain systems.
    # Some users in the comments of this gist have reported that this is the
    # only way to make it work on certain systems / software versions.
    #set -sg terminal-overrides ",*:RGB"
    # You can also use the env variable set from the terminal.
  10. @andersevenrud andersevenrud revised this gist Oct 7, 2022. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,10 @@ In `~/.tmux.conf` (or `~/.config/tmux/tmux.conf`):
    set -g default-terminal "tmux-256color"
    set -ag terminal-overrides ",xterm-256color:RGB"
    # Or use a wildcard instead of forcing a default mode.
    # Some users in the comments of this gist have reported that this is the only way to make it work on certain systems.
    #set -sg terminal-overrides ",*:RGB"
    # You can also use the env variable set from the terminal.
    # Useful if you share your configuration betweeen systems with a varying value.
    #set -ag terminal-overrides ",$TERM:RGB"
    @@ -90,3 +94,4 @@ Shout-out to the nice folks that provided insightful feedback:

    * @mikeslattery [black and white vim colorscheme](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4004222#gistcomment-4004222)
    * @sahibalejandro [env variable inside tmux configuration](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4239470#gistcomment-4239470)
    * @wonbinbk [wildcard in tmux terminal configuration](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4281467#gistcomment-4281467)
  11. @andersevenrud andersevenrud revised this gist Aug 7, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

    This should make True Color (24-bit) and italics work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).
    This should make True Color (24-bit) and *italics* work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    ## Testing colors

  12. @andersevenrud andersevenrud revised this gist Jul 20, 2022. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -35,8 +35,7 @@ set -g default-terminal "tmux-256color"
    set -ag terminal-overrides ",xterm-256color:RGB"
    # You can also use the env variable set from the terminal.
    # Useful if you share your configuration betweeen systems with
    # a varying value.
    # Useful if you share your configuration betweeen systems with a varying value.
    #set -ag terminal-overrides ",$TERM:RGB"
    ```

  13. @andersevenrud andersevenrud revised this gist Jul 20, 2022. 1 changed file with 13 additions and 1 deletion.
    14 changes: 13 additions & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -33,6 +33,11 @@ In `~/.tmux.conf` (or `~/.config/tmux/tmux.conf`):
    ```tmux
    set -g default-terminal "tmux-256color"
    set -ag terminal-overrides ",xterm-256color:RGB"
    # You can also use the env variable set from the terminal.
    # Useful if you share your configuration betweeen systems with
    # a varying value.
    #set -ag terminal-overrides ",$TERM:RGB"
    ```

    ### vim
    @@ -78,4 +83,11 @@ And if you found another solution I would really appreciate if you left a commen

    * OS/Distro + version
    * Vim or Neovim + version
    * Terminal name + version
    * Terminal name + version

    ## Mentions

    Shout-out to the nice folks that provided insightful feedback:

    * @mikeslattery [black and white vim colorscheme](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4004222#gistcomment-4004222)
    * @sahibalejandro [env variable inside tmux configuration](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6?permalink_comment_id=4239470#gistcomment-4239470)
  14. @andersevenrud andersevenrud revised this gist Jun 30, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

    This should make True Color (24-bit) and italics work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    ## Testing colors
  15. @andersevenrud andersevenrud revised this gist Feb 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ bash 24-bit-color.sh

    ## Configuration files

    **IMPORTANT:** _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.), but your terminal (alacritty).
    :warning: **IMPORTANT** :warning: *Don't* set `$TERM` in your shell (zshrc, bashrc, etc.), but your terminal (alacritty).

    ### Alacritty

  16. @andersevenrud andersevenrud revised this gist Feb 21, 2022. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,5 @@
    This should make True Color (24-bit) and italics work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    ## Notes
    1. _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.). Configure this in your terminal (alacritty).
    2. [Alacritty currenty has no undercurl support](https://github.com/alacritty/alacritty/issues/1628) (landing soon), even though [tmux has](https://github.com/tmux/tmux/issues/1492)

    ## Testing colors

    Running this script should look the same in tmux as without.
    @@ -17,6 +13,8 @@ bash 24-bit-color.sh

    ## Configuration files

    **IMPORTANT:** _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.), but your terminal (alacritty).

    ### Alacritty

    In `~/.config/alacritty/alacritty.yml`:
  17. @andersevenrud andersevenrud revised this gist Feb 8, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ This should make True Color (24-bit) and italics work in your [tmux](https://git

    ## Notes
    1. _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.). Configure this in your terminal (alacritty).
    2. [Alacritty has no undercurl support](https://github.com/alacritty/alacritty/issues/1628), even though [tmux has](https://github.com/tmux/tmux/issues/1492)
    2. [Alacritty currenty has no undercurl support](https://github.com/alacritty/alacritty/issues/1628) (landing soon), even though [tmux has](https://github.com/tmux/tmux/issues/1492)

    ## Testing colors

  18. @andersevenrud andersevenrud revised this gist Jan 16, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,7 @@ colorscheme yourfavcolorscheme

    ### neovim

    > If you use `~/.vimrc` for your nvim configuration, use the above vim example becaus it's fully compatible (nvim ignores the workarounds for vim).
    > If you use `~/.vimrc` for your nvim configuration, use the above vim example because it's fully compatible.

    In `~/.config/nvim/init.vim`

  19. @andersevenrud andersevenrud revised this gist Jan 16, 2022. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,9 @@ colorscheme yourfavcolorscheme

    ### neovim

    In `~/.config/nvim/init.vim` (or `~/.vimrc`):
    > If you use `~/.vimrc` for your nvim configuration, use the above vim example becaus it's fully compatible (nvim ignores the workarounds for vim).

    In `~/.config/nvim/init.vim`

    ```vim
    set termguicolors
  20. @andersevenrud andersevenrud revised this gist Jan 6, 2022. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,4 @@
    This should make True Color (24-bit) and italics work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    Tested successfully in [bash](https://www.gnu.org/software/bash/) and [zsh](https://www.zsh.org/) with latest packages from [Arch Linux](https://archlinux.org/) (with exception of [neovim](https://github.com/neovim/neovim) built from source):
    * ~~2019-07-07~~
    * 2021-08-07
    This should make True Color (24-bit) and italics work in your [tmux](https://github.com/tmux/tmux/wiki) session and [vim](https://github.com/vim/vim)/[neovim](https://github.com/neovim/neovim) when using [Alacritty](https://github.com/alacritty/alacritty) (and should be compatible with any other terminal emulator, including [Kitty](https://github.com/kovidgoyal/kitty)).

    ## Notes
    1. _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.). Configure this in your terminal (alacritty).
  21. @andersevenrud andersevenrud revised this gist Dec 25, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -56,7 +56,7 @@ set termguicolors
    colorscheme yourfavcolorscheme
    ```

    ## neovim
    ### neovim

    In `~/.config/nvim/init.vim` (or `~/.vimrc`):

  22. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -58,14 +58,14 @@ colorscheme yourfavcolorscheme

    ## neovim

    In `~/.vimrc`:
    In `~/.config/nvim/init.vim` (or `~/.vimrc`):

    ```vim
    set termguicolors
    colorscheme yourfavcolorscheme
    ```

    Or `~/.config/nvim/init.vim` or `~/.config/nvim/init.lua`:
    Or `~/.config/nvim/init.lua`:

    ```lua
    vim.o.termguicolors = true
  23. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -45,7 +45,7 @@ In `~/.vimrc`:

    ```vim
    " You might have to force true color when using regular vim inside tmux as the
    " colorscheme might appear to be grayscale with "truecolor" option enabled.
    " colorscheme can appear to be grayscale with "termguicolors" option enabled.
    if !has('gui_running') && &term =~ '^\%(screen\|tmux\)'
    let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
    let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  24. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,8 @@ set -ag terminal-overrides ",xterm-256color:RGB"
    In `~/.vimrc`:

    ```vim
    " You might have to force true color when using regular vim inside tmux
    " You might have to force true color when using regular vim inside tmux as the
    " colorscheme might appear to be grayscale with "truecolor" option enabled.
    if !has('gui_running') && &term =~ '^\%(screen\|tmux\)'
    let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
    let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  25. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,7 @@ colorscheme yourfavcolorscheme

    In `~/.vimrc`:

    ```
    ```vim
    set termguicolors
    colorscheme yourfavcolorscheme
    ```
  26. @andersevenrud andersevenrud revised this gist Dec 22, 2021. No changes.
  27. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 22 additions and 8 deletions.
    30 changes: 22 additions & 8 deletions alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -5,10 +5,8 @@ Tested successfully in [bash](https://www.gnu.org/software/bash/) and [zsh](http
    * 2021-08-07

    ## Notes

    1. _**Don't**_ use `&t_8f`, `&t_8b` and `t_Co` in your vim config ([neovim ignores these settings](https://neovim.io/doc/user/vim_diff.html))
    2. _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.). Configure this in your terminal (alacritty).
    3. [Alacritty has no undercurl support](https://github.com/alacritty/alacritty/issues/1628), even though [tmux has](https://github.com/tmux/tmux/issues/1492)
    1. _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.). Configure this in your terminal (alacritty).
    2. [Alacritty has no undercurl support](https://github.com/alacritty/alacritty/issues/1628), even though [tmux has](https://github.com/tmux/tmux/issues/1492)

    ## Testing colors

    @@ -41,16 +39,32 @@ set -g default-terminal "tmux-256color"
    set -ag terminal-overrides ",xterm-256color:RGB"
    ```

    ### vim (neovim)
    ### vim

    In `~/.vimrc` or `~/.config/nvim/init.vim`:
    In `~/.vimrc`:

    ```vim
    " You might have to force true color when using regular vim inside tmux
    if !has('gui_running') && &term =~ '^\%(screen\|tmux\)'
    let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
    let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
    endif
    syntax on
    set termguicolors
    colorscheme yourfavcolorscheme
    ```

    ## neovim

    In `~/.vimrc`:

    ```
    set termguicolors
    colorscheme yourfavcolorscheme
    ```

    or `~/.config/nvim/init.lua`:
    Or `~/.config/nvim/init.vim` or `~/.config/nvim/init.lua`:

    ```lua
    vim.o.termguicolors = true
    @@ -65,4 +79,4 @@ And if you found another solution I would really appreciate if you left a commen

    * OS/Distro + version
    * Vim or Neovim + version
    * Terminal name + version
    * Terminal name + version
  28. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ Tested successfully in [bash](https://www.gnu.org/software/bash/) and [zsh](http

    ## Notes

    1. _**Don't**_ use `&t_8f`, `&t_8b` and `t_Co` in your vim config ([neovim ignores these settings](https://neovim.io/doc/user/vim_diff.html)
    1. _**Don't**_ use `&t_8f`, `&t_8b` and `t_Co` in your vim config ([neovim ignores these settings](https://neovim.io/doc/user/vim_diff.html))
    2. _**Don't**_ set `$TERM` in your shell (zshrc, bashrc, etc.). Configure this in your terminal (alacritty).
    3. [Alacritty has no undercurl support](https://github.com/alacritty/alacritty/issues/1628), even though [tmux has](https://github.com/tmux/tmux/issues/1492)

  29. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -61,7 +61,7 @@ vim.cmd'colorscheme yourfavcolorscheme'

    Check out the [comments](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6#comments) below for possible solutions.

    And if you found another solution I would really appreciate if you left a comment with the following information:
    And if you found another solution I would really appreciate if you left a comment with instructions and the following information:

    * OS/Distro + version
    * Vim or Neovim + version
  30. @andersevenrud andersevenrud revised this gist Dec 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion alacritty-tmux-vim_truecolor.md
    Original file line number Diff line number Diff line change
    @@ -57,7 +57,7 @@ vim.o.termguicolors = true
    vim.cmd'colorscheme yourfavcolorscheme'
    ```

    ## Nor working correctly ?
    ## Not working correctly ?

    Check out the [comments](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6#comments) below for possible solutions.