12

I've been tweaking my ~/.vim quite a lot lately, and it seems that I broke something.

I'm using the CommandT plugin, which when the search is open allows for the following:

  • enter - open the file in current buffer
  • Ctrl + S - open the file in horizontal split window
  • Ctrl + V - open the file in vertical split window

The problem is, that Ctrl + S suddenly stopped working in terminal VIM, only Ctrl + V is working. At first I thought I broke something in my general config, but then I tried it in MacVim, and Ctrl + S works just fine.

I'm not aware of having set anything specific only to the terminal VIM.

Is there any way that I can tell, if a key is being rebound to something else and where is that happening?

btw, my ~/.vim is a fork of Janus with most stuff removed and changed, I'm keeping it mostly for the Rakefile for installing plugins. here's the repo

Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327

2 Answers2

24

I've found solution for this problem here: https://apple.stackexchange.com/a/34503

Just put in your .bashrc / .zshrc this line of code:

stty -ixon -ixoff
Community
  • 1
  • 1
sparrovv
  • 6,894
  • 2
  • 29
  • 34
1

You can list all current mappings by typing :map inside the command window.

You could also clear all maps using :mapclear and then map <C-S> again.

It could be that you vimrc contains alternate maps depending on the environment. Look for things like has("gui_running").

Finally when running MacVim gvimrc is sourced vs. vimrc when running vim in the terminal.

Depending on the differences in both of those, mappings and other features will change.

I noticed, that you are talking about Cmd key in the title, but about Ctrl in your description. The Cmd key does not work in terminal vim.

If you are talking about the Cmd key, consult my answer to a similar question.

Community
  • 1
  • 1
Thorsten Lorenz
  • 11,781
  • 8
  • 52
  • 62
  • The Cmd in title was just a typo. I tried using `:map`, but it doesn't even show the ``, which works. I also don't see any other mappings to either `` or ``. Isn't it possible that they're set somehow differently in the plugin itself? – Jakub Arnold Dec 24 '11 at 14:06