A very naive question: any doc (book, web page, ...) to learn step by step how to custom configure vim?

35 views
Skip to first unread message

Jose Caballero

unread,
Aug 11, 2017, 11:27:09 AM8/11/17
to vim use
Hi,

first, I sincerely apologize for asking in this forum a question that
I believe is trivial for most members in the list.
However, I think you will understand why I am asking it here.


I am regular VIM user, even though I only know around 1% of the user's features.
But that is fine, since I know the other 99% exist, and how to find
documentation if needed.

What I don't seem to find is a documentation newbies-friendly to
custom configure vim.
I mean, how to modify vimrc, write my own plugins, where to put them,
how to call them, not to mess with standard behavior, and so on.

I know all the documentation is there. Both in google and builtin help
inside VIM.
However, I find it useful when you already know what you are looking
for. Not my case.
I am looking for a step-by-step tutorial, from zero, for those who
don't even know the key words to search in :help
Makes sense?


As said, I apologize if the question is too trivial for this forum, or
it has been posted before.
Other than that, thanks a lot in advance for any hint, or link, if possible :)
Jose

aro...@vex.net

unread,
Aug 11, 2017, 11:53:30 AM8/11/17
to vim...@googlegroups.com

>
> What I don't seem to find is a documentation newbies-friendly to
> custom configure vim.

http://shop.oreilly.com/product/9780596529833.do
http://shop.oreilly.com/product/110000687.do
https://www.ibm.com/developerworks/library/l-vim-script-1/index.html

Are good places to start.

"Conway vim" is a good search phrase. Just don't expect to view the world
in the same light afterwards. :-)*



John Passaro

unread,
Aug 11, 2017, 11:54:36 AM8/11/17
to vim...@googlegroups.com
This is a great question.

To my mind, the short answer is learn regular, unconfigured vim first. Use vimtutor (see :help vimtutor) to get started if you're really at zero and have no idea even what to search for with :help.

To go deeper and really set yourself up for powerful configuration, it helps to go a little deeper than vimtutor. I learned a lot by reading Practical Vim (by Drew Neil of vimcasts.org) on the train on my way to work. Before that, I was more or less just copying stuff without really understanding what it did. The book was an amazing combination of depth and accessibility; I gained a huge amount of knowledge without having to work all that hard. (The real understanding comes in the practice of course, but the book does a lot to set you up for that.)

A quick perusal of Mr. Neil's site yields at least one essay about the pros and cons of customizing. Cutting to the end you'll find Mr. Neil seems to agree you should learn vim itself:

In his classic essay, Seven habits of effective editing, Bram Moolenaar encourages us to invest time in sharpening the saw. Building your vimrc file and installing plugins are both ways of doing that, but it’s vital that you understand Vim’s baseline functionality before you build on top of it. First, learn to use the saw. Then sharpen it.
 
I’ve seen people customizing Vim in ways that blunt the saw. I’ve even seen people sharpening the wrong edge!

There’s more to Vim’s core functionality than you may realize. In my book, Practical Vim, I demonstrate all of the essential features of stock Vim. Learn to use vanilla Vim well, then you’ll be in a position to decide which plugins are a help, and which are a hindrance.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Grant Taylor

unread,
Aug 11, 2017, 1:16:47 PM8/11/17
to vim_use
On 08/11/2017 09:53 AM, John Passaro wrote:
> To my mind, the short answer is learn regular, unconfigured vim first.

I'd suggest not modifying how Vim behaves / does thing while getting started with Vim.

However that does not extend to unconfigured Vim. I say this because things like line numbers (:set number), search highlighting (:set hlsearch), and (syntax highlighting (:syntax on) do not modify Vim's behavior, but (I think) they do make Vim a bit more friendly.

IMHO there's a subtle but distinct difference.

> To go deeper and really set yourself up for powerful configuration, it
> helps to go a little deeper than vimtutor. I learned a lot by reading

> Practical Vim (by Drew Neil of vimcasts.org <http://vimcasts.org>)

I also strongly recommend Practical Vim & Vimcasts.

> Before that, I was more or less just copying stuff without
> really understanding what it did. The book was an amazing combination of
> depth and accessibility; I gained a huge amount of knowledge without
> having to work all that hard. (The real understanding comes in the
> practice of course, but the book does a lot to set you up for that.)

I have also found some people on Twitter that seem to have some impressive VimFu. Here are some people I recommend, in alphabetical order:

@ed1conf - Vim can do much of what ed does, and ex mode is quite similar.
@gumnos - WONDERFUL resource. Tim is happy to explain the odd things that he does in Vim.
@MasteringVim - Lots of good information and is working on a book.
@nixcraft - LOTS of good unix things, including Vim info.
@VimLinks - Frequently has interesting Vim specific things.

I also frequently tweet, as @DrScriptt, things about Vim, or comment on other peoples tweets, frequently asking questions. @gumnos tends to have wonderful answers to explain things.

I played, enjoyed, and learned from VIM Adventures (https://vim-adventures.com/). (I never beat the boss at the end.) - I'm tempted to re-up my subscription and play again. - There are some free levels.

I would also recommend that you learn some about regular expressions. - Vim is a little bit different than other RE engines, mainly in escaping some special control characters. - I find that RE's are EXTREMELY powerful and probably what brought me into Vim.

Sorry for devolving from Vim customization into general Vim. - But then again, you need to learn enough base Vim to decide what you want to customize.

Finally, strive to understand what things do, and how they do it.

@gumnos and I had a discussion about the following yesterday:

:let a=''|g/pattern/y A

See https://twitter.com/gumnos/status/846310953494986752 for more details.

> A quick perusal of Mr. Neil's site yields at least one essay about the
> pros and cons of customizing. Cutting to the end you'll find Mr. Neil
> seems to agree you should learn vim itself:

Agreed. Learn the basics of Vim, get annoyed by it, find a way to change what annoys you, put those changes in your .vimrc as you grow and learn more Vim.

--
Grant. . . .
unix || die

Jose Caballero

unread,
Aug 11, 2017, 2:36:07 PM8/11/17
to vim use
I reply to myself so I don't pick any particular answer.
Thanks a lot for your comments. I will have a look to those books. I
have SAFARI account, so I can check them for free :)
As I said, I am not that much concerned about learning editing
features, or things I can do "with my fingers" when editing a file. I
know what I don't know, and how to find it.
I am looking for a way to learn how to improve the "behind the scenes"
part, so to speak.
But I think I got good comments on that from you already. Thanks a lot !!

Jose

Nikolay Aleksandrovich Pavlov

unread,
Aug 11, 2017, 3:27:56 PM8/11/17
to vim...@googlegroups.com
I would say that [Learn Vimscript the Hard Way][lvhw] looks like
something more in line with your request.

[lvhw]: http://learnvimscriptthehardway.stevelosh.com/

>
> Jose
>
> --
> --
> 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 vim_use+u...@googlegroups.com.

Jose Caballero

unread,
Aug 11, 2017, 3:30:33 PM8/11/17
to vim use
2017-08-11 15:27 GMT-04:00 Nikolay Aleksandrovich Pavlov <zyx...@gmail.com>:
> 2017-08-11 21:36 GMT+03:00 Jose Caballero <jcaball...@gmail.com>:
>> I reply to myself so I don't pick any particular answer.
>> Thanks a lot for your comments. I will have a look to those books. I
>> have SAFARI account, so I can check them for free :)
>> As I said, I am not that much concerned about learning editing
>> features, or things I can do "with my fingers" when editing a file. I
>> know what I don't know, and how to find it.
>> I am looking for a way to learn how to improve the "behind the scenes"
>> part, so to speak.
>> But I think I got good comments on that from you already. Thanks a lot !!
>
> I would say that [Learn Vimscript the Hard Way][lvhw] looks like
> something more in line with your request.
>
> [lvhw]: http://learnvimscriptthehardway.stevelosh.com/
>
>>


From the description (*), I would say yes, that seems to be exactly
what I am looking for.
Thanks!!!

----------------------------------------
(*)
Learn Vimscript the Hard Way is a book for users of the Vim editor who
want to learn how to customize Vim.

It is not a guide to using Vim. Before reading this book you should be
comfortable editing text in Vim and know what terms like "buffer",
"window" and "insert mode" mean.

The book is divided roughly into three sections:

The first covers basic Vim commands that you can use in your ~/.vimrc
file to customize Vim quickly and easily.
The second looks more deeply at Vimscript as a programming language,
covering things like variables, comparisons, and functions.
The third walks through the creation of a sample plugin intended for
distribution to other Vim users.
----------------------------------------

Tim Chase

unread,
Aug 11, 2017, 7:40:34 PM8/11/17
to vim...@googlegroups.com
On 2017-08-11 10:16, Grant Taylor wrote:
> I'd suggest not modifying how Vim behaves / does thing while
> getting started with Vim.
>
> However that does not extend to unconfigured Vim. I say this
> because things like line numbers (:set number), search highlighting
> (:set hlsearch), and (syntax highlighting (:syntax on) do not
> modify Vim's behavior, but (I think) they do make Vim a bit more
> friendly.
>
> IMHO there's a subtle but distinct difference.

Agreed that those are more presentational tweaks rather than
behavioral tweaks (though I tend to only manually enable line-numbers
on the rare occasions I want it, and incsearch/hlsearch tend to annoy
me when unbidden manually).

But I too count myself firmly in the camp of "learn raw vim first, and
only then when you need extra tweaks to improve your workflow, reach
for a plugin/script."

> I have also found some people on Twitter that seem to have some
> impressive VimFu. Here are some people I recommend, in
> alphabetical order:
>
> @ed1conf - Vim can do much of what ed does, and ex mode is quite
> similar.
>
> @gumnos - WONDERFUL resource. Tim is happy to explain the
> odd things that he does in Vim.

And I try to provide similar explanations here too, though without
the 140-character constraints of Twitter, I tend to run a bit verbose
in my replies here on vim_list (as a quick search for my replies in
the list archives will corroborate).

Glad to have you pop up here on the mailing-list.

-tim



Lifepillar

unread,
Aug 12, 2017, 12:56:33 AM8/12/17
to vim...@googlegroups.com
On 11/08/2017 22:30, Jose Caballero wrote:

> From the description (*), I would say yes, that seems to be exactly
> what I am looking for.

You may find this guide interesting: https://github.com/mhinz/vim-galore

Life.

Reply all
Reply to author
Forward
0 new messages