Buffers, Windows, and Tabs! OH MY!

  Рет қаралды 23,229

TJ DeVries

TJ DeVries

Күн бұрын

Пікірлер: 76
@prashlovessamosa
@prashlovessamosa Ай бұрын
Two days 😅 please upload two videos now
@examinethose
@examinethose Ай бұрын
stop being mean to working dads challenge
@GoogleUser-uv9bo
@GoogleUser-uv9bo Ай бұрын
It's good to procrastinate for him to let newbies catch up learning with his upload speed! 😂
@Kane0123
@Kane0123 Ай бұрын
Bro released one a couple mins ago, checkmate
@teej_dv
@teej_dv Ай бұрын
Already on it hahaha
@justincmendes
@justincmendes Ай бұрын
Based
@diggus88
@diggus88 17 күн бұрын
- Since most of the window commands start with Ctrl+w, I map w to Ctrl+w and everything becomes a lot more ergonomic. Like most people I use as the leader. - Ctrl+w followed by just w does the same thing as Ctrl+w followed by Ctrl+w. With the above in mind, switching between two windows becomes just ww. - A pretty important one to mention is Ctrl+w followed by c, which closes the current *window*, but not necessarily the buffer (if it's open in another window). This should work in most any situation where :fc would work (and :bd should also work in those scenarios).
@PaulMason99
@PaulMason99 Ай бұрын
My favourite ctrl-w mapping is ctrl-w r which "rotates" windows. I'll often have a vertical split with two files, or two places in the same file. Usually the left is for active editing and the right is just for reference. If I want to edit on the right side for more than a second or two I can swap them with ctrl-w r.
@Theosibo
@Theosibo Ай бұрын
Woo, I like this very much. I keep code on left and tests on right, and I rather enjoy the idea of moving my activity to KEEP my active window as the left side and KEEP the right side as reference. Thanks from random internet guy for the tip! :)
@doug1727
@doug1727 Ай бұрын
I remapped hjkl to for easier navigation. I think I saw it in an old video of yours and it feels much better
@asdfasdfuhf
@asdfasdfuhf Ай бұрын
I want to do that too! How did you do that? Please at least tell me what video taught you how to do that!
@LorenzoBettini
@LorenzoBettini Ай бұрын
LazyVim also does that
@pmmeurcatpics
@pmmeurcatpics Ай бұрын
​​@@asdfasdfuhf`vim.keymap.set("", "j")` (and the same with the other 3) should work just fine I think?
@DEVDerr
@DEVDerr Күн бұрын
@@asdfasdfuhf vim-tmux-navigator plugin does that automatically
@Windeycastle
@Windeycastle Ай бұрын
Using which-key also really helps here! I know that window-keybinds use ctrl-w, but don't necessarily know the next key to press. However, when I press ctrl-w, which-key will show the available next keys with a short description.
@LokeshKrishna1995
@LokeshKrishna1995 Ай бұрын
Missed ya and glad to have you back!
@melonl0rdme
@melonl0rdme Ай бұрын
Thanks TJ for making these videos
@ranjithkumar-xt2zw
@ranjithkumar-xt2zw Ай бұрын
Thanks Teej for continues posting videos during holiday season
@code_like_no_tomorrow
@code_like_no_tomorrow Ай бұрын
I recommend mapping T to :tab split as a replacement for o
@Tonich.911
@Tonich.911 Ай бұрын
Best video explanation 👌 👏 🎉
@darkenblade986
@darkenblade986 Ай бұрын
really enjoying the short form content! much more digestible.
@danielmelo389
@danielmelo389 Ай бұрын
Thansk a lot teej, you're the best
@callmetyler
@callmetyler Ай бұрын
Return of the king
@artyshan5944
@artyshan5944 Ай бұрын
Im remapping gt to tj
@Peter-UK-nl6cv
@Peter-UK-nl6cv Ай бұрын
The Return of the King
@__nemesis__1571
@__nemesis__1571 Ай бұрын
Omg thank you so much
@casraf
@casraf Ай бұрын
I would really love if you ever gave a little more insight into how to create & manage floating windows using Lua!
@melonl0rdme
@melonl0rdme Ай бұрын
really helps me to get neovimming haha
@saishkalbag7103
@saishkalbag7103 Ай бұрын
Come ooonnnnn, make another video on code completions
@todd489
@todd489 Ай бұрын
Thanks for the amazing video, I have just been using tmux to split windows before lol
@hvd95
@hvd95 Ай бұрын
This video comes at the right time for me. My neovim are messed up because tons of things on the screen 😂
@workflowinmind
@workflowinmind Ай бұрын
4:30 This reminded me of Donald for some reason
@hvd95
@hvd95 Ай бұрын
Please make a video about floating windows or whatever floating on the screen. Sometimes navigating between those things is a nightmare for me 😅
@oktokt
@oktokt Ай бұрын
even though you are sometimes a tab enjoyer, this video was okay
@zACIIID
@zACIIID Ай бұрын
new tj video lessgoooo
@avramukk
@avramukk Ай бұрын
What headphones do you use?
@moussaadem7933
@moussaadem7933 Ай бұрын
do you think there's a chance vimscript becomes a legacy deprecated language in neovim, once everyone starts using lua APIs
@FilipeAguiarCarvalho
@FilipeAguiarCarvalho Ай бұрын
One thing that I still struggle with neovim is closing a buffer without exiting the editor. I didn't found a good solution yet.
@arcuscerebellumus8797
@arcuscerebellumus8797 Ай бұрын
I use :bwipeout It even sends "textDocument/didClose" to the language server, which gives me some confidence that it was intended as a main way to drop buffers. PS: sometimes you need to force it, though - for example, for terminal buffers. But you can just write a function that adds '!' to the command if you're inside one of those, if you want.
@cacup7
@cacup7 Ай бұрын
You can use the command ":bd" to delete a buffer
@michaelhenderson9851
@michaelhenderson9851 Ай бұрын
I think astronvim closes buffer with space-c. I’ve been meaning to look up their implementation to replicate it in my current config
@vsz-z2428
@vsz-z2428 Ай бұрын
:bw
@FilipeAguiarCarvalho
@FilipeAguiarCarvalho Ай бұрын
@@cacup7 I'll try :bd or :bw using bc to [B]uffer [C]lose. I'll see if I get used to it.
@no_name4796
@no_name4796 Ай бұрын
2:30 why shouod i, as a proud linux cult member, help Windows? /j
@PostMeridianLyf
@PostMeridianLyf Ай бұрын
I'm just now setting up nvim but I'm a little concerned about using plugins and if they will call random api with my code.
@teej_dv
@teej_dv Ай бұрын
plugins can run whatever code they want - just like any other package you install on your computer!
@PostMeridianLyf
@PostMeridianLyf Ай бұрын
@teej_dv that coupled with the auto updating package managers scare the hell out of me.
@the-last-spark
@the-last-spark Ай бұрын
i use neovim in vscode 😭
@FedericoDanielAnastasi-b9w
@FedericoDanielAnastasi-b9w Ай бұрын
Does any one know which font is TJ using in this video?
@vsz-z2428
@vsz-z2428 Ай бұрын
berkeley mono
@akshay6019
@akshay6019 Ай бұрын
Does anyone have the Graphite keyboard layout and use Vim? If so, what is your experience? I just got the Advantage2 Pro and am thinking of learning a new layout.
@sh10150711
@sh10150711 Ай бұрын
I know he is using tokyonight, but mine looks different from his. I did not config anything, and I check the previous videos, he did not either. Anyone know what may be the issue? I actually like this more since it is not too contrasty.
@seffradev
@seffradev Ай бұрын
I think it might depend on which terminal you're using and what mode it's in. Try running `echo $TERM`. I think one you'd prefer to have is TERM set to xterm-256color. But it also depends on your system, and as mentioned, your terminal application.
@isaacalves6846
@isaacalves6846 Ай бұрын
Maybe it's your terminal emulator?
@sh10150711
@sh10150711 Ай бұрын
@@seffradev I use wezterm on a mac. And it is by default xterm-256.
@muizzyranking
@muizzyranking Ай бұрын
Leaving a comment for the algo.
@nightfox6738
@nightfox6738 Ай бұрын
I personally wish a Tab page was a collection of buffers and a window was a collecton of tab pages. It would make things much more intuitively navigable imo.
@danilo2735
@danilo2735 Ай бұрын
thanks man
@ArisTheInquring
@ArisTheInquring Ай бұрын
I've been playing around with tmux and I cant understand why you would use both vim tabs and tmux at the same time since they dot the same things and you crowd your keybinds by having both.
@sp3ctum
@sp3ctum Ай бұрын
I guess if you are using some plugins or background processes that benefit from having everything inside the same neovim process, it might be useful. Also, it might save resources to have 1 lsp server running instead of many.
@cacup7
@cacup7 Ай бұрын
Depends on personal strategy. In my case I love using tmux sessions to manage projects. Each project I open is a tmux session and I find it very useful because each session also means a different cwd that I can interact with.
@jesse9999999
@jesse9999999 Ай бұрын
for each project i work on, i have a tmux session with windows that are configured specifically for the project. for a lot of simple projects, it's just a window for vim and a window for my terminal, but for my job my configuration defaults to: win 1: vim win 2: terminal win 3: database (currently a vim session using dadbod ui, but could be any terminal based DB editor) win 4: REST scripts that i essentially use to replace postman win 5: live terminals, like running the dev server so while i could just have vim with an editing tab and a vim terminal tab, using tmux this way gives me a lot more flexibility and tbh i generally don't like using the nvim terminal. ymmv but to me this is a great distinction between why tmux windows vs vim tabs can be nice.
@picklypt
@picklypt Ай бұрын
I have a plugin to use the same keybinds to move between both nvim and tmux panes
@vivekjha8688
@vivekjha8688 Ай бұрын
@@picklypt christoomey/vim-tmux-navigator?
@tommasobonvicini7114
@tommasobonvicini7114 Ай бұрын
The sad decision of naming a pane "window".
@MrVanshajSaxena
@MrVanshajSaxena Ай бұрын
Its the philosophy that matters, here a window means something through which you look, here which is a buffer.
@tommasobonvicini7114
@tommasobonvicini7114 Ай бұрын
There is no philosophy behind that, it's just naming, bad naming. BTW you look through a tab and a buffer as well: it just doesn't make sense.
@MrVanshajSaxena
@MrVanshajSaxena Ай бұрын
@@tommasobonvicini7114 Yes there is a philosophy, a vim way of doing things, you should read more. Yes, we can look through a tab, but that tab is essentially a single window inside a tab.
@aamodjoshi2281
@aamodjoshi2281 Ай бұрын
2nd
@TurntableTV
@TurntableTV Ай бұрын
"Inside of Windows, we have a bunch of options." Such a Microsoft shill! Unsubbed.
@zybroxz
@zybroxz Ай бұрын
1st
@TheStazis555
@TheStazis555 Ай бұрын
unfortunately hjkl is the only thing that is not ideal about vim: when you change the layout to the better one (like colemak) hjkl just stops working, but everything else work just fine because it is a mnemonical rule, not a positional like wasd or hjkl. But this is minor stuff, good video!
Neovim Tutor: Explained
15:25
TJ DeVries
Рет қаралды 25 М.
curiosity
16:14
TJ DeVries
Рет қаралды 8 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Buffers, Windows, Tabs in Neovim
6:24
Andrew Courter
Рет қаралды 30 М.
The Worst Thing You Can Do For Your Career
13:15
TJ DeVries
Рет қаралды 35 М.
Everything You Need To Start Writing Lua
28:15
TJ DeVries
Рет қаралды 60 М.
Code Formatting made easy
9:47
TJ DeVries
Рет қаралды 23 М.
This VS Code theme is threatening people?
14:26
Theo - t3․gg
Рет қаралды 146 М.
so i tried ghostty...
6:18
ThePrimeTime
Рет қаралды 220 М.
Why Vim Experts Do THIS Instead of Using Tabs...
7:55
DevOps Toolbox
Рет қаралды 156 М.
30 Vim commands you NEED TO KNOW (in just 10 minutes)
10:27
typecraft
Рет қаралды 146 М.
Quickfix can do so much!
6:58
TJ DeVries
Рет қаралды 26 М.