Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim shell key mapping to execute shell commands

i am using vimshell to execute commands inside vim

nnoremap <leader>vs :VimShellPop<CR>

with this key mapping i can open vim shell and execute commands like 'bundle install' and then type exit to exit VimShellPop window but i want set a key mapping

nnoremap <leader>bi :

to open up vimshellpop execute the bundle install command and exit once i get completed..is it possible in vimshell?

like image 769
Rajanand02 Avatar asked Dec 28 '13 20:12

Rajanand02


1 Answers

Having an interactive shell in Vim is one of Vim's stated non-goals (cp. :help design-not), so the plugin has to jump through several hoops to make this possible. Those hacks are causing these problems (of defining a proper mapping, as evidenced by the attempts in the question's comments); lack of automation (like through mappings) is a limitation of this approach.

You may contact vimshell's author (via email or GitHub issue); he's usually very open and responsive! He's in the best position to make such mapping work.

like image 164
Ingo Karkat Avatar answered Oct 18 '22 14:10

Ingo Karkat