cleanup vim and tmux configs
This commit is contained in:
parent
50be442ef2
commit
3e9e02732f
|
@ -7,20 +7,33 @@ unbind '"'
|
|||
unbind %
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
# Rebind pane switch to Meta-arrow
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
# Bind config reloading
|
||||
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
|
||||
bind r source-file ~/.tmux.conf \; display-message 'Config reloaded...'
|
||||
|
||||
# Escape delay is anoying in vim
|
||||
set -s escape-time 0
|
||||
|
||||
# Smart pane switching with awareness of Vim splits.
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
||||
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
||||
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
||||
bind-key -T copy-mode-vi C-h select-pane -L
|
||||
bind-key -T copy-mode-vi C-j select-pane -D
|
||||
bind-key -T copy-mode-vi C-k select-pane -U
|
||||
bind-key -T copy-mode-vi C-l select-pane -R
|
||||
bind-key -T copy-mode-vi C-\ select-pane -l
|
||||
|
||||
# Mouse
|
||||
set -g mouse on
|
||||
|
||||
# Terminal
|
||||
set -g default-terminal "screen-256color"
|
||||
set -ga terminal-overrides ",screen-256color:Tc"
|
||||
# tmux-256-color is badly supported on some system, especially servers so we pretend to base screen instead
|
||||
set -g default-terminal 'screen-256color'
|
||||
set -ga terminal-overrides ',screen-256color:Tc'
|
||||
|
||||
# Window
|
||||
set -g base-index 1
|
||||
|
@ -28,27 +41,27 @@ set -g base-index 1
|
|||
# Pane
|
||||
setw -g pane-base-index 1
|
||||
setw -g allow-rename off
|
||||
set -g pane-border-fg "colour7"
|
||||
set -g pane-active-border-fg "colour5"
|
||||
set -g pane-border-fg 'colour7'
|
||||
set -g pane-active-border-fg 'colour5'
|
||||
|
||||
# Status bar
|
||||
set -g status-position top
|
||||
set -g status-bg "default"
|
||||
set -g status-bg 'default'
|
||||
|
||||
setw -g window-status-fg "colour7"
|
||||
setw -g window-status-bg "default"
|
||||
setw -g window-status-format " #I:#W"
|
||||
setw -g window-status-fg 'colour7'
|
||||
setw -g window-status-bg 'default'
|
||||
setw -g window-status-format ' #I:#W'
|
||||
|
||||
setw -g window-status-current-fg "colour15"
|
||||
setw -g window-status-current-bg "default"
|
||||
setw -g window-status-current-format " [#I:#W]"
|
||||
setw -g window-status-current-fg 'colour15'
|
||||
setw -g window-status-current-bg 'default'
|
||||
setw -g window-status-current-format ' [#I:#W]'
|
||||
|
||||
setw -g window-status-activity-attr bold
|
||||
|
||||
set -g status-left-fg "colour7"
|
||||
set -g status-left-fg 'colour7'
|
||||
set -g status-left '{#[fg=colour6]#S#[fg=default]}'
|
||||
|
||||
set -g status-right-length 100
|
||||
set -g status-right-fg "colour7"
|
||||
set -g status-right-fg 'colour7'
|
||||
set -g status-right '#(__tmux_status)'
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ set ttimeoutlen=50
|
|||
" Shut the annoying bell
|
||||
set novisualbell
|
||||
" Set the updatetime
|
||||
set updatetime=1000
|
||||
set updatetime=750
|
||||
" Ignore case for ex command completion
|
||||
set smartcase
|
||||
nnoremap / /\C
|
||||
|
@ -46,9 +46,9 @@ augroup resCur
|
|||
augroup END
|
||||
|
||||
" Plugins
|
||||
let deinpath=$HOME."/.vim/bundle/repos/github.com/Shougo/dein.vim"
|
||||
let pluginpath=$HOME."/.vim/bundle"
|
||||
let &rtp.=",".deinpath
|
||||
let deinpath=$HOME.'/.vim/bundle/repos/github.com/Shougo/dein.vim'
|
||||
let pluginpath=$HOME.'/.vim/bundle'
|
||||
let &rtp.=','.deinpath
|
||||
|
||||
if dein#load_state(pluginpath)
|
||||
call dein#begin(pluginpath)
|
||||
|
@ -56,29 +56,29 @@ if dein#load_state(pluginpath)
|
|||
"call dein#add(deinpath)
|
||||
|
||||
" Colorscheme
|
||||
call dein#add("ajh17/Spacegray.vim.git")
|
||||
call dein#add('ajh17/Spacegray.vim.git')
|
||||
|
||||
" Interface
|
||||
call dein#add("itchyny/lightline.vim")
|
||||
call dein#add('itchyny/lightline.vim')
|
||||
call dein#add('mgee/lightline-bufferline')
|
||||
call dein#add('ryanoasis/vim-devicons')
|
||||
call dein#add("airblade/vim-gitgutter")
|
||||
call dein#add("christoomey/vim-tmux-navigator")
|
||||
call dein#add("scrooloose/nerdtree")
|
||||
call dein#add('airblade/vim-gitgutter')
|
||||
call dein#add('christoomey/vim-tmux-navigator')
|
||||
call dein#add('scrooloose/nerdtree')
|
||||
|
||||
" Tools / Commands
|
||||
call dein#add("tpope/vim-surround")
|
||||
call dein#add("jiangmiao/auto-pairs")
|
||||
call dein#add("tpope/vim-endwise")
|
||||
call dein#add("chrisbra/unicode.vim")
|
||||
call dein#add("ctrlpvim/ctrlp.vim")
|
||||
call dein#add('tpope/vim-surround')
|
||||
call dein#add('jiangmiao/auto-pairs')
|
||||
call dein#add('tpope/vim-endwise')
|
||||
call dein#add('chrisbra/unicode.vim')
|
||||
call dein#add('ctrlpvim/ctrlp.vim')
|
||||
|
||||
" Linting / Completion
|
||||
call dein#add("w0rp/ale")
|
||||
call dein#add("maralla/completor.vim")
|
||||
call dein#add('w0rp/ale')
|
||||
call dein#add('maralla/completor.vim')
|
||||
|
||||
" Language
|
||||
call dein#add("sheerun/vim-polyglot")
|
||||
call dein#add('sheerun/vim-polyglot')
|
||||
|
||||
call dein#end()
|
||||
call dein#save_state()
|
||||
|
@ -94,9 +94,9 @@ endif
|
|||
|
||||
" Completor
|
||||
" TAB to choose completion
|
||||
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||
"inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"
|
||||
inoremap <expr> <Tab> pumvisible() ? '\<C-n>' : '\<Tab>'
|
||||
inoremap <expr> <S-Tab> pumvisible() ? '\<C-p>' : '\<S-Tab>'
|
||||
"inoremap <expr> <cr> pumvisible() ? '\<C-y>\<cr>' : '\<cr>'
|
||||
let g:completor_python_binary = '/usr/bin/python'
|
||||
let g:completor_node_binary = '/usr/bin/node'
|
||||
let g:completor_clang_binary = '/usr/bin/clang'
|
||||
|
|
Loading…
Reference in New Issue