Skip to content

Instantly share code, notes, and snippets.

@TimUntersberger
Last active May 25, 2025 17:02
Show Gist options
  • Save TimUntersberger/c9949c7689eb638bc335040abe7672ca to your computer and use it in GitHub Desktop.
Save TimUntersberger/c9949c7689eb638bc335040abe7672ca to your computer and use it in GitHub Desktop.
# gruvbox-dark colorscheme for kitty
# snazzy theme used as base
foreground #ebdbb2
background #272727
selection_foreground #655b53
selection_background #ebdbb2
url_color #d65c0d
# black
color0 #272727
color8 #928373
# red
color1 #cc231c
color9 #fb4833
# green
color2 #989719
color10 #b8ba25
# yellow
color3 #d79920
color11 #fabc2e
# blue
color4 #448488
color12 #83a597
# magenta
color5 #b16185
color13 #d3859a
# cyan
color6 #689d69
color14 #8ec07b
# white
color7 #a89983
color15 #ebdbb2
include gruvbox-kitty.conf
# Plugins
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Add a reload config button
bind r source-file ~/.tmux.conf
# Remove escape delay
set -s escape-time 0
# Rebind split keybinds
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Rebind window keybinds
bind c new-window -c "#{pane_current_path}"
# Rebind movement keysbinds
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# Bind tmux window index
bind -n M-1 select-window -t 0
bind -n M-2 select-window -t 1
bind -n M-3 select-window -t 2
bind -n M-4 select-window -t 3
bind -n M-5 select-window -t 4
bind -n M-6 select-window -t 5
# Remap global prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Enable mouse control
set -g mouse on
# Set color mode
set -g default-terminal "tmux-256color"
# Set pane styles
set -g pane-border-style 'fg=colour223'
set -g pane-active-border-style 'fg=colour106'
# Set status bar styles
set -g status-position bottom
set -g status-justify left
set -g status-style 'fg=colour223'
set -g status-left ''
set -g status-right '#[fg=colour223,bg=colour72] %Y/%m/%d #[fg=colour223,bg=colour132] %I:%M%P '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=colour223 bg=colour106'
setw -g window-status-current-format ' #I#[fg=colour223]:#[fg=colour223]#W#[fg=colour223]#F '
setw -g window-status-style 'fg=colour223'
setw -g window-status-format ' #I#[fg=colour223]:#[fg=colour223]#W#[fg=colour223]#F '
# Set messages styles
set -g message-style 'fg=colour124 bg=colour18'
# Move the statusbar to top
set-option -g status-position top
# Turn on autorestore
set -g @continuum-restore 'on'
# Reorder windows when one window is deleted
set-option -g renumber-windows on
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
let mapleader=','
call plug#begin(stdpath('data') . '/plugged')
Plug 'morhetz/gruvbox'
Plug 'haya14busa/is.vim'
Plug 'sheerun/vim-polyglot'
Plug 'itchyny/lightline.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tpope/vim-obsession'
Plug 'tpope/vim-fugitive'
Plug 'https://github.com/tpope/vim-commentary'
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-surround'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
call plug#end()
let g:coc_global_extensions=[
\'coc-json',
\'coc-pairs',
\'coc-emmet',
\'coc-tsserver',
\'coc-prettier',
\'coc-java'
\]
let g:fzf_action = {
\ 'ctrl-h': 'split',
\ 'ctrl-v': 'vsplit'
\ }
let g:fzf_layout = { 'window': 'call FloatingFZF()' }
function! FloatingFZF()
let buf = nvim_create_buf(v:false, v:true)
call setbufvar(buf, '&signcolumn', 'no')
let height = float2nr(20)
let width = float2nr(100)
let horizontal = float2nr((&columns - width) / 2)
let vertical = float2nr((&lines - height) / 2)
let opts = {
\ 'relative': 'editor',
\ 'row': vertical,
\ 'col': horizontal,
\ 'width': width,
\ 'height': height,
\ 'style': 'minimal'
\ }
call nvim_open_win(buf, v:true, opts)
endfunction
colorscheme gruvbox
set splitright
set cursorline
set incsearch
set hlsearch
" Enables hidden buffers -> don't have to write current buffer before using
" goto functions
set hidden
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set updatetime=300
set shortmess+=c
command! -nargs=0 Prettier :CocCommand prettier.formatFile
command! -nargs=? -complete=dir Files call fzf#vim#files(<q-args>, {'options': ['--layout=reverse']})
command! -nargs=? -complete=dir Buffers call fzf#vim#buffers(<q-args>, {'options': ['--layout=reverse']})
command! -nargs=? -complete=dir Ag call fzf#vim#ag(<q-args>, {'options': ['--layout=reverse']})
nmap <leader>f :Files <CR>
nmap <leader>b :Buffers<CR>
nmap <leader>l :Ag<CR>
nmap <leader>a :CocAction<CR>
nmap <leader>d :CocList diagnostics<CR>
nmap <leader>gs :Gedit :<CR>
map f <Plug>(easymotion-bd-f)
nmap f <Plug>(easymotion-overwin-f)
inoremap <silent><expr> <c-n> coc#refresh()
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" Notify coc.nvim that enter has been pressed
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gt <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
nmap <silent> gh :call CocAction('doHover')<CR>
nmap <leader>rn <Plug>(coc-rename)
nmap <C-j> <C-W>j
nmap <C-k> <C-W>k
nmap <C-h> <C-W>h
nmap <C-l> <C-W>l
nmap <C-q> :quit<CR>
nmap <C-s> :write<CR>
nmap <leader>so :so %<CR>
function! s:MoveCurrentFile()
let l:oldName = @%
let l:newName = input("FileName: ", l:oldName)
if (match(l:oldName, l:newName) != 0)
execute 'silent saveas ' . l:newName
execute 'silent !rm ' . l:oldName
endif
endfunction
command! -nargs=0 Mv call <SID>MoveCurrentFile()
nmap <leader>mv :Mv<CR>
source ~/.antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle yarn
antigen bundle tmux
antigen bundle docker
antigen bundle httpie
antigen bundle mafredri/zsh-async
antigen bundle sindresorhus/pure
antigen apply
alias vim=nvim
eval $(thefuck --alias)
function sha256() { echo -n $1 | sha256sum | cut -d ' ' -f1 }
export FZF_DEFAULT_COMMAND='ag -g ""'
export PATH="/home/tim/.yarn/bin:$PATH"
export NVM_DIR="$HOME/.nvm"
export PATH="$NVM_DIR/versions/node/v$(<$NVM_DIR/alias/default)/bin:$PATH"
alias nvm="unalias nvm; [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"; nvm $@"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export JAVA_HOME=~/.sdkman/candidates/java/current
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/tim/.sdkman"
[[ -s "/home/tim/.sdkman/bin/sdkman-init.sh" ]] && source "/home/tim/.sdkman/bin/sdkman-init.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment