Tuesday, May 20, 2014

Re: new vim user

Op Tue, 20 May 2014 10:13:47 +0200 schreef BPJ <bpj@melroch.se>:

> I also used to have problems with those, until I realized that
> they have or can be thought to have mnemonic names, which may not
> be obvious if English isn't your native language:
>
> Key Mnemonic
>
> |b| |b|eginning of this word
> |B| |B|eginning of a bigger chunk -- B is a big b!
> |e| |e|nd of this word
> |E| |E|nd of a bigger chunk
> |w| |w|hitespace after word included
> |W| |W|hitespace after bigger chunk included

Thanks a bunch! Can you imagine I never knew about the "e" after all those
years? So basically I was coupling two things together (b and w) that were
not each others opposites. I believe this is the answer I was seeking.

> I would also encourage everyone to write their own cheat sheet
> with the things they use/need often, and revising it, removing
> things from the cheat sheet as you memorize them, and adding
> new things which seem useful as you discover them in the help
> or online.

Yeah, perhaps that would be useful, if only if it is a manageable subset
of the help that you can work with (there are SO many different commands
that almost do the same thing, you just don't need all of them, just a
decent workflow in the way of opening and closing files and windows. There
are a lot of commands that combine other commands in one, but you may
simply not need that at that point).


To the rest who replied: I was actually hoping for more specific answers
to the topics/issues I had described, rather than a generic "you can look
there to find your answers" kind of obvious non-solution. Cause you know,
if I was that eager to dive into help files and manuals, I would have
specifically asked for the best help files/tutorials, instead of
describing my issues myself.

And of course I plan to keep reading this group, since accidental
discovery is the easiest way of discovery. I've generally found it is also
easier to learn something by helping someone else solve something, than
trying to learn it for yourself by yourself. Other people's problems are
often neatly contained (from your point of view) whereas your own problems
(projects) can seem like a huge mountain to climb.

Few weeks ago I was visiting the Wordpress.org forums and even though I
hardly know anything about Wordpress, my vastly superior hacking skills
still allowed me to be of service to some people, and in the process I
learned (relearned) much about SQL and regexp. Which will subsequently
come very useful for myself. It would really have been a pain to learn it
for myself by myself. I was happy to be dealing with other people's modest
problems :p.

Right now I know mostly everything about PHP preg_ functions and how to
effectively use them. And now I've seen some Python code that can do the
same thing but in a very different way? I am writing something to traverse
the Facebook graph and came across someone who has written pretty much the
exact same thing I am trying to write, only he wrote it in Python. And his
Python style was not to use intricate regexp queries but to manually find
and traverse start and end positions of strings he wanted to match and
looping that until he'd found everything, after which an error occurred
and his "except:" code would then handle the transit to the next phase of
execution, all within the while loop. In PHP you use
preg_match_all($pattern, $text, $matches, PREG_SET_ORDER) to obtain an
array of matches and every element contains all the subpatterns you
wanted, [0] for the entire string, [1] for the first subpattern, and so
on. I bet those Python ways are more efficient? I.e. less expensive. I am
planning to combine his code with mine so that my PHP becomes a front-end
while the Python becomes an asynchronous back-end. That's also useful
because the PHP would run on the webserver while the Python would run on
the shell server.

Anyway, that's all a different subject.

Thanks for your help so far.

Regards, Xen.


>
> Of course one should browse around in the :help, which is great
> *if you know where to look*. Unfortunately in my experience
> that is far from always the case. I wonder how that could be
> improved?
>
> Then there is of course Google
>
> "vim phrase describing what it is I want to do"
>
> Remember: the more specific your query the more specific your
> answers. Use normal English describing what you are looking
> for, rather than trying to come up with a few keywords -- i.e.
> express your needs as is most natural to the brain. Google
> knows how to make the most out of it. I actually find things in
> the online vimdoc with google more easily than I find them
> with :help...
>
> /bpj
>


--
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/

--
--
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.

No comments: