LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-04-2017, 07:22 PM   #1
goofygoober
Member
 
Registered: Nov 2017
Posts: 37

Rep: Reputation: Disabled
Unhappy Vim editor suspending/background process


Hey there! I'm looking for a command to background my VIM sessions.
I know about CTRL+Z.

Doing this then typing jobs gets me [1]+ Stopped
Is this suspended or in the background? i'm assuming suspended.

Using bg %1 gives me stoud of:
[1]+ vim hw8 &
but after typing jobs I still get:
[1]+ Stopped


TLDR; How can I suspend and then place a vim session into the background?
 
Old 12-04-2017, 07:36 PM   #2
!j*
LQ Newbie
 
Registered: Nov 2017
Posts: 14

Rep: Reputation: Disabled
Vim editor suspending/background process

I think the reason is that VI is continuously reading your commands. So it doesn't make sense to put it in the background. I think it will just complain that it wants input. Better explanations will likely come along.
 
Old 12-06-2017, 03:30 AM   #3
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 521

Rep: Reputation: 245Reputation: 245Reputation: 245
Hi,

Normally, Ctrl+z will stop a job and bg %1 will put that job in the background.

Vim takes up a terminal/tab by default. Now, since vim is by default in the foreground, in this case Ctrl+z will stop it and automatically put it in the background in order to return control to the terminal to the user. So, in case of vim running in a terminal, Ctrl+z is analogous to Ctrl+z; bg %1.

Now, jobs will display all the tasks, running or stopped. That's why you get that output. Since vim is already in the background, you can bring it to the foreground by using fg %1, then put it in the background again using Ctrl+z.

I hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Useful Vim editor plugins for software developers - part 3: a.vim LXer Syndicated Linux News 0 10-20-2016 10:54 AM
suspending a process joemon83 Linux - Server 1 06-30-2010 03:35 AM
LXer: Personalize and Optimize Vim editor using Packtís new Vim 7.2 book LXer Syndicated Linux News 0 05-20-2010 10:20 PM
Editor comparison: vim VS vim-lite, Cleaning vim Ruler2112 *BSD 4 04-13-2009 04:26 PM
suspending a process kornelix Programming 7 05-14-2006 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration