Buffers, Windows, Tabs in Neovim

Sdílet
Vložit
  • čas přidán 8. 09. 2024

Komentáře • 41

  • @ascourter
    @ascourter  Před rokem +2

    Do you have any tips or tricks you use for opening or manipulating buffers, windows, tabs?

  • @licokr
    @licokr Před 4 měsíci +5

    I'm a noob for neovim. This is exactly what I was looking for. Thanks man 👍

    • @ascourter
      @ascourter  Před 4 měsíci +1

      Thank you! Glad it helped and let me know if there are other topics you're interested in.

  • @Drezaem55
    @Drezaem55 Před rokem +4

    This was exactly what I needed next in my vim journey. I can reasonably fluently move within a file, and this teaches how to move through a project which was the next step I needed to take. Thank you very much!

    • @ascourter
      @ascourter  Před rokem

      You're very welcome! Glad I was able to help. You might also check out my video on NetRW too. There's some good overlap between these concepts and using NetRW.

  • @TheStickofWar
    @TheStickofWar Před 4 měsíci +1

    When Andrew resizes the window with his keybinding (ctrl+w -> arrow key), You can actually enter ctrl+w -> any number -> arrow key and you will repeat this. It's the equivalent to the cols and rows of your terminal, so if you want 5 columns (synonymous with characters) or 5 rows (synonymous with line height), then you can do that. Of course you can map some shortcut to spam it if you prefer.

  • @recker624
    @recker624 Před měsícem

    Thanks man really appreciate the nice tutorial. I recently made the switch from VS code and was struggling to understand how buffer, windows and tabs were related. You really helped me out.

    • @ascourter
      @ascourter  Před měsícem

      @@recker624 thanks for the kind words! I'm glad I was able to help

  • @BlaximusIV
    @BlaximusIV Před 4 měsíci +1

    Awesome, this was just what I was looking for! Very helpful.
    It might be helpful to note that at 0:55, pv that's used is a custom mapping for the 'Ex' command. e.g. ':Ex' or vim.cmd.Ex

    • @ascourter
      @ascourter  Před 4 měsíci

      Thanks for calling that out. That's definitely a custom keymap like you mentioned.

    • @user-ew6mz8kz8v
      @user-ew6mz8kz8v Před 3 měsíci

      Я минут пять не мог понять как открыть файл. Потом решил посмотреть комментарии и благодаря тебе смог открыть файл/ Спасибо!
      Для тех, кто в затруднении нужно выполнить

  • @user-go3rb6rs2l
    @user-go3rb6rs2l Před 5 měsíci

    Andrew Courter thank you from Russia о7 👏

  • @elw8058
    @elw8058 Před rokem +1

    The local arglist is a really under rated feature of Vim. Perhaps you can explain how it's independent in tabs,splits.

    • @elw8058
      @elw8058 Před rokem

      and how it differs from buffers

    • @ascourter
      @ascourter  Před rokem

      That's a great suggestion! I'll add that to my list to go over. Thanks!

  • @hungrycode
    @hungrycode Před 8 měsíci

    this is so helpful thank you

  • @GSon-bj7mp
    @GSon-bj7mp Před 8 měsíci +1

    what is that 'column' that is highlighted on the right side of your screen?
    i have that same thing, and drives me nuts... do you know how to get rid of it? or at least why it appears there? thanks in advance

    • @ascourter
      @ascourter  Před 8 měsíci

      Haha I have debated turning this off as well. I believe this is "colorcolumn". Try setting vim.opt.colorcolumn = "" in your init.lua to disable it.

    • @GSon-bj7mp
      @GSon-bj7mp Před 8 měsíci

      lol, i c. thank you!@@ascourter

  • @yash1152
    @yash1152 Před 4 měsíci

    1:35 equivalent to _[i list opened buffers using telescope]_
    i'll have to search for the way to do it natively in nvim. as i am not into any plugins for the time being.

    • @ascourter
      @ascourter  Před 4 měsíci

      Using :buffers should be the built in way to list the open buffers

  • @rbereziuk
    @rbereziuk Před rokem

    Great video, thanks.
    Not vim question, why do you use useMemo for simple object literal?
    Using hooks is not free, and for simple object, it could have the opposite effect to app performance

    • @ascourter
      @ascourter  Před rokem +2

      Thanks! If I remember correctly I needed it to do a deep comparison or copy to get it to work. Definitely performance implications like you mentioned so I should go back and double check this is still necessary. Thanks for the question!

  • @simplyblunder
    @simplyblunder Před 8 měsíci

    Great video! one thing I was wondering that while it's nice to be able to send a split to a new tab like you showed at the end, is it possible to then send this tab back into a split??

    • @simplyblunder
      @simplyblunder Před 8 měsíci

      or is it just sort of easier to use ":sb" for this sort of thing?

    • @ascourter
      @ascourter  Před 8 měsíci +1

      Great question, I don't think there's a built in way to move a window back into an existing tab from what I've researched. I did find this link with a custom function for vim: vim.fandom.com/wiki/Move_current_window_between_tabs

    • @simplyblunder
      @simplyblunder Před 8 měsíci

      @@ascourter awesome, cheers for the reply I’ll check it out!

  • @LuRybz
    @LuRybz Před 5 měsíci

    Hey, I am a game developer (Unity) and I am passionate about Vim but the tutorials that I`ve found dont mention about debugging.
    I cant debug Unity C# code in Vim :( do you have any idea how to solve it?

    • @ascourter
      @ascourter  Před 5 měsíci +1

      It's on my list to create a C# video. I haven't done much C# but I should be able to show how to get debugging and tests running

  • @michalroesler
    @michalroesler Před 8 měsíci

    You're using this this key combination " ff" a lot.
    Can you please explain what it's doing if a few simple words??

    • @ascourter
      @ascourter  Před 8 měsíci +1

      Of course! This runs:Telescope find_files. Here's a link to my keymaps for Telescope: github.com/exosyphon/nvim/blob/main/after/plugin/telescope.lua

  • @AdharshMk96
    @AdharshMk96 Před 4 měsíci

    How to configure telescope to open a new tab everytime?

    • @ascourter
      @ascourter  Před 4 měsíci +1

      Unless you have overridden the default mappings, Ctrl+t should open a file in a new tab. You can override the mappings if you want it to be in a tab but the default of using buffers is more vim-like. github.com/nvim-telescope/telescope.nvim/tree/master?tab=readme-ov-file#default-mappings

    • @AdharshMk96
      @AdharshMk96 Před 4 měsíci

      I got the desired behavior with bufferline and setting mode=“buffers”
      Now when any new buffer is shown as tab

    • @ascourter
      @ascourter  Před 4 měsíci

      @@AdharshMk96 ah ok. That's a little different than opening each in a tab but I'm glad that got the behavior you wanted!

  • @michalroesler
    @michalroesler Před 8 měsíci

    It's great you have Return YouTub Dislike button installed. It shows you're the legit content creator.
    I was a little disappointment, because you have a little to much of those plugins installed, so your key combinations are a little bit different then plain vanilla Vim.
    But thanks for the explanation, regarding Buffers, Windows and Tabs.
    That's quite a lot features for a single text editor, but one needs to learn and understand the world we live in. Doesn't he??

    • @ascourter
      @ascourter  Před 8 měsíci +1

      Glad my explanation was helpful!

  • @ripndipp
    @ripndipp Před 2 měsíci

    This is my 3rd time trying to divorce myself to BSCode

    • @ascourter
      @ascourter  Před 2 měsíci

      Good luck! What have you run into in the past that prevented the switch?