dotfiles: update vim, bash, tmux
This commit is contained in:
@@ -36,6 +36,7 @@ alias grep='rg'
|
|||||||
alias be='bundle exec'
|
alias be='bundle exec'
|
||||||
alias ..='cd ..'
|
alias ..='cd ..'
|
||||||
alias ...='cd ../..'
|
alias ...='cd ../..'
|
||||||
|
alias md='mkdir -p'
|
||||||
|
|
||||||
alias gco='git checkout'
|
alias gco='git checkout'
|
||||||
alias gd='git diff'
|
alias gd='git diff'
|
||||||
@@ -48,6 +49,7 @@ alias gup='git up'
|
|||||||
alias gp='git push'
|
alias gp='git push'
|
||||||
alias gb='git branch'
|
alias gb='git branch'
|
||||||
alias gl='git lg'
|
alias gl='git lg'
|
||||||
|
alias gr='git reset'
|
||||||
|
|
||||||
alias rdc='be rake db:create'
|
alias rdc='be rake db:create'
|
||||||
alias rdd='be rake db:drop'
|
alias rdd='be rake db:drop'
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
gem: --no-rdoc --no-ri
|
install: --no-rdoc --no-ri --env-shebang
|
||||||
|
update: --no-rdoc --no-ri
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# NOTE: First of all install TPM
|
# NOTE: First of all install TPM
|
||||||
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
|
|
||||||
set-option -g default-command "reattach-to-user-namespace -l bash"
|
|
||||||
|
|
||||||
# Set the base index for windows to 1 instead of 0.
|
# Set the base index for windows to 1 instead of 0.
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
|
|
||||||
@@ -47,8 +45,6 @@ set -g status-justify centre
|
|||||||
# => Bindings
|
# => Bindings
|
||||||
# Kill pane without confirmation
|
# Kill pane without confirmation
|
||||||
bind-key x kill-pane
|
bind-key x kill-pane
|
||||||
bind-key \ split-window -h
|
|
||||||
bind-key - split-window -v
|
|
||||||
|
|
||||||
# Painless copying with tmux-yank
|
# Painless copying with tmux-yank
|
||||||
unbind [
|
unbind [
|
||||||
@@ -70,9 +66,7 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
|
|||||||
|
|
||||||
# Depends on 'urlview'
|
# Depends on 'urlview'
|
||||||
set -g @plugin 'tmux-plugins/tmux-urlview'
|
set -g @plugin 'tmux-plugins/tmux-urlview'
|
||||||
set -g @plugin 'tmux-plugins/tmux-copycat'
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
set -g @plugin 'tmux-plugins/tmux-open'
|
|
||||||
|
|
||||||
# Default keysbindings for panes
|
# Default keysbindings for panes
|
||||||
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
||||||
|
|||||||
94
vim/.vimrc
94
vim/.vimrc
@@ -66,7 +66,6 @@ Plug 'dyng/ctrlsf.vim'
|
|||||||
Plug 'terryma/vim-expand-region'
|
Plug 'terryma/vim-expand-region'
|
||||||
Plug 'terryma/vim-multiple-cursors'
|
Plug 'terryma/vim-multiple-cursors'
|
||||||
Plug 'bogado/file-line'
|
Plug 'bogado/file-line'
|
||||||
Plug 'neomake/neomake'
|
|
||||||
Plug 'vim-utils/vim-interruptless'
|
Plug 'vim-utils/vim-interruptless'
|
||||||
|
|
||||||
" ======== Snippets & Autocomplete ======================
|
" ======== Snippets & Autocomplete ======================
|
||||||
@@ -94,8 +93,9 @@ Plug 'tpope/vim-vinegar'
|
|||||||
|
|
||||||
" ======== Experimental =================================
|
" ======== Experimental =================================
|
||||||
|
|
||||||
Plug 'junegunn/goyo.vim'
|
Plug 'w0rp/ale'
|
||||||
Plug 'junegunn/limelight.vim'
|
" Plug 'junegunn/goyo.vim'
|
||||||
|
" Plug 'junegunn/limelight.vim'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
@@ -339,6 +339,20 @@ let g:UltiSnipsExpandTrigger = '<tab>'
|
|||||||
let g:UltiSnipsJumpForwardTrigger = '<tab>'
|
let g:UltiSnipsJumpForwardTrigger = '<tab>'
|
||||||
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
|
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
|
||||||
|
|
||||||
|
" --- gitgutter
|
||||||
|
|
||||||
|
let g:gitgutter_sign_added = '│'
|
||||||
|
let g:gitgutter_sign_modified = '│'
|
||||||
|
let g:gitgutter_sign_removed = '│'
|
||||||
|
let g:gitgutter_sign_modified_removed = '│'
|
||||||
|
let g:gitgutter_sign_removed_first_line = '│'
|
||||||
|
|
||||||
|
" --- ale
|
||||||
|
|
||||||
|
let g:ale_sign_error = 'x'
|
||||||
|
let g:ale_sign_warning = '│'
|
||||||
|
let g:ale_echo_msg_format = '[%severity%] %s'
|
||||||
|
|
||||||
" --- fzf
|
" --- fzf
|
||||||
|
|
||||||
let g:fzf_colors =
|
let g:fzf_colors =
|
||||||
@@ -454,11 +468,6 @@ let g:lightline.mode_map =
|
|||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
|
||||||
" --- neomake
|
|
||||||
|
|
||||||
call neomake#configure#automake('rw')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" ========================================================
|
" ========================================================
|
||||||
" -> Autocommands
|
" -> Autocommands
|
||||||
@@ -685,13 +694,7 @@ nnoremap ; :
|
|||||||
" Close buffer by Q
|
" Close buffer by Q
|
||||||
nnoremap <silent> Q :q!<CR>
|
nnoremap <silent> Q :q!<CR>
|
||||||
|
|
||||||
" Move between splits (not very nice)
|
" Move between splits
|
||||||
nmap <silent> <Up> :wincmd k<CR>
|
|
||||||
nmap <silent> <Down> :wincmd j<CR>
|
|
||||||
nmap <silent> <Left> :wincmd h<CR>
|
|
||||||
nmap <silent> <Right> :wincmd l<CR>
|
|
||||||
|
|
||||||
" Move between splits (better backup option)
|
|
||||||
nnoremap <C-h> <C-w>h
|
nnoremap <C-h> <C-w>h
|
||||||
nnoremap <C-j> <C-w>j
|
nnoremap <C-j> <C-w>j
|
||||||
nnoremap <C-k> <C-w>k
|
nnoremap <C-k> <C-w>k
|
||||||
@@ -701,6 +704,9 @@ nnoremap <C-l> <C-w>l
|
|||||||
cnoremap <C-A> <Home>
|
cnoremap <C-A> <Home>
|
||||||
cnoremap <C-E> <End>
|
cnoremap <C-E> <End>
|
||||||
|
|
||||||
|
" CtrlP -> fzf :Files
|
||||||
|
nnoremap <silent> <expr> <space> (expand('%') =~ 'NERD_tree' ? "\<c-w>\<c-w>" : '').":Files\<cr>"
|
||||||
|
|
||||||
" ,<space> -> clears search highlight
|
" ,<space> -> clears search highlight
|
||||||
nmap <silent><leader><space> :nohlsearch<cr>
|
nmap <silent><leader><space> :nohlsearch<cr>
|
||||||
" ,, -> toggle between last open buffers
|
" ,, -> toggle between last open buffers
|
||||||
@@ -736,13 +742,6 @@ nmap <silent><S-Tab> :tabprevious<CR>
|
|||||||
nmap N Nzz
|
nmap N Nzz
|
||||||
nmap n nzz
|
nmap n nzz
|
||||||
|
|
||||||
" Move faster
|
|
||||||
nnoremap <C-j> <C-d>
|
|
||||||
nnoremap <C-k> <C-u>
|
|
||||||
" Even in VISUAL mode
|
|
||||||
vnoremap <C-j> <C-d>
|
|
||||||
vnoremap <C-k> <C-u>
|
|
||||||
|
|
||||||
" Move properly when line wrapping is on
|
" Move properly when line wrapping is on
|
||||||
nnoremap j gj
|
nnoremap j gj
|
||||||
nnoremap k gk
|
nnoremap k gk
|
||||||
@@ -802,56 +801,5 @@ noremap <leader>gup :Gpull<CR>
|
|||||||
noremap <leader>gs :Gstatus<CR>
|
noremap <leader>gs :Gstatus<CR>
|
||||||
noremap <leader>gd :Gvdiff<CR>
|
noremap <leader>gd :Gvdiff<CR>
|
||||||
|
|
||||||
" CtrlP -> fzf
|
|
||||||
nnoremap <C-p> :Files<Cr>
|
|
||||||
|
|
||||||
" TODO: Space should be used for something more useful
|
|
||||||
" Folding on <Space>
|
|
||||||
|
|
||||||
" NOTE: Keep this for future reference
|
|
||||||
" My attempt at git 2-way merging
|
|
||||||
" map <silent> <space>l :diffget //2<CR>:diffupdate<CR>
|
|
||||||
" map <silent> <space>h :diffget //3<CR>:diffupdate<CR>
|
|
||||||
" nnoremap <space>j ]cw
|
|
||||||
" nnoremap <space>k [cw
|
|
||||||
" map <silent> <space><w> :only<CR>:w<CR>
|
|
||||||
|
|
||||||
" REMINDERS:
|
|
||||||
" m -- ruby method motion (e.g. cim)
|
|
||||||
" i -- indentation motion (e.g. dai)
|
|
||||||
|
|
||||||
" EXPERIMENTAL:
|
|
||||||
|
|
||||||
" Color under cursor
|
" Color under cursor
|
||||||
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
|
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
|
||||||
|
|
||||||
" Color name (:help cterm-colors) or ANSI code
|
|
||||||
let g:limelight_conceal_ctermfg = 240
|
|
||||||
|
|
||||||
" Default: 0.5
|
|
||||||
let g:limelight_default_coefficient = 0.7
|
|
||||||
|
|
||||||
" Highlighting priority (default: 10)
|
|
||||||
" Set it to -1 not to overrule hlsearch
|
|
||||||
let g:limelight_priority = -1
|
|
||||||
|
|
||||||
" Goyo
|
|
||||||
" Toggle distraction-free mode
|
|
||||||
nnoremap <silent> <leader>g :Goyo<cr>
|
|
||||||
|
|
||||||
fun! s:goyoEnter()
|
|
||||||
set scrolloff=999 " Keep the edited line vertically centered
|
|
||||||
set wrap
|
|
||||||
set noshowcmd
|
|
||||||
Limelight
|
|
||||||
endf
|
|
||||||
|
|
||||||
fun! s:goyoLeave()
|
|
||||||
set showcmd
|
|
||||||
set nowrap
|
|
||||||
set scrolloff=5
|
|
||||||
Limelight!
|
|
||||||
endf
|
|
||||||
|
|
||||||
autocmd! User GoyoEnter nested call <sid>goyoEnter()
|
|
||||||
autocmd! User GoyoLeave nested call <sid>goyoLeave()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user