浏览代码

vim, edit-command-line

Tom McKenzie 4 年之前
父节点
当前提交
c9e81776b7
共有 4 个文件被更改,包括 17 次插入0 次删除
  1. 4 0
      .bashrc
  2. 6 0
      .rc.d/aliases.sh
  3. 2 0
      .vimrc
  4. 5 0
      .zshrc.d/bindkey.zsh

+ 4 - 0
.bashrc

@@ -29,3 +29,7 @@ bind '"\e[B": history-search-forward'
 if [ -f `brew --prefix`/etc/bash_completion ]; then
   . `brew --prefix`/etc/bash_completion
 fi
+
+export NVM_DIR="$HOME/.nvm"
+[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
+[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

+ 6 - 0
.rc.d/aliases.sh

@@ -6,6 +6,9 @@ alias la='ls -lAFh'   # long list,show almost all,show type,human readable
 alias lr='ls -tRFh'   # sorted by date,recursive,show type,human readable
 alias lt='ls -ltFh'   # long list,sorted by date,show type,human readable
 alias ll='ls -l'      # long list
+alias lth='lt | head -16' # latest 15
+
+alias dfh='df -h' # df
 
 # export local .env file
 alias export-env="export \$(grep -v '^#' .env | xargs -0)"
@@ -27,6 +30,9 @@ if [[ "$(uname -s)" = 'Darwin' ]]; then
   alias chrome-tabs="$HOME/dotfiles/bin/chrome-tabs"
 fi
 
+# node
+alias scripts="jq .scripts package.json"
+
 # other bin
 alias awsp="$HOME/dotfiles/bin/aws-profile"
 

+ 2 - 0
.vimrc

@@ -29,6 +29,8 @@ syntax on
 filetype plugin on
 filetype plugin indent on
 
+setlocal formatoptions-=tc
+
 colorscheme industry
 highlight clear SignColumn
 highlight Normal ctermbg=NONE guibg=NONE

+ 5 - 0
.zshrc.d/bindkey.zsh

@@ -22,3 +22,8 @@ bindkey '^[[4~' end-of-line # tmux
 
 # ESC + /
 bindkey -M main -r '^[/'
+
+# ESC + v
+autoload -z edit-command-line
+zle -N edit-command-line
+bindkey "^X^E" edit-command-line