gvim or vim in console...

113 views
Skip to first unread message

Kevin Tough

unread,
Sep 11, 2011, 12:39:23 AM9/11/11
to v...@vim.org
I am just starting to learn vim. I use Fedora and would like to know
whether most programmers use vim from the console or do they/you use
gvim. I have read that using one instance of vim is the best usage.

ViEmu: would any of the experienced vim users be able to comment on the
completeness of the "ViEmu" software and its compatibility/stability
when used with Visual Studio.

Namaste,

Kevin Tough

Andy Spencer

unread,
Sep 11, 2011, 4:09:39 AM9/11/11
to vim...@googlegroups.com, v...@vim.org
On 2011-09-11, Kevin Tough wrote:
> I use Fedora and would like to know whether most programmers use vim
> from the console or do they/you use gvim.

It probably doesn't matter too much which you use, but your question got
me thinking, perhaps a little too hard, on why I use one over the other
:)

On Linux, I use the terminal version of vim. When I'm programming I
usually work from the command line (using git, running make, etc) so
it's more convenient to just have it in the same window and to be able
to use ctrl-z/fg. Terminal vim also seems to integrate better with other
programs. For instance, I use it to write commit messages, and to reply
to emails from mutt. It also works over ssh and in screen. Terminal vim
runs faster on my older computer too (faster font rendering or
something).


> I have read that using one instance of vim is the best usage.

I use multiple instances of vim, usually because I have multiple command
prompts open. With a good window manager, it's easy to switch back and
forth between them.


On the other hand, when I have to use a certain other operating system,
I tend to use a single instance of gvim.exe with many more tabs and
split windows and more plugins such as NERD tree/taglist. Mostly to make
up for all the things that the actual operating system doesn't handle
very well..

Spiros Bousbouras

unread,
Sep 11, 2011, 4:35:22 AM9/11/11
to vim_use, Kevin Tough, v...@vim.org
On Sep 11, 5:39 am, Kevin Tough <ke...@toughlife.org> wrote:
> I am just starting to learn vim. I use Fedora and would like to know
> whether most programmers use vim from the console or do they/you use
> gvim.

I use both. I have a gvim window constantly open with several tabs
of files I edit often like bookmarks or the vim cheat sheet itself.
But if I want to do extensive editing on a file then I do it from
eterm because I like it much better when I have a background
pattern than a solid colour background. Without that I would always
use gvim since it recognises some key combinations which may be
problematic when using a terminal emulator.

> I have read that using one instance of vim is the best usage.

Cutting and pasting between different buffers using the vim
internal mechanisms rather than the X clipboard works better but
it's no big deal.

> ViEmu: would any of the experienced vim users be able to comment on the
> completeness of the "ViEmu" software and its compatibility/stability
> when used with Visual Studio.

I had no idea that such a thing existed. Cool.

Tim Chase

unread,
Sep 11, 2011, 7:35:41 AM9/11/11
to v...@vim.org, Kevin Tough
On 09/10/11 23:39, Kevin Tough wrote:
> would like to know whether most programmers use vim from the
> console or do they/you use gvim.

I use gvim on Win32 because the console there is such a horrid
experience. On Linux (Debian in this case), the majority of my
use is within a terminal (rxvt mostly; occasionally xterm) and
only rarely pulling up gvim. There are a few features that gvim
offers that aren't duplicated in console vim, but I turn most of
them off anyways (menu, tool-bars, etc) and only dip into gvim
mostly for helping to answer 'guifont' or "sign" issues on the
mailing-list.

> I have read that using one instance of vim is the best usage.

"best" is rather subjective. I tend to use vim-sessions like
some folks use vim's tab-pages in a single vim session...to
separate work-areas/projects. That's mostly because each one
tends to be in its own working directory and I came to Vim long
before tab-pages were available (I think my earliest usage was a
5.x series build). Many folks use vim's "remote" capabilities to
have one running session of vim and pipe all their work
into/out-of that one session. I just always found that more work
to set up, so I don't bother.

-tim


Tony Mechelynck

unread,
Sep 11, 2011, 8:37:43 AM9/11/11
to vim...@googlegroups.com, Kevin Tough
On 11/09/11 06:39, Kevin Tough wrote:
> I am just starting to learn vim. I use Fedora and would like to know
> whether most programmers use vim from the console or do they/you use
> gvim. I have read that using one instance of vim is the best usage.
[...]

The best usage is what suits _you_ best: there is no "one behaviour fits
all" best usage which should be common to everybody. Vim is all about
being able to get the same results by various different sequences of
keystrokes and/or mouse actions, and it isn't a rare event to see a
question on this list answered by several wildly different procedures
which all solve the problem put forth by the OP. In this case too, some
people prefer vim, others gvim, others both (and some prefer to use
neither but they aren't here). So my counsel would be to try them both
at first, and stay with whatever suits you best, which may be very
different from what suits me best, or from what suits Ben or John or
Dominique or Dr. Chip best, etc.

Like Spiros, I'm on Linux and I use both. I've even installed the
CSApprox plugin and set t_Co to 256 in the X terminals which support it
in order to have an almost identical look&feel in gvim and in
Vim-in-X-console. Of course, Vim-in-Linux-console in pure-text mode on
/dev/tty1 to /dev/tty6 has only 8 bg colours, 16 fg, so I cannot use 256
colours there; and also of course, 256 colours don't afford me the same
diversity as 16777216, but it's enough for my text-editing needs
(photography is a different cup of tea ;-) ), and as long as my colour
scheme remains within the 6^3 "safe" colours (defined by the red, green
and blue levels being each an integer multiple of 0x33), a 256-colour
xterm can display them exactly. On Linux we even enjoy the luxury
(unavailable on Windows) that a single executable can run in either GUI
mode or console mode depending on how it is invoked, so my gvim and my
vim-in-X-console behave in practically identical fashion.

I use one gvim instance as my general workhorse, with several tabs and a
huge lot of windows which don't change much (loaded by a session file I
wrote myself without the help of the :mksession command), and I use
vim-in-console when I'm already in a bash session, e.g. I use "view -"
(without the quotes) as my default pager in Mercurial.


Best regards,
Tony.
--
"Of _course_ it's the murder weapon. Who would frame someone with a
fake?"

Tim Gray

unread,
Sep 11, 2011, 8:39:05 PM9/11/11
to vim...@googlegroups.com
On Sep 11, 2011 at 06:39 AM +0200, Kevin Tough wrote:
>I am just starting to learn vim. I use Fedora and would like to know
>whether most programmers use vim from the console or do they/you use
>gvim. I have read that using one instance of vim is the best usage.

I usually use both. Terminal vim for email, cron, and spot editing
files. For more 'intense' editing, I usually use gvim (MacVim in my
case). MacVim works plays nicer with the rest of OS X than does Vim in
the terminal.

Ben Fritz

unread,
Sep 12, 2011, 10:58:46 AM9/12/11
to vim_use
Unlike those who have posted so far, I use gvim almost exclusively, on
both Windows (of various flavors) and Ubuntu.

For each *related* task, I use a single instance of Vim. For example,
if I'm working on documentation for a tool using HTML, a bugfix for
some software (including a diff between two previous versions), and
some script updates for automated code changes of some sort, I'll
probably have at least 3 and sometimes 4 Vim instances open. Each
instance probably has several files open in multiple tab pages, with
multiple windows in each tab page. Vim is flexible enough to allow me
to work however I want.

On Windows, I use file associations to automatically launch file I
double-click on in a new tab in Vim:
http://vim.wikia.com/wiki/Launch_files_in_new_tabs_under_Windows
http://vim.wikia.com/wiki/Windows_file_associations

I set have a few pre-defined names set up to align with my workflow,
opening .vim files in a VIMCONFIG Vim server, .html and .css files in
an HTMLEDIT server, and .c files in the normal GVIM server.

I don't have much reason behind my choice, I just like it better. I'm
not fond of being bound to a terminal window, I use it when I need to
but usually separate from Vim. I do know that the terminal version
causes all sorts of headaches; as evidenced by the mailing list, wiki,
and IRC channel. More key mappings are normally available in gvim, you
don't need to worry about how many colors your term has or how it
renders combinations of ctermfg and cterm, color schemes are usually
written for gvim, you can set the font quickly and easily, etc. As for
interacting with other tools which need to know when the editor is
done, there's the -f argument when launching Vim.

I'm also not fond of needing to suspend Vim with Ctrl-Z and bring it
back up whenever I want to do work with the terminal. I like having
them side-by-side. I could launch two terminal windows or start
looking into "screen" (I think anyway, never tried it), or I could
just launch the GUI and be done with it.

AK

unread,
Sep 12, 2011, 11:19:41 AM9/12/11
to vim...@googlegroups.com
On 09/12/2011 10:58 AM, Ben Fritz wrote:
>
> I don't have much reason behind my choice, I just like it better. I'm
> not fond of being bound to a terminal window, I use it when I need to
> but usually separate from Vim. I do know that the terminal version
> causes all sorts of headaches; as evidenced by the mailing list, wiki,
> and IRC channel. More key mappings are normally available in gvim, you
> don't need to worry about how many colors your term has or how it
> renders combinations of ctermfg and cterm, color schemes are usually
> written for gvim, you can set the font quickly and easily, etc. As for
> interacting with other tools which need to know when the editor is
> done, there's the -f argument when launching Vim.


I want to add that I also use Gvim 95+% of time for all the same
reasons. I almost always use it on linux. I never use vim tabs,
I should probably try them for a few weeks.

>
> I'm also not fond of needing to suspend Vim with Ctrl-Z and bring it
> back up whenever I want to do work with the terminal. I like having
> them side-by-side. I could launch two terminal windows or start
> looking into "screen" (I think anyway, never tried it), or I could
> just launch the GUI and be done with it.


+1 except that I sometimes use vim with ctrl-z when using remote ssh
session.

-ak

Gary Johnson

unread,
Sep 12, 2011, 1:01:09 PM9/12/11
to vim_use
On 2011-09-12, Ben Fritz wrote:

> I don't have much reason behind my choice, I just like it better. I'm
> not fond of being bound to a terminal window, I use it when I need to
> but usually separate from Vim. I do know that the terminal version
> causes all sorts of headaches; as evidenced by the mailing list, wiki,
> and IRC channel. More key mappings are normally available in gvim, you
> don't need to worry about how many colors your term has or how it
> renders combinations of ctermfg and cterm, color schemes are usually
> written for gvim, you can set the font quickly and easily, etc. As for
> interacting with other tools which need to know when the editor is
> done, there's the -f argument when launching Vim.
>
> I'm also not fond of needing to suspend Vim with Ctrl-Z and bring it
> back up whenever I want to do work with the terminal. I like having
> them side-by-side. I could launch two terminal windows or start
> looking into "screen" (I think anyway, never tried it), or I could
> just launch the GUI and be done with it.

Interesting. On any Unix system I use vim in a terminal almost
exclusively. I've never felt "bound" to a terminal. If I need the
shell for a quick task, I either do it with ":!" or ":sh". If I
need a terminal for longer term or at the same time as I'm editing,
I simply open a new terminal. I've never used Ctrl-Z.

The only headaches with using vim seem to be experienced by those
who are new to vim and/or to terminals and don't yet understand the
differences between the terminal interface and the GUI.

One of the main reasons I use vim rather than gvim is that I can
open any application from within vim and not worry about it
encountering a dumb terminal. Hence, when I need another vim
instance, I could launch gvim, or I could just open vim in a
terminal and be done with it.

I'm just sayin' that gvim is not universally better than vim, just
different.

Regards,
Gary

Jacky Liu

unread,
Sep 13, 2011, 4:36:26 AM9/13/11
to vim_use
I use console Vim at first, because as a beginner I (like most others)
knew the editor as "vim", I hadn't made my acquaitance with "gvim" or
"vim -g" until later. However when I was beginning to write some
extensions for my Vim, I feel like to have most as many options for
the colors being used, so I switched to Gvim, and stayed with it ever
since.

Gvim has amazing coloring features, it supports as many as 256*256*256
colors, the same as HTML. I was supprised the first time knowing that
Vim as a text editor actually supports the same as many colors as the
"markup language", but there she is, it's Vim. Should you find that
colors out there being too many to choose from, Gvim also has hundreds
of super-nice pre-defined color names such as "LightGoldenRod"
installed with it (in 'rgb.txt' normally found under $VIMRUNTIME), I
have a short piece of VimScript on my blog for a demonstration:

http://bluegene8210.is-programmer.com/posts/26169.html

(please ignore the ugly coloring inside the left pane, I didn't know
about the pre-defined colors which I could have used for that
extension)

Now I use custom coloring heavily for every Vim extension I wrote,
they would have been much less appealing with the 256-color console
Vim, that's why I insist on Gvim. I don't have 'term' variants for the
colorscheme and syntax files I use now.

However there have been efferts to make the coloring features
universal. Here's a python script written by a member of the vim_cn
group for converting Gvim colorscheme files such that they can be used
by console Vim, It did so by finding the closest approximation for
each color being used:


http://www.vim.org/scripts/script.php?script_id=2778


screenshots can be found here:


http://www.vimer.cn/2010/03/%E5%BC%BA%E7%83%88%E6%8E%A8%E8%8D%90-%E5%B0%86gui%E9%85%8D%E8%89%B2%E8%BD%AC%E5%8C%96%E4%B8%BA%E7%BB%88%E7%AB%AF%E9%85%8D%E8%89%B2%E7%9A%84vim%E6%8F%92%E4%BB%B6-gui2term-py.html


And there's another case: people complain about the <Alt> keys not
working with their Vim every now and then. I'm not feeling smarter
than those people, however I appreciate the time being saved dealing
with such kind of problems by using only Gvim.



Shay

unread,
Sep 14, 2011, 4:55:02 PM9/14/11
to v...@vim.org
Just switched. After 8-9 years or so, I went a little deeper into
colorschemes and plugins and found that vim was trashed outside of X. I'm
sure there's a way to call vim from the command line without plugins or
.vimrc, but I wouldn't remember it.

I use customized gvim in X now and bare vim outside. Supposedly 256 color
terminals cause problems with remote stuff, but I'm not an IT guy, so this
doesn't really affect me. Gvim has a few more key combinations, but not good
ones, IMO. Calling from another program? Also not important; I type most
emails on my Blackberry.

Six in one . . .


--
View this message in context: http://vim.1045645.n5.nabble.com/gvim-or-vim-in-console-tp4791050p4804415.html
Sent from the Vim - General mailing list archive at Nabble.com.

Tony Mechelynck

unread,
Sep 14, 2011, 6:59:57 PM9/14/11
to vim...@googlegroups.com, Shay
On 14/09/11 22:55, Shay wrote:
> Just switched. After 8-9 years or so, I went a little deeper into
> colorschemes and plugins and found that vim was trashed outside of X. I'm
> sure there's a way to call vim from the command line without plugins or
> .vimrc, but I wouldn't remember it.
[...]

without plugins and vimrc
vim -u NONE

with plugins, without vimrc
vim -u NORC

with vimrc, without plugins
vim --noplugin

see :help --noplugin

If you load Vim with no vimrc, you may want to add the -N command-line
switch in order to start in 'nocompatible' mode.

see :help -N


Best regards,
Tony.
--
Major Premise: Sixty men can do a piece of work sixty times as quickly
as one man.

Minor Premise: One man can dig a posthole in sixty seconds.

Conclusion: Sixty men can dig a posthole in one second.
-- Ambrose Bierce, "The Devil's Dictionary"

Reply all
Reply to author
Forward
0 new messages