I tried a Vim without frills, and it taught me I've been living in luxury

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

I tried a Vim without frills, and it taught me I've been living in luxury

Tony Mechelynck
Just to see what it meant, I tried a Small Vim (instead of my usual
Big) with Motif GUI (instead of my usual GTK2), and it taught me I've
been living in luxury. Here are some highlights of what what I found
out (for anyone who might be interested):

- No expression evaluation, therefore both "if" and "else" branches of
every :if statement become comments. This make some things very hard
to customize in the vimrc. It was to be expected, but I hadn't
realized how hard. For instance the usual ":if has(...) ... elseif
has(...)" etc. construct to select the right operand for the "set
guifont" option becomes meaningless.
- No syntax highlighting. For instance the help becomes a drab dark
grey on light grey everywhere without the usual purple tags, green
links, etc.: yes it makes a difference. :colorscheme with no argument
answers "unknown", with an argument it gives an error during attempted
execution of the colorscheme script.
- The 'guifont' format is the old "other-X11" format, like GTK1 used
to have. You know (or maybe you don't), stuff like

    :set guifont=-*-courier-medium-r-normal-*-10-*-*-*-m-*-*

":set guifont=*" does pop up a menu, with surprizingly few choices,
and most of them give, when I click OK, an error popup saying I
selected an invalid font. Running "xlsfont" in a shell shows why: most
supposedly monospaced fonts are actually scalable fonts, whose only
size is 0-0-0-0. Setting that (or replacing all sizes by *) for such a
font is possible in Motif, but it gives only one size which for me is
much too big. The only monospace fonts installed here (on my openSUSE
15.0 system) which come in more than one preset size are Adobe Courier
and B&H Lucida Typewriter (which can be set by starting the 'guifont'
setting with -*-courier- or -*-lucidatypewriter- respectively).

It _is_ possible to write a vimrc so that a specific part is executed
only by builds with -eval, namely, write first the part for +eval
builds, as follows:

" anything here or above (with no :if statements)
" is for both +eval and -eval builds.
" It has to be craftily written to avoid syntax errors
" without the possibility to use :if has() or :if exists()
if 1
   ...
   " this is for +eval builds only
   ...
   finish
endif
" anything here or below will be executed only by -eval builds

If expression evaluation is not compiled-in, the whole if statement
(even "if 1") becomes a comment, therefore -eval builds don't see the
:finish statement inside that "comment" and they start merrily
executing after the outermost :endif.

So it is possible. Maybe someday I'll add something like that at the
beginning and end of my vimrc.

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: I tried a Vim without frills, and it taught me I've been living in luxury

Tim Chase
On 2018-08-21 03:58, Tony Mechelynck wrote:
> Just to see what it meant, I tried a Small Vim (instead of my usual
> Big) with Motif GUI (instead of my usual GTK2), and it taught me
> I've been living in luxury.

Indeed, I often work on FreeBSD & OpenBSD boxes where nvi is the
default vi instead of vim.  I find myself missing a couple things
like text objects, folding, multiple windows, and expression
evaluation (whether as a register or as a sub-replace-special) the
most.  Syntax highlighting can be nice, but I can get along without
it.

-tim




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: I tried a Vim without frills, and it taught me I've been living in luxury

Tony Mechelynck
On Tue, Aug 21, 2018 at 4:36 PM, Tim Chase <[hidden email]> wrote:
[...]
> Indeed, I often work on FreeBSD & OpenBSD boxes where nvi is the
> default vi instead of vim.  I find myself missing a couple things
> like text objects, folding, multiple windows, and expression
> evaluation (whether as a register or as a sub-replace-special) the
> most.  Syntax highlighting can be nice, but I can get along without
> it.

IIUC, expression evaluation (and the variables, functions, and
conditional branches and loops that go with it) is the one feature
which makes Vim script language Turing-complete, and that makes a hell
of a huge difference when writing one's vimrc. Other features are
great to have too, of course.

Oh, sure I could get along without syntax highlighting, but given the
choice I would take it. Not only when reading the help as I already
mentioned, but when writing HTML i've oftentimes got my attention
alerted by "weird" highlighting to some typo I'd made.

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.