alxyzc
alxyzc

Reputation: 1051

What does 'cs' command do in vim and why is it that I can't map it to do other things?

I have the ConqueTerm plugin installed in my vim so that I can run bash commands without leaving my editing environment. It's cool when you can run Python scripts while seeing you code within the same screen.

I wanted to be more convenient to toggle ConqueTerm, so I added these two lines in my .vimrc

" quick access to ConqueTerm
nnoremap cv :ConqueTermVSplit bash<CR>
nnoremap cs :ConqueTermSplit bash<CR>

I have experimented these two commands before so that I can be sure I won't overwrite existing commands. 'cv' does absolutely nothing since after I typed these two characters in normal mode, they appear in the bottom-right corner of my vim window, still listening for my next stroke. But 'cs' is a different story, since the letters don't appear where 'cv' would, and my cursor would move to the status area, where we run commands such as ':wqa!', only I can't do anything there. Whatever key I press I go back to the editing area. And after I edited my .vimrc, my 'cv' works like a charm whereas my 'cs' still does the same thing I don't understand.

So, as the title says, what exactly does 'cs' do, and why I failed to map it to other command? Thanks!

Upvotes: 4

Views: 3675

Answers (2)

swpd
swpd

Reputation: 1151

use :verbose map cs to print out what cs is binding to.

Upvotes: 2

mike3996
mike3996

Reputation: 17497

You can issue :map cs to see what it maps to.

cs is not mapped by default in Vim, but I have a hunch you have installed the plugin called surround. That reserves normal mode bindings cs, ds and a couple others. Check the link for behaviour.

Upvotes: 4

Related Questions