MAC OS Development Environment Terminal Configuration
Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed. Mac OS development Environment Terminal Configuration---[toc]### Terminal theme Select Mac OS built-in theme has been very nice and nice, if not satisfied with the system comes with the theme, you can customize the configuration. The following configuration file is recommended here, download it, direct import just fine. [Https://github.com/chriskempson/tomorrow-theme] (Https://github.com/chriskempson/tomorrow-theme) # # # Vim configuration. VIMRC ' $ touch ~/.VIMRC ' configuration reads: ' Syntax on ' automatic syntax highlighting ' ColorScheme Molokai "Set color scheme" set nocompatible "Turn off VI compatibility mode set number" Show line Numbers "set Cursorline" highlight current row set ruler "open status bar ruler set Shiftwidth=4 "Set << and >> command width 4set softtabstop=4" so that when you press BACKSPACE, you can delete 4 spaces at a time set tabstop=4 "Set tab length is 4set n Obackup "Overwrite files without backing up set Autochdir" automatically switches the current directory to the directory where the current file is located set nocompatible "be improved, requiredfiletype off" required "the following Reset the sticky code in vim to repeat indent if &term =~ "xterm.*" let &t_ti = &t_ti. "\e[?2004h" Let &t_te = "\e[?2004l". &t_te function Xtermpastebegin (ret) set pastetoggle=<esc>[201~ set pas Te return a:ret endfunction map <expr> <esc>[200~ xtermpastebegin ("i") IMAP <expr> <esc>[200~ XTe Rmpastebegin ("") CMAP <esc>[200~ <nop> cmap <esc>[201~ <nop>endif ' # # # Tmux artifact Tmux install ' Brew install Tmux ' ' Tmux config ' ' $ vim ~/.tmux.conf# sets prefix globally# Reload tmux.confbind-key r source-file ~/.tmux.conf \; Display-message "~/.tmux.conf Reloaded" # Improve Colorsset-option-g default-terminal "Screen-256color" # Set prompt Behavior like emacsset-option-g Status-keys "emacs" # window Statussetw-g window-status-format "#F #i: #W #f" Setw-g Windo W-status-current-format "#F #i: #W #f" Setw-g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "Setw-g Window-status-current-format" #[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "setw-g WINDOW-STATUS-CURRENT-BG colour0setw-g window-status-current-fg colour11setw-g window-status-current-attr dimsetw-g WINDOW-STATUS-BG greensetw-g window-status-fg blacksetw-g window-status-attr reverse# panal themeset-g pane-border-bg C Olour0set-g PANE-BORDER-FG colour236set-g Pane-active-border-bG Colour0set-g PANE-ACTIVE-BORDER-FG colour55# Show session name in the status left, empty status Rightset-g Status-posi tion bottomset-g status-bg colour0set-g status-fg colour137set-g status-attr dimset-g status-left-length 50set-g Stat Us-left ' #[fg=magenta]#[fg=colour233,bg=colour245,bold]%h:%m:%s #[default] ' set-g status-right-length 50set-g Status-right ' #[fg=colour233,bg=colour241,bold]%d/%m/%y ' setw-g window-status-current-fg colour81setw-g WINDOW-STATUS-CURRENT-BG colour56setw-g window-status-current-attr boldsetw-g window-status-current-format ' #I #[fg= COLOUR250]:#[FG=COLOUR255] #W #[fg=colour50] #F ' setw-g window-status-fg colour138setw-g WINDOW-STATUS-BG Colour235setw-g window-status-attr nonesetw-g window-status-format ' #I #[fg=colour237]:#[fg=colour250] #W #[fg= colour244] #F ' setw-g window-status-bell-attr boldsetw-g window-status-bell-fg colour255setw-g WINDOW-STATUS-BELL-BG colour1# more intuitive panes split and remember current Pathbind-key-split-window-v-c ' #{pane_current_path} ' bind-key \ split-window-h-c ' #{pane_current_path} ' # Smart pane switching with awareness of V Im splits# see:https://github.com/christoomey/vim-tmux-navigatoris_vim= ' echo ' #{pane_current_command} ' | Grep-iqe "(^|\/) G? (view|n?vim?x?) (diff)? $ "' Bind-n c-h If-shell" $is _vim "" Send-keys c-h "" Select-pane-l "Bind-n c-j If-shell" $is _vim "" Send-keys C-j "" s Elect-pane-d "Bind-n c-k If-shell" $is _vim "" Send-keys c-k "" Select-pane-u "Bind-n c-l If-shell" $is _vim "" Send-keys C-l "Select-pane-r" Bind-n c-\ If-shell "$is _vim" "Send-keys c-\\" "Select-pane-l" # Resize panes using shift keybind-n s Left resize-pane-l 2bind-n s-right resize-pane-r 2bind-n s-down resize-pane-d 1bind-n s-up resize-pane-u # Remembe R current Patch When creating new Windowbind C new-window-c ' #{pane_current_path} ' # Set Base-index to 1 (useful for SWITC Hing between windows) set-option-g base-index 1set-option-g renumber-windows on# set Break-pane and Detach (-D) while Kee Ping FOCUs on Windowbind-key b break-pane-d# easily go to Tmux choose-tree to navigate between Sessionsbind-key c-j Cho ose-tree# Enable mouse optionset-option-g mouse on# open copy with VI modesetw-g mode-keys vi# buffer cache copy to Mac system Clipboard bind C -C Run "Tmux Save-buffer-| Reattach-to-user-namespace pbcopy "# Mac system Clipboard contents copied to session bind C-v run" Reattach-to-user-namespace pbpaste | Tmux Load-buffer-\; Paste-buffer-d "# Bind y key for copy selected text to Mac system pasteboard bind-key-t copy-mode-vi ' y ' send-keys-x copy-pipe-and-cancel ' Reattach-to-user-namespace pbcopy ' # mouse drag selected text and copy to Mac system pasteboard bind-key-t Copy-mode-vi Mousedragend1pane send-x Copy-pipe-and-cancel "Pbcopy" ' # # # Tmux operation all prefix below represent ctrl+bsession related actions | Operations | Shortcut keys | | ----------------- | -------- || View/Toggle Session | Prefix S | | Leave Session | Prefix D | | Rename current session | Prefix $ | Window Related Actions | Operations | Shortcut keys | | ------------------ | ------------- || New Window | Prefix C | | Switch to the previous active window | Prefix Space | | Close a Window | Prefix & | | Use window number Tangent | Prefix window number | Pane Related Operations | Operations | Shortcut keys | | ------------------ | --------- || Switch to the next pane | Prefix O | | View the numbering of all panes | Prefix Q | | Splits a new pane vertically | Prefix "| | Split a new pane horizontally | Prefix% | | Temporarily put a form to maximum | Prefix z |284 click
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service