tmux and zshell

来源:互联网 发布:cdr相关软件 编辑:程序博客网 时间:2024/05/22 06:49

zshell

  • ^a: go to beginning of the command line
  • ^e: go to end of the command line
  • ^_: undo
  • ^u: clear command line
  • a-l: ls

like bash shells

  • ^k: clear till the end
  • a-b: move back a word
  • a-f: move forward a word
  • ^w: remove previous word
  • a-d: remove current word
  • a-u: make current word uppercase
  • a-c: capitalize current word
  • a-t: swap the current and previous word
  • ^t: swap the current and previous letter
  • ^p: previous command
  • a-.:last word from previous command
  • !!: previous command

oh-my-zsh

use oh-my-zsh (github) to make zshell better to use. (git-prompt and man not used)

plugins=(git tmux scd repo man zsh-autosuggestions)

zsh-autosuggestions is a plugin to put under custom/plugins folder.

alias ll='ls -alFh'alias la='ls -A'alias l='ls -CF'if [ -f ~/.bash_aliases ]; then    . ~/.bash_aliasesfi

modified ZSH_THEME=”gallois”

RPS1='$(ruby_prompt_info) $EPS1'

commands

  • d: list recent directories in numbers. Just enter a number and [Enter] to switch.
  • md: mkdir
  • rd: rmdir
  • …: cd ../../
  • …..: cd ../../../..

tmux

the Tao of tmux
~/.tmux.conf

# C-b is not acceptable -- Vim uses itset-option -g prefix C-abind C-a send-prefix#bind-key C-a last-window# hjkl pane traversalbind h select-pane -Lbind j select-pane -Dbind k select-pane -Ubind l select-pane -Rset -g mode-keys vibind -t vi-copy 'v' begin-selectionbind -t vi-copy 'y' copy-selection

use ^a as prefix to all commands.

  • ?: help
  • d: detach
  • t: clock
  • z: zoom
  • %: split window horizontally
  • “: split window
  • h/j/k/l: switch to a pane
  • x: kill current pane
  • []: clipboard. v to select and y to yank
  • =: choose a buffer to paste
  • #: list buffers
  • $: rename current session
  • !: move out current pane
  • q: show pane indexes
  • ;: last pane
  • ^z: suspend
  • n: new window
  • w: choose a window to switch to
  • 0-9: goto window
  • n: goto next window
  • p: goto previous window
  • :: run a tmux command

tmux for oh-my-zsh

  • ts create a new session
  • tl list sessions
  • ta attach a session

git for oh-my-zsh

wiki
- g
- ga: add
- gb: branch
- gba: branch -a
- gbl: blame (-L for line number)
- gsps: show
- gc: commit
- gc!: commit –amend
- gca: commit -a (to add all modified and deleted files)
- gcmsg: commit -m (with a message)
- gcam: commit -a -m
- gco: checkout
- gcm: checkout master
- gcb: checkout -b (with a branch name)
- gcp: cherry-pick
- gcpa: cherry-pick –abort
- gcpc: cherry-pick –continue
- gclean: clean -df
- gd: diff
- gdca: diff –cached
- gf: fetch
- ghh: help
- gl: pull
- glg: log
- glgp: log -p
- gp: push
- grb: rebase
- grh: reset HEAD
- grhh: reset HEAD –hard
- gst: status
- gsta: stash save
- gstl: stash list
- gstp: stash pop
- current_branch
- current_repository

repo for oh-my-zsh

  • r: repo

scd for oh-my-zsh

  • scd: list recent directories to cd to
原创粉丝点击