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

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ •

  • @ChristopherSalisburySalz
    @ChristopherSalisburySalz 19 годин тому +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  14 годин тому +1

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

  • @krantinebhwani6125
    @krantinebhwani6125 10 годин тому +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 15 годин тому +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  15 годин тому +1

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

  • @thoughtlesslabs
    @thoughtlesslabs 14 годин тому +2

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

  • @jeffbit8620
    @jeffbit8620 21 годину тому +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. 21 годину тому +8

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

    • @teej_dv
      @teej_dv  14 годин тому +1

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

    • @jeffbit8620
      @jeffbit8620 12 годин тому

      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.

  • @eflinjh
    @eflinjh 14 годин тому +1

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

  • @keyboard-slayer
    @keyboard-slayer 16 годин тому +2

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

  • @committedcoder3352
    @committedcoder3352 21 годину тому +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  14 годин тому +1

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

  • @cristobaljvp
    @cristobaljvp 9 годин тому

    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 20 годин тому +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  14 годин тому +1

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

  • @danporter2453
    @danporter2453 18 годин тому +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  14 годин тому +1

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

  • @bassamsaleh8034
    @bassamsaleh8034 12 годин тому

    Amazing content-please keep it coming!

  • @Windeycastle
    @Windeycastle 19 годин тому +1

    That's so good! Thanks for sharing.

    • @teej_dv
      @teej_dv  15 годин тому

      my pleasure!

  • @DeepanshuJain21
    @DeepanshuJain21 22 години тому +3

    You make nvim more fun for me 😄

    • @teej_dv
      @teej_dv  14 годин тому

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

  • @GGDiegoNeira
    @GGDiegoNeira 21 годину тому +2

    Your content is GOLD!! ❤

    • @teej_dv
      @teej_dv  14 годин тому

      your comments are gold!! ;)

  • @ChristopherSalisburySalz
    @ChristopherSalisburySalz 19 годин тому +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  15 годин тому

      hahaha thank you! i appreciate :)

  • @examinethose
    @examinethose 6 годин тому

    my gippity defaulted to rounded borders, you made it a fan

  • @timdithmer9184
    @timdithmer9184 20 годин тому +1

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

    • @teej_dv
      @teej_dv  14 годин тому +1

      hahaha i am tryin!

  • @disguisedpigeon5465
    @disguisedpigeon5465 22 години тому +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 17 годин тому

      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  14 годин тому

      ya, super reasonable.

  • @Kane0123
    @Kane0123 18 годин тому +1

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

    • @teej_dv
      @teej_dv  15 годин тому

      haha what do you mean?

  • @tigranrostomyan9231
    @tigranrostomyan9231 15 годин тому +1

    this is so good

    • @teej_dv
      @teej_dv  15 годин тому

      appreciate it :)

  • @gueyenono
    @gueyenono 9 годин тому

    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  8 годин тому

      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 13 годин тому +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 18 годин тому +1

    I loved this trick ❤

    • @teej_dv
      @teej_dv  15 годин тому

      thank you haha

  • @nahuellescano
    @nahuellescano 13 годин тому

    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  8 годин тому

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

  • @hadeedji
    @hadeedji 14 годин тому +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  14 годин тому

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

  • @markuslanggeng
    @markuslanggeng 9 годин тому

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

  • @yayahc
    @yayahc 15 годин тому +1

    I just got buf buf buf buf buf

    • @teej_dv
      @teej_dv  15 годин тому

      buf buf buf buf

  • @puneetdhiman5194
    @puneetdhiman5194 21 годину тому +1

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

  • @robcmills
    @robcmills 20 годин тому

    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  14 годин тому

      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 21 годину тому +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  14 годин тому

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

  • @shivamamin1126
    @shivamamin1126 20 годин тому

    Ohh Yeee!!! 💜

  • @adrianscarlett
    @adrianscarlett 21 годину тому +3

    Mines called flerminal.

    • @bugloper
      @bugloper 17 годин тому

      Mine is called floaminal

  • @Xdavidel
    @Xdavidel 19 годин тому

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

    • @teej_dv
      @teej_dv  15 годин тому

      ya, old habits die hard though haha

  • @sidgabriell
    @sidgabriell 20 годин тому

    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 16 годин тому

      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 15 годин тому

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

    • @teej_dv
      @teej_dv  14 годин тому

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

    • @sidgabriell
      @sidgabriell 14 годин тому

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

  • @sh_zik
    @sh_zik 19 годин тому

    TJ, can you update git repo, please?

    • @teej_dv
      @teej_dv  15 годин тому

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

  • @ByronPendason
    @ByronPendason 20 годин тому

    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  14 годин тому +2

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

    • @ForeverZer0
      @ForeverZer0 14 годин тому +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 14 годин тому

      @@teej_dv Awesome! Thank you so much!

  • @ChristopherSalisburySalz
    @ChristopherSalisburySalz 19 годин тому

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

    • @teej_dv
      @teej_dv  15 годин тому

      you can copy it and the command will run :)

  • @donaldwilliams6821
    @donaldwilliams6821 20 годин тому

    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  14 годин тому +1

      Just updated the git repo, thanks for the reminder!

    • @donaldwilliams6821
      @donaldwilliams6821 12 годин тому

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

  • @stefanvanbiljon8657
    @stefanvanbiljon8657 20 годин тому

    Anyone know what font tj is using?

  • @henryallenlaudemilk5161
    @henryallenlaudemilk5161 20 годин тому +1

    Why not just use toggleterm?

    • @Ninjafire300
      @Ninjafire300 20 годин тому

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

    • @teej_dv
      @teej_dv  14 годин тому +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 18 годин тому

    Hey what font are you using?

    • @teej_dv
      @teej_dv  15 годин тому

      berkeley mono

  • @matheusmoraes8157
    @matheusmoraes8157 16 годин тому

    Where is the code?

    • @teej_dv
      @teej_dv  15 годин тому +1

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

  • @NicolasJoye
    @NicolasJoye 13 годин тому

    Floaterm is hilar...😂

  • @Michael-rh8vy
    @Michael-rh8vy 21 годину тому

    Based

  • @tecchie-z
    @tecchie-z 16 годин тому

    Or just use floaterm

    • @teej_dv
      @teej_dv  15 годин тому

      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 22 години тому +4

    Not bad, but I think floater is a better name

    • @teej_dv
      @teej_dv  14 годин тому +1

      hahah i ain't doin that

  • @m4saurabh
    @m4saurabh 22 години тому +2

    First

    • @teej_dv
      @teej_dv  14 годин тому

      first reply

  • @disguisedpigeon5465
    @disguisedpigeon5465 22 години тому +1

    One comment in one minute. Dead channel

    • @disguisedpigeon5465
      @disguisedpigeon5465 22 години тому +2

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

    • @teej_dv
      @teej_dv  14 годин тому

      HAHA i forgot that I mentioned it here.

  • @zlavankorps8165
    @zlavankorps8165 20 годин тому

    nice

  • @blacksundarkskies
    @blacksundarkskies 7 годин тому

    vim-floaterm is been around for 5 years