Преглед на файлове

add tmux mouse support, fix tmux vim colours, tweak tmuxinator projects

Weiyi Lou преди 13 години
родител
ревизия
26218de991
променени са 6 файла, в които са добавени 66 реда и са изтрити 20 реда
  1. 14 12
      tmux/tmux.conf
  2. 28 0
      tmux/tmuxinator/delivery.yml
  3. 12 0
      tmux/tmuxinator/dev.yml
  4. 7 7
      tmux/tmuxinator/schools.yml
  5. 5 0
      zsh/omz-custom/tmux.zsh
  6. 0 1
      zsh/omz-custom/tmuxinator.zsh

+ 14 - 12
tmux/tmux.conf

@@ -8,10 +8,6 @@ set-option -g base-index 1
 # history scrollback
 set-option -g history-limit 9999999
 
-# act like vim
-set-option -g status-keys vi
-set-window-option -g mode-keys vi # vi keys in copy mode (prefix+[)
-
 # Display a status line message when activity occurs in a window for which the
 # monitor-activity window option is enabled.
 set-option -g visual-activity on
@@ -20,21 +16,28 @@ set-option -g visual-activity on
 # current window, rather than the smallest session to which it is attached.
 set-window-option -g aggressive-resize on
 
+# mouse support (for scrollback)
+set-option -g mode-mouse on
+
+# act like vim
+set-option -g status-keys vi
+set-window-option -g mode-keys vi # vi keys in copy mode (prefix+[)
+
 
 #######################
 # General Key Bindings
 #######################
 
+# act like vim. enhance copy mode to use more vim like keys for copying
+bind-key -t vi-copy 'v' begin-selection
+bind-key -t vi-copy 'y' copy-selection
+
 # prefix+R to reload the config file
 bind-key C-r source-file ~/.tmux.conf; display-message "tmux.conf reloaded"
 
-# detach client like screen
+# detach client like screen, C-a C-d
 bind-key C-d detach-client
 
-# enhance copy mode to use more vim like keys for copying
-bind-key -t vi-copy 'v' begin-selection
-bind-key -t vi-copy 'y' copy-selection
-
 
 ###################################
 # Window/Pane/Session Manipulation
@@ -56,7 +59,7 @@ bind-key -n M-0 select-window -t 10
 
 # Window Creation/Destruction
 bind-key C-c new-window
-# TODO a better shortcut than `prefix+,` for renaming windows, like prefix+A
+# Remember `prefix+,` for renaming windows
 
 # Pane Movement
 bind-key h select-pane -L
@@ -76,7 +79,7 @@ bind-key s set -w synchronize-panes
 # Session Switching/Destruction
 bind-key C-s choose-session
 bind-key X kill-session
-# TODO a better shortcut than `prefix+$` for renaming sessions
+# Remember `prefix+$` for renaming sessions
 
 
 ########################
@@ -85,7 +88,6 @@ bind-key X kill-session
 
 # Use solarized colour palette
 source ~/dotfiles/tmux/tmux-colors-solarized/tmuxcolors-256.conf
-# set-option -g default-terminal "screen-256color"
 
 # tmux-powerline setup
 set-option -g status on

+ 28 - 0
tmux/tmuxinator/delivery.yml

@@ -0,0 +1,28 @@
+# ~/.tmuxinator/delivery.yml
+# ACER OARS Delivery Component Development Environment
+
+project_name: DELIVERY
+project_root: /jails/alcatraz/usr/local/www/delivery/
+tabs:
+  - home:
+      layout: even-horizontal
+      panes:
+        - gs
+        - deliverylog
+  - controllers & models:
+      layout: even-horizontal
+      panes:
+        - cd controllers && vim
+        - cd models && vim
+  - views:
+      layout: main-vertical
+      panes:
+        - cd views && vim
+        - cd views/elements && vim
+  - webroot:
+      layout: main-vertical
+      panes:
+        - cd webroot/js && vim
+        - cd webroot/css && vim
+  - routes: vim config/routes.php
+  - db: mongo

+ 12 - 0
tmux/tmuxinator/dev.yml

@@ -0,0 +1,12 @@
+# ~/.tmuxinator/dev.yml
+# you can make as many tabs as you wish...
+
+project_name: Tmuxinator
+project_root: ~/
+tabs:
+  - editor:
+      layout: main-vertical
+      panes:
+        - vim
+        - 
+        - top

+ 7 - 7
tmux/tmuxinator/schools.yml

@@ -1,16 +1,16 @@
 # ~/.tmuxinator/schools.yml
-# you can make as many tabs as you wish...
+# ACER OARS Schools Component Development Environment
 
-project_name: OARS Schools Component
+project_name: SCHOOLS
 project_root: /jails/alcatraz/usr/local/www/schools/
 tabs:
   - home:
-      layout: main-vertical
+      layout: even-horizontal
       panes:
-        - vim
-        - schools-log
-  - ctrlers_models:
-      layout: main-vertical
+        - gs
+        - schoolslog
+  - controllers & models:
+      layout: even-horizontal
       panes:
         - cd controllers && vim
         - cd models && vim

+ 5 - 0
zsh/omz-custom/tmux.zsh

@@ -0,0 +1,5 @@
+# tmux + vim solarised colours are strange:
+# https://github.com/altercation/solarized/issues/159
+# We need to force a TERM type for tmux
+# Ensure that the terminal emulator also reports TERM as 'screen-256color'
+alias tmux='TERM=screen-256color tmux'

+ 0 - 1
zsh/omz-custom/tmuxinator.zsh

@@ -1 +0,0 @@
-[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator