Tmux Part 4: Vim Integration

I installed Vundle and then added

Bundle 'christoomey/vim-tmux-navigator'

to my ./vimrc file

I added the new bindings to my .tmux.conf file:

# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(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" "select-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"

but when I source the .tmux.conf file, I get this error:

/Users/acandael/.tmux.conf:8: invalid or unknown command: is_vim='echo "#{pane[0/0]│   1 set nocompatible              " be iMproved, required

/Users/acandael/.tmux.conf:9: invalid or unknown command: "(^|/)g?(view|n?vim?)(d’

how can I fix this?

greetings,

Anthony