Skip to content

Instantly share code, notes, and snippets.

@kaichen
Last active October 1, 2019 03:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaichen/27677e395c751f4912f71c36eedc4d24 to your computer and use it in GitHub Desktop.
Save kaichen/27677e395c751f4912f71c36eedc4d24 to your computer and use it in GitHub Desktop.
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
" Sane tabs
" - Two spaces wide
set softtabstop=2
set tabstop=2
" - Expand them all
set expandtab
" - Indent by 2 spaces by default
set shiftwidth=2
set number " line numbering
set encoding=utf-8
" Highlight search results
set hlsearch
" Incremental search, search as you type
set incsearch
" Ignore case when searching
set ignorecase
" Ignore case when searching lowercase
set smartcase
" Stop highlighting on Enter
map <CR> :noh<CR>
" highlight cursor position
set cursorline
"set cursorcolumn
" Set the title of the iterm tab
set title
set hidden
let mapleader = "\\"
nnoremap ; :
set updatetime=300
set shortmess+=c
set signcolumn=yes
set mouse=nicr
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.local/share/nvim/plugged')
" Make sure you use single quotes
Plug 'mhinz/vim-startify', { 'on': 'Startify' }
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'dense-analysis/ale'
" Plug 'tpope/vim-surround'
Plug 'machakann/vim-sandwich'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-repeat'
Plug 'junegunn/rainbow_parentheses.vim'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '<plug>(GrepperOperator)'] }
Plug 'tpope/vim-unimpaired'
Plug 'edkolev/tmuxline.vim'
Plug 'sheerun/vim-polyglot'
" Initialize plugin system
call plug#end()
set background=dark
syntax enable
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | exec "Startify" | wincmd w | endif
" ale
let g:airline#extensions#ale#enabled = 1
" let g:ale_fixers = {
" \ '*': ['remove_trailing_lines', 'trim_whitespace'],
" \ 'javascript': ['eslint'],
" \}
let g:ale_fix_on_save = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment