Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ctrl+S (horizontal split) not working with Command-T in vim

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

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

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

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

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.

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.

like image 568
flexd Avatar asked Nov 30 '12 15:11

flexd


1 Answers

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

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

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

like image 153
Ingo Karkat Avatar answered Nov 16 '22 01:11

Ingo Karkat