Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7933587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:22:53+00:00 2026-06-03T21:22:53+00:00

I have found the :cwindow command to be very useful and I was wondering

  • 0

I have found the :cwindow command to be very useful and I was wondering if I could get similar functionality using the output of my compiled code. I’d the output of :!./a.out to appear in a "quickfix" style buffer.

I’ve also noticed that even after taking the standard steps to prevent the "Press Enter to continue" message, it still happens at least once on :make and :!./a.out – using :silent to suppress this causes my tmux to go completely blank. My current workaround involves a mapping with a lot of carriage returns, is there another way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:22:55+00:00Added an answer on June 3, 2026 at 9:22 pm

    I found this:

    " Shell ------------------------------------------------------------------- {{{
    
    function! s:ExecuteInShell(command) " {{{
        let command = join(map(split(a:command), 'expand(v:val)'))
        let winnr = bufwinnr('^' . command . '$')
        silent! execute  winnr < 0 ? 'botright vnew ' . fnameescape(command) : winnr . 'wincmd w'
        setlocal buftype=nowrite bufhidden=wipe nobuflisted noswapfile nowrap nonumber
        echo 'Execute ' . command . '...'
        silent! execute 'silent %!'. command
        silent! redraw
        silent! execute 'au BufUnload <buffer> execute bufwinnr(' . bufnr('#') . ') . ''wincmd w'''
        silent! execute 'nnoremap <silent> <buffer> <LocalLeader>r :call <SID>ExecuteInShell(''' . command . ''')<CR>:AnsiEsc<CR>'
        silent! execute 'nnoremap <silent> <buffer> q :q<CR>'
        silent! execute 'AnsiEsc'
        echo 'Shell command ' . command . ' executed.'
    endfunction " }}}
    command! -complete=shellcmd -nargs=+ Shell call s:ExecuteInShell(<q-args>)
    nnoremap <leader>! :Shell
    
    " }}}
    

    in steve losh’s .vimrc – see which I shamelessly copied.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found the following asp.net code to be very useful when serving files
have found fragments to be very useful in constructing dynamic html - like using
I have found the following command in AWK useful in Vim :'<,'>!awk '{ print
I have found MySQL's IF() function to be very useful in giving me an
I have found this code to watch for a CD to be inserted/ejected using
I have found this project on Codeplex. http://www.codeplex.com/ProjNET I need to integrate this code
I have found several post with similar problems, but none targeting my exact problem:
I have found similar questions here but none of them are answered. So please
I have found a few good replies to similar content so far, but never
I have found this code http://djangosnippets.org/snippets/2283/ but I think it doesn't work with manytomanyfields

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.