Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
created August 5, 2006 · complexity basic · author pulp · version n/a
function! s:Shell(...) let curline=line ('.') if curline < 6 let start=0 else let start=curline-5 endif let end=curline+15 execute 'silent !clear' execute 'silent !echo -e "\n...\n"' execute 'silent !sed ' . start . ',' . end . '\!d %' execute 'silent !echo -e "\n...\n"' execute 'shell' endfunction command! Shell call s:Shell()
Executing ":Shell" will start a new shell and display the last viewed text lines in the top of the new shell.
Useful if you read a 'README' file and you want to follow the install instruction ("./configurer, make etc).
With the displayed text you do not need to remember the commands.
This may be an alternative:
:nnoremap gsh :set t_te= t_ti=<CR>:sh<CR>:set t_te& t_ti&<CR>