Skip to content

Instantly share code, notes, and snippets.

@helium18
Created March 6, 2022 11:13
Show Gist options
  • Save helium18/b0aff4b57179fbca8f79b3c98efe2b68 to your computer and use it in GitHub Desktop.
Save helium18/b0aff4b57179fbca8f79b3c98efe2b68 to your computer and use it in GitHub Desktop.

Prequisites

  1. Vim, [Optional: maybe have a look at my config]
  2. Tmux

Install

  1. vim-airline
  2. tmuxline
  3. vim-airline-themes

Add this to your vim config

" vim-airline
let g:airline_powerline_fonts=1 " Unicode Fonts
let g:airline_separators=1 " Angled Separators
let g:airline_theme = 'minimalist' " Enable the minimalist theme

" tmuxline
let g:tmuxline_powerline_separators = 1 " Enable angled separators

let g:tmuxline_preset = { " Show host name and the tabs and push it to the left
      \'a'    : '#h', " host name
      \'win'  : '#W', " tabs
      \'cwin' : '#W', " tabs
      \'options': {
        \'status-justify': 'left'}
      \}

Do a TmuxLineSnapshot .tmuxline inside vim which exports the tmuxline config to a file named .tmuxline in $HOME

Create another file named .tmux.conf under $HOME and add the following to it

source-file $HOME/.tmuxline # Location to the tmuxline config which we recently created
set -g default-terminal 'screen-256color' # Setting a 256bit colorscheme 
set -g status-justify left # Moving the statusline to the left
set -g status-position top  # Moving the statusline to the top
set -s escape-time 0 # Tmux slows down the escape key press, this fixes it

Restart your terminal emulator for the changes to take effect :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment