Floating toggle-able terminal in Neovim in 50 lines of Lua

Поделиться
HTML-код
  • Опубликовано: 18 дек 2024

Комментарии • 103

  • @ChristopherSalisburySalz
    @ChristopherSalisburySalz 13 часов назад +15

    Pure wizardy! I watch these more to be impressed than to learn because there are too many gaps in my neovim knowledge and you go super duper fast.

    • @teej_dv
      @teej_dv  8 часов назад +1

      haha thanks for all the comments :) and glad you are enjoying the videos

  • @krantinebhwani6125
    @krantinebhwani6125 4 часа назад +1

    always learn a lot from you, appreciate it, as much as a i like hacking away at difficult problems when it comes to config i always feel like theres a wall in my way before diving in so ive always use default neovim + a few settings. But seeing how you do it makes it feel a lot less "icky" for a lack of a better word, and you're so smooth with all this. thanks buddy

  • @callmetyler
    @callmetyler 8 часов назад +2

    Amazing resource for getting started with plugin development! Can’t wait to see what else we build in this series!

    • @teej_dv
      @teej_dv  8 часов назад +1

      thanks :) ya, we'll start doing a bit more exploring as we go on in the series!

  • @thoughtlesslabs
    @thoughtlesslabs 7 часов назад +2

    Amazing video teej and thank you so much for helping bring light to a very important cause! 😊

  • @jeffbit8620
    @jeffbit8620 15 часов назад +16

    Just an idea. Maybe a video about your setup. Like color scheme on neovim, terminal you use, window manager etc. For people that are curious. Also love the videos, learn a lot. Thanks.

    • @mr.sloth.
      @mr.sloth. 15 часов назад +8

      Don't forget to say which editor you use, btw.

    • @teej_dv
      @teej_dv  8 часов назад +1

      ya, maybe in the new year, but it's not very exciting stuff haha

    • @jeffbit8620
      @jeffbit8620 6 часов назад

      I understand. Can I still ask what your neovim color scheme is though? I typed the telescope lua out and it formatted it out right except the find files part isn’t colored.

  • @keyboard-slayer
    @keyboard-slayer 10 часов назад +2

    OK, now I'm in love with neovim. Thanks TJ!

  • @eflinjh
    @eflinjh 8 часов назад +1

    Your videos are great as always but HOLY MOLY this hoody is GOLD

  • @committedcoder3352
    @committedcoder3352 15 часов назад +7

    Good video. This gives me some ideas, like having easily accessible "scratch" buffers for different languages, e.g. a scratch buffer for python, js, latex, or md/plain text with an option to render/run? Seems like a fun challenge :)

    • @teej_dv
      @teej_dv  8 часов назад +1

      that's the best part! you can make it just the way you like for you!

  • @cristobaljvp
    @cristobaljvp 3 часа назад

    damn i am feeling like i am gonna take my neovim config to the next level with this videos, i hope there is more coming, thanks for the video!

  • @ankushroy1729
    @ankushroy1729 14 часов назад +3

    Thank you very much Teej! I've been using nvim without knowing a lot of things for such a long time. All these recent videos helped me a lot!

    • @teej_dv
      @teej_dv  8 часов назад +1

      So glad to hear you're liking it and enjoying it

  • @danporter2453
    @danporter2453 12 часов назад +1

    This was helpful. I hope all the big money flowing in from the sponsors isn't going to affect the great content.

    • @teej_dv
      @teej_dv  7 часов назад +1

      hahaha yes, adopt a reply guy truly going to bring in the big bucks

  • @bassamsaleh8034
    @bassamsaleh8034 6 часов назад

    Amazing content-please keep it coming!

  • @Windeycastle
    @Windeycastle 12 часов назад +1

    That's so good! Thanks for sharing.

    • @teej_dv
      @teej_dv  8 часов назад

      my pleasure!

  • @DeepanshuJain21
    @DeepanshuJain21 15 часов назад +3

    You make nvim more fun for me 😄

    • @teej_dv
      @teej_dv  8 часов назад

      awe, thank you! that's a really nice compliment!

  • @GGDiegoNeira
    @GGDiegoNeira 14 часов назад +2

    Your content is GOLD!! ❤

    • @teej_dv
      @teej_dv  8 часов назад

      your comments are gold!! ;)

  • @ChristopherSalisburySalz
    @ChristopherSalisburySalz 13 часов назад +1

    I have spent a LONG time learning vim motions and neovim. And I realize how very little I know when zi watch your videos.

    • @teej_dv
      @teej_dv  8 часов назад

      hahaha thank you! i appreciate :)

  • @timdithmer9184
    @timdithmer9184 14 часов назад +1

    Dang bruh, more videos than I can consume. love it. 😍

    • @teej_dv
      @teej_dv  8 часов назад +1

      hahaha i am tryin!

  • @disguisedpigeon5465
    @disguisedpigeon5465 15 часов назад +2

    8:40 I wouldn't set it to terminal mode because of the small delay when pressing , maybe tt on normal and on terminal. Just my opinion though.

    • @sebascoding
      @sebascoding 11 часов назад

      As long as the next word doesn't start with `tt` (not that common at least in english), you can keep writing, don't need to wait after the ``

    • @teej_dv
      @teej_dv  8 часов назад

      ya, super reasonable.

  • @Kane0123
    @Kane0123 11 часов назад +1

    Teej's comment section is getting hit hard - bros making good content!

    • @teej_dv
      @teej_dv  8 часов назад

      haha what do you mean?

  • @hadeedji
    @hadeedji 8 часов назад +1

    Great video
    So far we've been using existing plugins, what is the thought process behind doing terminal from scratch rather than using one of the many plugins, thanks!

    • @teej_dv
      @teej_dv  8 часов назад

      terminal from scratch takes like 50 lines, writing a custom autocompletion plugin takes a few thousand haha

  • @tigranrostomyan9231
    @tigranrostomyan9231 9 часов назад +1

    this is so good

    • @teej_dv
      @teej_dv  8 часов назад

      appreciate it :)

  • @gueyenono
    @gueyenono 3 часа назад

    I highly recommend your retitle your videos by prefixing them with Advent of Neovim Day 1...25. In this season, I am very sure it will bring in many more views.

    • @teej_dv
      @teej_dv  Час назад

      in general, i've found putting the series title tanks the views haha but i appreciate the suggestion. they are all on a playlist though!

  • @lotfi5404
    @lotfi5404 7 часов назад +1

    First of all thank you for these very informative videos . I have a question please what is your settings / layout of the status bar i rlly like how simplistic it is

  • @cacup7
    @cacup7 12 часов назад +1

    I loved this trick ❤

    • @teej_dv
      @teej_dv  8 часов назад

      thank you haha

  • @nahuellescano
    @nahuellescano 6 часов назад

    Man, your tutorials are awesome! It's a shame you don't have a transparent terminal with a waifu background image, but it's okay. You are gold.

    • @teej_dv
      @teej_dv  Час назад

      my waifu is real 3d girl - so instead i just use default awesomewm desktop background LOL

  • @markuslanggeng
    @markuslanggeng 2 часа назад

    I usually just use ctrl-z or spaan another terminal, but this is interesting too

  • @yayahc
    @yayahc 8 часов назад +1

    I just got buf buf buf buf buf

    • @teej_dv
      @teej_dv  8 часов назад

      buf buf buf buf

  • @puneetdhiman5194
    @puneetdhiman5194 15 часов назад +1

    Can you explain about make command. And how to like jump from errors from terminal to error location

  • @robcmills
    @robcmills 14 часов назад

    Long time fan of your content. It's fantastic.
    I saw that you are starting to integrate LLM's into your dev flow. They are super useful, eh?
    I've been using vim for over ten years, and switched to neovim a few years ago. I'm super deep into my config and I love it, but
    I've recently started using Cursor, because it takes AI assisted coding to the next level. I'm curious what your thoughts are regarding this and the future of ai-assisted coding in neovim.

    • @teej_dv
      @teej_dv  8 часов назад

      haha a bit too long of thoughts to write in a comment, but I have tried cursor to get a good opinion of it. I think LLMs can be quite helpful (or very harmful haha depends on the day). Maybe I will make something with a larger conglomeration of my thoughts in the new year

  • @karan_hiremath
    @karan_hiremath 14 часов назад +1

    This but it lets me attach to any tmux window/pane would be *chefs kiss* for my workflow!!!!
    Guess it’s good I’m on vacation I got time to figure out how tf to make that shit work!!!!

    • @teej_dv
      @teej_dv  8 часов назад

      ya, sorry - i don't use tmux so i can't really help ya with this one

  • @shivamamin1126
    @shivamamin1126 13 часов назад

    Ohh Yeee!!! 💜

  • @adrianscarlett
    @adrianscarlett 15 часов назад +3

    Mines called flerminal.

    • @bugloper
      @bugloper 11 часов назад

      Mine is called floaminal

  • @Xdavidel
    @Xdavidel 12 часов назад

    Isn't vim.print(_) the same as print(vim.inspect(_))?

    • @teej_dv
      @teej_dv  8 часов назад

      ya, old habits die hard though haha

  • @sidgabriell
    @sidgabriell 14 часов назад

    Floating terminal is working but I get this message when I open neovim:
    Invalid spec module: `plugins.floaterminal`
    Expected a `table` of specs, but a `nil` was returned instead
    Anyone can help me?

    • @csam9170
      @csam9170 9 часов назад

      Maybe you put it in your lazy plugins directory instead of the root level ‘plugin’ dir
      And lazy is expecting your module to return a table, but this one returns nothing but sets a keymap in the end

    • @sidgabriell
      @sidgabriell 8 часов назад

      @@csam9170 I tried this too but same happen, but I'll check again asap, thanks :)

    • @teej_dv
      @teej_dv  8 часов назад

      You don't want it in nvim/lua/config/plugins, but instead just nvim/plugin

    • @sidgabriell
      @sidgabriell 8 часов назад

      @@teej_dv Thanks teej, I'll check tomorrow at work, thanks for the videos and greetings from Brazil

  • @sh_zik
    @sh_zik 12 часов назад

    TJ, can you update git repo, please?

    • @teej_dv
      @teej_dv  8 часов назад

      yup! just pushed an update - sorry for forgetting to do that haha

  • @ByronPendason
    @ByronPendason 13 часов назад

    Is there a setting out maybe an easy autocommand that can set up that whenever you enter a terminal buffer in Neovim it automatically goes into insert mode? It would be an awesome quality of life upgrade. Lol.

    • @teej_dv
      @teej_dv  8 часов назад +2

      Yup! It's in the help for :terminal btw ;)
      autocmd TermOpen * startinsert

    • @ForeverZer0
      @ForeverZer0 8 часов назад +2

      There is multiple ways to do it, but in the `toggle_window` function, directly under the "if ...end " expression that calls `vim.cmd.term()`, add the line `vim.cmd("startinsert")`.
      This will make it enter insert mode automatically every time the window is shown.

    • @ByronPendason
      @ByronPendason 8 часов назад

      @@teej_dv Awesome! Thank you so much!

  • @ChristopherSalisburySalz
    @ChristopherSalisburySalz 13 часов назад

    Why a semi colon for your prompt? Im sure you have some smart reason why.

    • @teej_dv
      @teej_dv  8 часов назад

      you can copy it and the command will run :)

  • @donaldwilliams6821
    @donaldwilliams6821 14 часов назад

    Can you post this code? Your notes git repo doesn't have it. Also at the top you have "Package Mgr" below you call it "Plugin Mgr" Thanks

    • @teej_dv
      @teej_dv  8 часов назад +1

      Just updated the git repo, thanks for the reminder!

    • @donaldwilliams6821
      @donaldwilliams6821 5 часов назад

      @@teej_dv Thanks but the floating terminal code still isn't there.

  • @stefanvanbiljon8657
    @stefanvanbiljon8657 13 часов назад

    Anyone know what font tj is using?

  • @henryallenlaudemilk5161
    @henryallenlaudemilk5161 14 часов назад +1

    Why not just use toggleterm?

    • @Ninjafire300
      @Ninjafire300 14 часов назад

      because you don't have vim motions in toogleterm, i often struggle for yanking text in toggle term

    • @teej_dv
      @teej_dv  8 часов назад +1

      i don't see why i would need a plugin for something i can write in 50ish lines (and then customize more for exactly how i want to use it, never breaks, never changes unless i do, etc)

  • @carlosdelgadoramos9948
    @carlosdelgadoramos9948 12 часов назад

    Hey what font are you using?

    • @teej_dv
      @teej_dv  8 часов назад

      berkeley mono

  • @matheusmoraes8157
    @matheusmoraes8157 10 часов назад

    Where is the code?

    • @teej_dv
      @teej_dv  8 часов назад +1

      sorry, it's updated here now github.com/tjdevries/advent-of-nvim

  • @NicolasJoye
    @NicolasJoye 6 часов назад

    Floaterm is hilar...😂

  • @Michael-rh8vy
    @Michael-rh8vy 15 часов назад

    Based

  • @tecchie-z
    @tecchie-z 10 часов назад

    Or just use floaterm

    • @teej_dv
      @teej_dv  8 часов назад

      sure - but this is like almost no code and teaches you a lot of things. it's ok to take time to learn!

  • @Hooksie1
    @Hooksie1 15 часов назад +4

    Not bad, but I think floater is a better name

    • @teej_dv
      @teej_dv  8 часов назад

      hahah i ain't doin that

  • @m4saurabh
    @m4saurabh 16 часов назад +2

    First

    • @teej_dv
      @teej_dv  8 часов назад

      first reply

  • @disguisedpigeon5465
    @disguisedpigeon5465 16 часов назад +1

    One comment in one minute. Dead channel

    • @disguisedpigeon5465
      @disguisedpigeon5465 16 часов назад +2

      He ain't know how to post videos in order. Oil vid mentions this one. 😭

    • @teej_dv
      @teej_dv  8 часов назад

      HAHA i forgot that I mentioned it here.

  • @zlavankorps8165
    @zlavankorps8165 14 часов назад

    nice

  • @blacksundarkskies
    @blacksundarkskies Час назад

    vim-floaterm is been around for 5 years