How to use multiple commands
Closed this issue · 2 comments
I want to combine this command to start an ipython session:
nnoremap <silent> <leader>i :vert :1T pipenv shell<CR><bar>:1T python -c 'import subprocess; subprocess.call("ipython")'<CR><bar>:1Tclear<CR>
I guess the commands would work one another, but it seems that the second command is too fast and fails. How to execute this combinend command? An example at Texec would help me. I've checked the source code at Texec and found that the arguments are splited by ' '. But for some reason the lines on 'pipenv shell' gets splited (@space) before executed.
This command works fine except the missing syntax highlighting within ipython:
nnoremap <silent> <leader>i :vert :1T pipenv shell ipython<CR><bar>:Tclear<CR>
Unfortunately, :T
doesn't support the <bar>
operator. Currently, the easiest way to do it is creating a function for that, something like:
function Foo()
vert 1T pipenv shell
1T python -c 'import subprocess; subprocess.call("ipython")
1Tclear
endfunction
nnoremap <silent> <leader>i :call Foo()<cr>
Thank you very much!