title: Cannot get Control Arrow keys working in Vim through tmux
body: <p>I have been trying to figure this one out for two weeks with no luck.</p>
  
  <p>I am using Iterm2 on OSX, with tmux as the session manager. I have VIM setup with the following two bindings in the <code>.vimrc</code></p>
  
  <pre><code>"_____Easy change tab left and right____
   nnoremap &lt;C-Left&gt; :tabprevious&lt;CR&gt;
   nnoremap &lt;C-Right&gt; :tabnext&lt;CR&gt;
   nnoremap &lt;C-h&gt; :tabprevious&lt;CR&gt;
   nnoremap &lt;C-l&gt; :tabnext&lt;CR&gt;
  </code></pre>
  
  <p>Now the strange part is that the ctrl h and l shortcuts work perfectly while the left arrow says.</p>
  
  <p><code>E349: No identifier under cursor</code></p>
  
  <p>Which seems unrelated to what should be happening (It works perfectly outside of TMUX!), but checking my mappings using <code>:map</code> does not show any conflicting mappings. But I just cannot figure this out. Any help at all would be greatly appreciated. Below is my tux.conf file. Since this works perfectly outside of tmux I don't believe the vimrc should have anything to do with this.</p>
  
  <p>I have a feeling that its Iterm2 thats sending strange things to the terminal and tmux is misinterpreting them, but I have no idea how to fix it.</p>
  
  <p><strong>tmux.conf</strong></p>
  
  <pre><code>#set -g default-terminal "xterm-256color"
  set -sg escape-time 0
  
  # remap prefix from 'C-b' to 'C-a'
  unbind C-b
  set-option -g prefix C-a
  bind-key C-a send-prefix
  
  # split panes using | and -
  bind | split-window -h
  bind - split-window -v
  unbind '"'
  unbind %
  
  # reload config file (change file location to your the tmux.conf you want to use)
  bind r source-file ~/.tmux.conf
  
  # switch panes using Alt-arrow without prefix
  bind -n M-Left select-pane -L
  bind -n M-Right select-pane -R
  bind -n M-Up select-pane -U
  bind -n M-Down select-pane -D
  
  # Enable mouse mode (tmux 2.1 and above)
  set -g mouse on
  
  # don't rename windows automatically
  set-option -g allow-rename off
  
  # Use Alt-arrow keys without prefix key to switch panes
  bind -n M-S-Left previous-window
  bind -n M-S-Right next-window
  
  # Dont clear screen after other program is on
  set-window-option -g alternate-screen on
  #set-window-option -g xterm-keys on
  </code></pre>