Ctrl + S is not working as a horizontal split in VIM when using CommandT

随声附和 提交于 2019-12-19 05:23:19

问题


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


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/8616843/ctrl-s-is-not-working-as-a-horizontal-split-in-vim-when-using-commandt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!