shell - How to quickly switch command mode in terminal development mode?
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 16:42:36
0
5
748

For example, if you are developing with vim, you suddenly want to execute some shell commands, such as viewing processes, starting services, etc. Is there any way to do this in the current window without opening a new window?

过去多啦不再A梦
过去多啦不再A梦

reply all(5)
我想大声告诉你

That’s it
:!ls

伊谢尔伦

In fact, you can also use Ctrl+Z. fg recovery.

習慣沉默

There is a vim plug-in called conque that allows you to use the console in the buffer

Ty80

Vim configuration

"快速执行脚本,可以添加更多脚本类型
function! RunScript()
    if &ft == "sh"
        :w|!bash %
    elseif &ft == "python"
	:w|!python %
    elseif &ft == "php"
	:w|!php %
    else 
	echo "Unsupport script type: " .&ft. ",please add below line to RunScript()"
	echo "\telseif &ft == ".&ft
	echo "\t:w|run_command % \"Please replace run_command as your own need"
    endif
endfunction
"普通模式下执行F2键快速执行脚本
nmap <F2> :call RunScript()<CR>`
滿天的星座

I think the most convenient way is to use GNU screen

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template