Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 09-09-2007, 06:01 PM   #1
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Rep: Reputation: 17
vim :gui trick and undo-trick

So on a quiet Sunday evening whilst learning some new vim features, whilst editing a file in vi, you can type in


So that the file will be closed and opened up in gvim, which only works if your using X.

Is there a reverse vim command to close gvim and re-open the file in a terminal ? I have searched the documentation and so far cannot find it anywhere.

Also I don't understand why Google does'nt search for ':gui' and instead searched for 'gui' which slows down my searching for solutions, even if using the exact option :-)

Old 09-10-2007, 03:00 PM   #2
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (
Posts: 1,900

Rep: Reputation: 69
I think you can write it. But you will need to launch a new xterm with parameters like '-e' to launch vim. ':function' lets you define a function; see also ':command'.

Google ignores ':' because it has no database index on it.
Old 09-10-2007, 03:13 PM   #3
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Google doesn't index punctuation, which is very annoying.
Old 09-10-2007, 03:45 PM   #4
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Original Poster
Rep: Reputation: 17
I think your right. I can go forwards, and load up the file into gvim but not the reverse. I can't ask gvim to close the file and load it up in vim on a terminal.

Thanks all anyway.


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
how to do ssh trick? unknownmosquito Linux - Networking 5 05-14-2007 01:45 AM
Trick Yum volvogga Linux - Newbie 4 08-18-2005 06:53 PM
!(last command) trick? belorion Linux - General 5 07-03-2005 02:01 PM
2 problem trick felipe_ced Linux - Newbie 1 08-20-2003 11:57 AM
How to trick a router Citizen Bleys Linux - Networking 4 01-31-2002 02:09 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:18 AM.

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