Ctrl + S(水平拆分)在Vim中无法与Command-T配合使用 [英] Ctrl+S (horizontal split) not working with Command-T in vim

查看:68
本文介绍了Ctrl + S(水平拆分)在Vim中无法与Command-T配合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法进行水平分割. Ctrl + Enter不执行任何操作,Ctrl + S不执行任何操作.

I can't get the horizontal split to work. Ctrl+enter does nothing, Ctrl+S does nothing.

我已经对此进行了一些讨论,到目前为止,我发现的唯一解决方案与OSX有关.

I've been googeling this for a bit and the only solutions I've found so far are related to OSX.

在Arch Linux和Ubuntu上,都存在相同的问题(但配置也相同).

On both Arch Linux and Ubuntu, having same problem (but also the same config).

我没有使用Janus或类似的工具,只是一个非常基本的配置

I'm not using Janus or anything like it, just a very basic config

set t_Co=256
set tabstop=2
set expandtab
set shiftwidth=2
set fileencoding=utf-8
set encoding=utf-8
set termencoding=utf-8
set showcmd
filetype plugin indent on
"color molokai
syntax enable
autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e
set laststatus=2 " Always show the statusline

set backspace=indent,eol,start  " backspace through everything in insert mode

"" Searching
set hlsearch                    " highlight matches
set incsearch                   " incremental searching
set ignorecase                  " searches are case insensitive...
set smartcase                   " ... unless they contain at least one capital letter

call pathogen#infect()
colorscheme jellybeans
" use comma as <Leader> key instead of backslash
let mapleader=","

" Double <Leader> to switch between buffers
nnoremap <leader><leader> <c-^>
" double percentage sign in command mode is expanded
" to directory of current file - http://vimcasts.org/e/14
cnoremap %% <C-R>=expand('%:h').'/'<cr>

map <leader>f :CommandTFlush<cr>\|:CommandT<cr>
map <leader>F :CommandTFlush<cr>\|:CommandT %%<cr>

[~]$ ls .vim/bundle
rbenv:system command-t jellybeans.vim snipmate-snippets tlib_vim vim-addon-mw-utils vim-powerline vim-snipmate

[~]$ ls .vim/bundle
rbenv:system command-t jellybeans.vim snipmate-snippets tlib_vim vim-addon-mw-utils vim-powerline vim-snipmate

我希望有人能够对此有所了解,这真令人沮丧.

I was hoping someone would be able to shed some light on this, it's getting really frustrating.

不能完全确定出了什么问题,但偶尔会奏效,但现在还无法解决.

Not entirely sure whats wrong but it have work occasionally, but not at all right now.

按CTRL + S不会执行任何操作,shift + enter只会在当前缓冲区中正常打开它,而ctrl + enter只会跳到Command-T中的搜索结果列表.

Pressing CTRL+S does nothing, shift+enter just opens it normally in the current buffer and ctrl+enter just hops down the search results list in Command-T.

推荐答案

在大多数终端中,Vim无法区分 Enter 及其与 Ctrl Shift的组合,很不幸;这些仅适用于GVIM.

In most terminals, Vim cannot distinguish between Enter and its combinations with Ctrl or Shift, unfortunately; these only work in GVIM.

终端的流控制命令可能会干扰Ctrl-S和Ctrl-Q;可以使用

The terminal's flow control commands may interfere with Ctrl-S and Ctrl-Q; this can be fixed (in the terminal, not in Vim!) with

stty start undef stop undef

在〜/.bashrc,〜/.zshrc等中.

in ~/.bashrc, ~/.zshrc, etc.

这篇关于Ctrl + S(水平拆分)在Vim中无法与Command-T配合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆