diff --git a/bash/.bashrc b/bash/.bashrc index f2cf9a1..d9ee36b 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -57,15 +57,18 @@ alias gl='git lg' alias gr='git reset' alias gh='git lg -1' -alias rdc='be rake db:create' -alias rdd='be rake db:drop' -alias rdm='be rake db:migrate' -alias rdr='be rake db:rollback' -alias rds='be rake db:seed' +alias rdc='bin/rails db:create' +alias rdd='bin/rails db:drop' +alias rdm='bin/rails db:migrate' +alias rdr='bin/rails db:rollback' +alias rds='bin/rails db:seed' +alias br='bin/rails' alias rc='bin/rails c' alias rs='bin/rails s -p3001' +alias mux='tmuxinator start' + yta() { streamlink $1 audio_mp4 } diff --git a/vim/.vimrc b/vim/.vimrc index 7063987..43695ff 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -19,9 +19,9 @@ set fileencoding=utf-8 set history=1000 " Remap the to , -nnoremap -let mapleader="\" -let maplocalleader = "\" +" nnoremap +let mapleader="," +let maplocalleader = "," " Includes ftplugin.vim which is responsible for filetype detection filetype plugin indent on @@ -59,7 +59,7 @@ Plug 'mattn/gist-vim' | Plug 'mattn/webapi-vim' Plug 'Raimondi/delimitMate' Plug 'nelstrom/vim-visual-star-search' Plug 'benmills/vimux' -Plug 'skalnik/vim-vroom' +Plug 'janko-m/vim-test' Plug 'dyng/ctrlsf.vim' Plug 'terryma/vim-expand-region' Plug 'terryma/vim-multiple-cursors' @@ -256,6 +256,10 @@ let g:netrw_banner = 0 let g:netrw_list_hide = '^\.$' let g:netrw_liststyle = 4 +" --- test + +let test#strategy = "vimux" + " --- NERDTree let NERDTreeWinPos = "right" @@ -288,6 +292,10 @@ let g:ale_sign_error = 'x' let g:ale_sign_warning = '│' let g:ale_echo_msg_format = '[%severity%] %s' +let g:ale_fixers = { +\ 'ruby': ['rubocop'], +\} + " --- fzf let g:fzf_colors = @@ -392,9 +400,6 @@ if has("autocmd") " Close tab if only NERDTree left au WinEnter * call CloseNERDTree() - " Equalize window sizes when Vim is resized - au VimResized * tabdo wincmd = - " Apply solarized tweak au ColorScheme solarized call TweakSolarized() @@ -611,11 +616,13 @@ cnoremap " , -> clears search highlight nmap :nohlsearch " ,, -> toggle between last open buffers -nmap <,><,> +nmap " CtrlP -> fzf :Files -nnoremap (expand('%') =~ 'NERD_tree' ? "\\" : '').":Files\" +nnoremap (expand('%') =~ 'NERD_tree' ? "\\" : '').":Files\" " ,w -> strip trailing whitespace nmap w :call StripTrailingWhitespace() +" ,x rubocop --auto-correct +nmap x :ALEFix " ,n -> NERDTree nmap n :NERDTreeToggle " ,c -> next conflict marker @@ -630,12 +637,17 @@ nmap f :CtrlSF nmap g :Gitv " ,d -> binding fucking pry nmap d orequire 'pry'; binding.pry +nmap D Orequire 'pry'; binding.pry " ,p -> current buffer file path nmap p :echo @% " ,s -> reload vimrc nmap s :so ~/.vimrc " ,rh -> hashrocket to : nmap rh :%s/\v:(\w+) \=\>/\1:/g +" ,r -> +nmap r :TestFile +" ,j -> +nmap j :%!python -m json.tool " Switching between tabs nmap :tabnext @@ -685,6 +697,8 @@ nnoremap :tabnew ~/iCloud/Wiki/index.md " I don't use it nnoremap K +" K reverse of J +" nnoremap K fr " Move visual block vnoremap J :m '>+1gv=gv @@ -709,3 +723,21 @@ noremap gd :Gvdiff " Color under cursor map :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" + +" EXPERIMENTAL: +noremap w :w + +nmap r :TestFile +nmap t :TestNearest +nmap t :TestNearest +nmap t :TestFile +nmap t :TestSuite +nmap t :TestLast +nmap t :TestVisit + +inoremap +vnoremap +cnoremap +inoremap +vnoremap +cnoremap