Vim is Amazing | Editing for Automation!



In this video, I look at some of my favourite Vim tips and tricks when editing for automation

8 thoughts on “Vim is Amazing | Editing for Automation!

  • August 24, 2021 at 7:59 am
    Permalink

    No need to delete from the cursor to end of file by using d500j, use dG

    Reply
  • August 24, 2021 at 7:59 am
    Permalink

    Been trying to use the "ciw" command but everytime I hit the "i" in "ciw" it takes me to INSERT mode. How do you deal with that?

    Reply
  • August 24, 2021 at 7:59 am
    Permalink

    Hi

    You defined the function as

    def baseconfig(ipvzero):

    ipvzero.run(kwargs)

    more stuff

    Then you use it as

    results = nr.run(task = baseconfig)

    This bit is a tad confusing to me, I'm more accustomed to seeing the argument being passed to the function in a manner; result = function(args) where the function will also have a return statement.

    With this line results = nr.run(task = baseconfig) What is the argument that is being passed to baseconfig as ipvzero?

    Was hoping for something similar to baseconfig(nr) where nr is the argument being passed to the baseconfig function.

    What is happening there?

    Reply
  • August 24, 2021 at 7:59 am
    Permalink

    Hi
    Coming from desktop editors Sublime and Atom and nano on terminal… I'm planning to check out vim, mind sharing your vim config file? I would like to start from there 😉

    Reply
  • August 24, 2021 at 7:59 am
    Permalink

    You used 'd500j' to delete to the end of the file, assuming 500 would be enough. In vim the 'G' command takes you to the end of file. So 'dG' is the better way as there is no guessing and less typing 🙂
    Very good video by the way.

    Reply
  • August 24, 2021 at 7:59 am
    Permalink

    This is a great overview of power of VIM. I am a big fan of it, but didn't know most of what you have shown. 🙂

    Reply
  • August 24, 2021 at 7:59 am
    Permalink

    Never realized how useful relative numbering could be until now. Thanks for the great overview!

    Reply

Leave a Reply

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