Use iTerm2 proprietary escape sequence for changing cursor shape per pane. Apps like vim or zsh should emit VTE compatible escape sequences for this to work.