[Ilugc] the vi editor

  • From: viky.nandha@xxxxxxxxx (Vignesh Nandha Kumar)
  • Date: Wed, 13 Jun 2012 18:01:01 +0530

I think you should add a disclaimer to all your mails, saying that the
content should be taken as a rant and that the literal meaning shouldn't be
taken as such. I hope my inline replies below justify that.

On Wed, Jun 13, 2012 at 5:16 PM, Girish Venkatachalam <
girishvenkatachalam at gmail.com> wrote:


I am going to talk only about advanced use. I am thinking that most of
you will know
 how to use vi by now. Otherwise you dunno Linux anyway. ;)


Can you justify? Oh wait. You're right, if you use emacs, probably you know
GNU/Linux, not Linux ;)


Okay how to do simple things that are really cool with vi?


You are contradicting with your previous statement "I am going to talk only
about advanced use."


You can flip the character case using the ~ (tilde) operator.

Just move over the characters pressing it.


Is there no better way? In emacs you could change case of a selected region
by C-x C-u for uppercase and C-x C-l for lowercase. To change case of just
the following word, you can simply do M-u for uppercase, M-l for lowercase
and M-c for camelcase.

I'm not trying to prove emacs is superior, as I don't know much about vi.
I'm just trying to understand vi.

You can format the file and indent the loops and conditions by
selecting the region and pressing =

This only works in vim.


Now you are dragging me into emacs-vi battle. You can do this same way in
emacs by selecting region and pressing C-M-\ . Again I'm not saying emacs
is superior (though it may be), but asking you to stop making such
arbitrary statements.


-- 
Vignesh Nandha Kumar
http://vigneshnandhakumar.in

Other related posts: