Your First Vim Plugin

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มิ.ย. 2024
  • Chris Toomey presents Your First Vim Plugin, an overview of how to get started writing Vim plugins. In addition, Chris shares some of the plugins he has created over the past few years.
    For samples and notes; check out github.com/christoomey/your-f...
    Learn more from the developers at thoughtbot ⌨️
    Head over to tbot.io/dev-blog to read more great articles on our blog.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 27

  • @georgetroulis
    @georgetroulis 3 ปีที่แล้ว +8

    I've used vim for years and every second of this video was mind blowing. Incredibly insightful, many thanks for making this

  • @ranska2506
    @ranska2506 9 ปีที่แล้ว +6

    wwwoo ! the part with vim and tmux interaction is very impressive !
    congratulation for writing that great pluging.

  • @sociologie4507
    @sociologie4507 5 ปีที่แล้ว

    Masterful presentation of Vim-knowledge. Good job as always, CT.

  • @sujipanicker
    @sujipanicker 4 ปีที่แล้ว +2

    Chris Toomey you are a great teacher. The way you explain the concepts is just amazing. Keep up the good work. These are the times I love TH-cam

  • @myycomputer
    @myycomputer 2 ปีที่แล้ว

    A spectacular presentation, have been a long time since enjoyed vim this much.

  • @Quatsch83
    @Quatsch83 5 ปีที่แล้ว +4

    Really enjoyed this presentation. Very useful to see the workflow from creating a macro to turning into function/plugin.

  • @TheDerkus
    @TheDerkus 8 ปีที่แล้ว +11

    You should use Ctrl-O instead of marks. On the off chance the 'm' register is already being used, your command will overwrite it

    • @VioletJewel1729
      @VioletJewel1729 6 ปีที่แล้ว +1

      `` doesn't work when there are no spelling errors. It might jump you into another file, but it will almost certainly jump you elsewhere when there are no spelling errors (unless you have no jump list). So, storing the current line and column (with `let b:cline = line('.')` and `let b:ccol = col('.')` of course) might actually be the best course of action. (Then, we can use `exec 'norm! '.b:cline.'G'.b:ccol.'|'` or a better variant.)

    • @VioletJewel1729
      @VioletJewel1729 6 ปีที่แล้ว

      long story short: he should not use ctrl-o instead of marks. marks are marginally better, yet are still flawed, due to what you have mentioned. but there are bigger issues using ctrl-o

  • @josemiguelpasini6237
    @josemiguelpasini6237 ปีที่แล้ว

    This is a great talk but, if there were only one thing I'd extract as lifting my thinking to the next level, it would be the section starting at 23:32 (Custom Text Objects). This section alone will get you thinking about plugins that not only do specific things but also exploit the core vim grammar/composability by thinking of creating new verbs and nouns.

  • @avimehenwal
    @avimehenwal 6 ปีที่แล้ว +2

    vimscript genius! I always though og VimL as a scary ghost ... never to be chased

  • @josevillar5508
    @josevillar5508 3 ปีที่แล้ว

    Great video! I have a doubt though: at 10:30 I noticed that your "FixLastSpellingError" was a little different in your vimrc, specifically it had a quotation mark at the end. What is that for?

  • @grahamjoss4643
    @grahamjoss4643 3 ปีที่แล้ว

    thanks for sharing

  • @davidharris913
    @davidharris913 9 ปีที่แล้ว +1

    The [s command only works if you have spell check enabled. As per the vim help on spell (:help spell) or (vimdoc.sourceforge.net/htmldoc/spell.html) you can run something similar to ":setlocal spell spelllang=en_us" to enable spell checking. Then [s and other commands for finding misspelled words will work.

  • @DurgaswaroopPerla
    @DurgaswaroopPerla 8 ปีที่แล้ว +2

    Is the "normal!" before everything required? Wouldn't it do the same thing even without it?

    • @itsnotallrainbowsandunicor1505
      @itsnotallrainbowsandunicor1505 8 ปีที่แล้ว

      ?

    • @DurgaswaroopPerla
      @DurgaswaroopPerla 8 ปีที่แล้ว

      I was talking about the "normal !" that he puts before every command.

    • @monugupta32
      @monugupta32 7 ปีที่แล้ว

      try & tell

    • @DurgaswaroopPerla
      @DurgaswaroopPerla 7 ปีที่แล้ว +3

      Yeah tried. Its not compulsory. I guess its just good practice.

    • @Nophk3
      @Nophk3 5 ปีที่แล้ว

      The command would not be understood the same way from vnoremap...

  • @fuseteam
    @fuseteam 4 ปีที่แล้ว

    looks like vim now has a :terminal command

  • @Sk8erMorris
    @Sk8erMorris 3 ปีที่แล้ว

    I think VIM is super cool... But why don't new programmers like rather than any IDE? It's hard to learn something you like that is outdated by your colleagues or employers....? Any advice ? I want to learn VIM but I'm having doubts now ... 🎈

    • @raynei
      @raynei 3 ปีที่แล้ว +1

      Don't be
      learn vim to show them how much of a Chad you are
      jokes aside I find vim more enjoyable the more you learn, so don't give up and keep learning. And if you really want, you can use a vim + IDE setup like I do

  • @abhilashr838
    @abhilashr838 2 ปีที่แล้ว

    Why is his keyboard so noisy