LFCS: How to Install and Use vi/vim as a Full Text Editor – Part 2

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

15 Responses

  1. Yeliz Ok says:

    Great guide for novices. Thanks.

  2. Williams says:

    What a wonderful and helpful page for LFCS. I’m taking the LFCS in about three days and despite all the discouraging post online about this certification, I will still take my chances. I think your tutorial is the best yet to prepare for this exam.

  3. mohammad says:

    really tnx for your great website and this awesome article about vi/m
    kindly tell me how can i gain this article part 1 ?
    it is clear from the subject of this document that is part 2 and i want part 1 , plz send me url of part 1

  4. Thomas says:

    Do I really have to learn vim ? Can I get by on this exam with just nano ?

    • @Thomas,
      You can use whatever text editor you feel most comfortable with. In this series we choose vi/m because vi is present out-of-the-box on all distros and tends to be the tool of choice for most people. That being said, feel free to use whatever editor you want during the exam, as long as you find it installed on the virtual machine that they give you, but nano should be installed as well by default.

  5. @lvin says:

    In the Command mode type “a4yy”
    It will immediately enter Insert mode, right?
    Because a – Append after the current cursor position


    • @lvin,
      It should. Did you try it yourself in practice? Please post back if the behavior is not as expected.

      • Barry Gestwicki says:

        Hi Gabriel! Thank you for this great series of articles for the LFCS! I think what @lvin may be getting at here is that one cannot yank four lines into register “a” (I’ll also highlight that a few of the steps above refer to this as a “buffer”, which is slightly inaccurate terminology) as outlined above, or really any character that has a special function within vi/vim, since said key is going to go enter “insert” mode. Rather, something like “04yy” and/or “0p” to illustrate use of register “0” might be a better example, although feel free to let me know if I’m missing something. In any case, thanks again for the great write-up, Gabriel!

        • mdebusk says:

          You both appear to have misunderstood what he wrote.

          What to type when yanking four lines to a register is a quote mark, a letter a, a numeral 4, and two letters y. Like this: “a4yy

          The author was not surrounding a4yy with quotes.

          • Thank you @lvin and @Barry for pointing this out, and mdebusk for clarifying.
            @Ravi, please correct the writeup as suggested by mdebusk above.

          • Ravi Saive says:

            @Ivin, @Barry and @Mdebusk,

            Corrected as suggested in the writeup, I hope it will clear any confusion..

  6. Gabor says:

    I use Xubuntu 14.04 (which IS an Ubuntu derivative), but “aptitude” does not work here
    I installed vim using:
    “sudo apt-get update && sudo apt-get install vim”

    • @Gabor,
      That indicates that aptitude is not present on your system.
      If you want to use it, you can install it as follows:

      sudo apt-get install aptitude

      and then start enjoying the bounties of one of the most powerful package management systems out there ;).

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *