0

Struggling to initiate another ConEmu Tab from Vim

My procedure was:

  1. Vim is started from ConEmu
  2. Issue a command from Vim to open new tab and start ipdb.

My idea was:

:silent !ConEmu.exe /cmd {Something here to initiate python -m ipdb %?} -new_console:s

But no success.

With this command:

:silent !ConEmu.exe /cmd -new_console:s

Another Tab is open with following message -
ConEmuC: Root process was alive less that 10 sec, ExitCode=1

2 Answers 2

0

It's enough to do simply

:silent !start python -m ipdb

Also read :h :!start

Sign up to request clarification or add additional context in comments.

Comments

0

Well, that was not exactly what I asked for (although, it was not clearly stated in my question) - but it helped. It is opening layered window and I wanted to have side by side with my vim. But, hurray for me also, I managed with your hint to make it at last:

:silent !start cmd.exe /c -new_console:s python -m ipdb %

This command is opening new tab side by side with vim

Here is what I did in _vimrc:

"python with virtualenv support                                                                                        
let pipenv_venv_path = system('pipenv --venv')                                                                         
" The above system() call produces a non zero exit code whenever                                                       
" a proper virtual environment has not been found.                                                                     
if shell_error == 0                                                                                                    
  let venv_path = substitute(pipenv_venv_path, '\n', '', '')                                                           
  let py_binary = venv_path . '/Scripts/python.exe'                                                                    
else                                                                                                                   
  let py_binary = 'python.exe'                                                                                         
endif                                                                                                                  

"map F10 to execute ipdb in separate split Tab in ConEmu:                                                              
nnoremap <silent> <expr> <F10> '<ESC>:w!<CR>:!start cmd.exe /c -new_console:s ' . expand(py_binary)  . ' -m ipdb %<CR>'

Thanks for your help!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.