Last active
February 7, 2020 22:38
-
-
Save hharnisc/2cc16eab77b3f6d286dcc93af3b8415a to your computer and use it in GitHub Desktop.
Vim + Tmux Dotfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g mouse on | |
# panes | |
set -g pane-border-style fg=colour235 | |
set -g pane-active-border-style fg=colour15 | |
# statusbar | |
set -g status-position bottom | |
set -g status-justify left | |
set -g status-style bg=colour235,fg=colour0,dim | |
set -g status-left '' | |
set -g status-right '#[fg=colour15,bg=colour233,bold] #H ' | |
set -g status-right-length 50 | |
set -g status-left-length 20 | |
setw -g window-status-current-style fg=colour235,bg=colour15,bold | |
setw -g window-status-current-format ' #I#[fg=colour235]:#[fg=colour235]#W#[fg=colour239]#F ' | |
setw -g window-status-style fg=colour15,bg=colour233,none | |
setw -g window-status-format ' #I#[fg=colour7]:#[fg=colour7]#W#[fg=colour7]#F ' | |
# pane navigation | |
bind -r k select-pane -U | |
bind -r j select-pane -D | |
bind -r h select-pane -L | |
bind -r l select-pane -R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" turn on syntax highlighting | |
syntax on | |
" show line number | |
set number | |
" underline the current line | |
set cursorline | |
" always show gutter | |
set signcolumn=yes | |
" highlight while searching | |
set incsearch | |
" set update frequency to 100ms" | |
set updatetime=100 | |
" set directory for swapfiles | |
set directory=~/.vim/swapfiles/ | |
" default to showing invisible chars | |
set listchars=eol:¬,tab:»\ ,trail:·,extends:>,precedes:< | |
set list | |
" minimal color scheme | |
hi NonText ctermfg=Gray | |
hi SpecialKey ctermfg=Gray | |
hi LineNr ctermfg=Gray | |
" shortcut to toggle invisibles | |
nmap <leader>l :set list!<CR> | |
" lint js files | |
let g:ale_fixers = { | |
\ '*': ['remove_trailing_lines', 'trim_whitespace'], | |
\ 'javascript': ['eslint'], | |
\ 'typescript': ['tslint'], | |
\} | |
" set tabs to 2 spaces | |
set ts=2 | |
" fix files with eslint | |
let g:ale_fix_on_save = 1 | |
" load all plugins | |
packloadall | |
" load help | |
silent! helptags ALL | |
" detect indentation | |
autocmd BufReadPost * :DetectIndent | |
" set indentation based on the current file | |
set autoindent | |
set smartindent | |
" auto-close brackets etc. | |
"let auto_close_fts = ["typescript","javascript","json"] | |
"execute "autocmd FileType " . join(auto_close_fts, ",") . " inoremap \" \"\"<left>" | |
"execute "autocmd FileType " . join(auto_close_fts, ",") . " inoremap ' ''<left>" | |
"execute "autocmd FileType " . join(auto_close_fts, ",") . " inoremap ( ()<left>" | |
"execute "autocmd FileType " . join(auto_close_fts, ",") . " inoremap [ []<left>" | |
"execute "autocmd FileType " . join(auto_close_fts, ",") . " inoremap { {}<left>" | |
"execute "autocmd FileType " . join(auto_close_fts, ",") . " inoremap {<CR> {<CR>}<ESC>O" | |
"execute "autocmd FileType " . join(auto_close_fts, ",") . " inoremap {;<CR> {<CR>};<ESC>O" | |
" enable 256 colors | |
set t_Co=256 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment