LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-10-2002, 04:55 PM   #1
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
term in Vi


I know Emacs can split a window and have a terminal in it. Is this possible in Vi? I know i can split a window with :split or :vsplit but can i run a terminal inside it?
Thanks
-NSKL
 
Old 11-30-2002, 08:54 AM   #2
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
I don't think what you are asking for is exactly possible, here's a
quick reference for emacs and vi commands, not complete by any means:
http://qref.sourceforge.net/Debian/r...h-edit.en.html
 
Old 11-30-2002, 12:11 PM   #3
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Why would you want something like that? I don't see the benefit other than you can type on both areas at the same time without switching tty's.

Cool
 
Old 12-01-2002, 09:31 PM   #4
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
it's nice to be able to edit some code, and then try to compile/run it to see the errors on the same screen so that you can fix it.

in normal mode, you can use :!<command> and it will run <command> inside vi(m)... I don't know if that's exactly what you want though.

EDIT:

or check out the vi mode in zsh.... really cool stuff
 
Old 12-01-2002, 09:36 PM   #5
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Ok, if you are using a GUI why not just opening two terminals??? Better... why not using emacs?? eheheh
 
Old 12-01-2002, 11:37 PM   #6
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
*Don flame retardant suit *
1) Because emacs sucks.
2) Becuase not everyone LIKES to use a window manager.
*duck and cover*

Seriously, though, if you had to use a window manager, I would suggest
using one that allows you to switch between windows with the keyboard
(Alt-Tab, on my setup of WindowMaker), since this would be almost as
fast as using a split vi window. . .

When I'm programming, I usually use the console, and just hop between
virtual consoles. It's not elegant, and sometimes it really sucks when
you need to read output while typing input, but it sure is better than
using a window manager. If I need to use a window manager (GTK
stuff, for example), then I use two xterms and swap between them
with Alt-Tab.
 
Old 12-02-2002, 12:03 AM   #7
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
I think that the whole point of the Window Managers (like gnome or KDE) is to replace Windows (M$). Perhaps you don't like it but it is a very good solution. Personally I use consoles almos all the time, but still in a graphical environment and switch betwen them with shift ->/<-
 
Old 12-02-2002, 12:10 AM   #8
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
the only thing annoying about that is if you have a bunch of x-terms (or anythiong for that matter) open, then you have to go through all of them before you get back to the one you want.
 
Old 12-02-2002, 12:21 AM   #9
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
yeah... but also is alt+tab and I think it is better this way (I mean, with a GUI)... if not you could always use different virutal terminals and switch with ctr + alt + Fn
 
Old 12-02-2002, 07:27 AM   #10
0x0001
Member
 
Registered: Sep 2002
Distribution: Slackware 8.1
Posts: 84

Rep: Reputation: 15
Don't know if the following is possible in vi (since i use vim), but the vim manual doesn't states that it is not possible in vi. So i'm talking about what vim can do here, you can try it out in vi, and be happy if it works, or you can switch to vim if it doesn't:

:make runs a makefile and keeps the erroroutput, vim provides commands (:cn :cp) to jump between the positions and files where the errors occured. :cl allows you to list all errors.

You might also want to look how ctags work. IIRC vi supports it. This allows you to jump between the declaration and definition of function, classes, etc.
These are very helpfull when coding and debuging.
 
Old 12-02-2002, 08:55 AM   #11
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
Quote:
Originally posted by adam_boz
the only thing annoying about that is if you have a bunch of x-terms (or anythiong for that matter) open, then you have to go through all of them before you get back to the one you want.
That's the beauty of a window manager like OpenWindows or
WindowMaker (I'd be surprised if KDE and Gnome don't also support this),
you can easily set up a number of virtual desktops and switch between
them w/o the mouse. That way, you can have your two xterms side by
side on one virtual desktop, and all the other junk that comes with WMs
on other VDs. . .
Another nice thing about X is that you can set it up to be able to hop out to
the console w/o killing your X session, so you still have those virtual
consoles available to you (except 1, usually), which is really what I do
when I'm programming or screwing with the system.

vi does support tags.
 
Old 12-02-2002, 09:40 AM   #12
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
Back to original, I've been researching the question in some extent, it is a very intersting idea to have because wherever I edit some "written for everybody" scripts I have to hunt down some libs and stuff, so I always end up with
:!shell_command
inside vi. Well let me dig a little farther maybe I'll come up with something
 
Old 12-02-2002, 09:51 AM   #13
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
Also take a look at Vi like Emacs project (VILE) http://sal.kachinatech.com/G/5/VILE.html
 
Old 12-02-2002, 10:23 AM   #14
nonamenobody
Member
 
Registered: Oct 2002
Posts: 138

Rep: Reputation: 22
why not just background vi (ctrl-z) and stick it back in the forground when you want it again (fg)?
 
Old 12-02-2002, 12:26 PM   #15
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
AFAIK X sessions use the 7th virtual line: tty7 = ctr + alt + F7

And if you use the root command #init n (where n is the init level you want) for starting the XFS and window manager then you can still use that tty for other things. And you will start all the necesary services you want (and even stop the ones you don't want)
 
  


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
Term colors virid Linux - General 9 01-02-2005 04:22 PM
Power term Katsukhan Linux - Newbie 0 07-09-2004 04:28 PM
What this term stands for? bngrhl Linux - Newbie 4 05-06-2004 12:06 AM
remux help(term?) shanenin Linux - Software 0 04-02-2004 07:02 PM
x term Gordon Linux - General 1 03-26-2003 11:44 PM


All times are GMT -5. The time now is 11:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration