These HIDDEN MOTIONS in Neovim will CHANGE how you work

preview_player
Показать описание
Vim's motions are quite common knowledge amongst avid users, however, instead of customizing hacks to get access to additional types of objects, treesitter can parse them for you!
Not only you can extend any type of object you like, it comes with a large set of defaults to apply actions, motions, swaps and jumps over objects like functions, comments, loops, classes and MANY more!
In this video I'm showing to install, use and integrate the objects as well as exploring additional settings that you want to check out!

LINKS

MY FAVOURITE GEAR
* If you enjoy my content, using the links below will help me with a small commission, so thank you!

CONSIDER SUPPORTING THIS CHANNEL

MY KEY LINKS

⏱ Timestamps
00:00 - Intro
00:58 - Treesitter text objects
01:35 - Selecting
04:34 - More objects
05:31 - Configure more
07:00 - Moving
09:07 - Swapping

#neovim #vim #productive #program #dev #devops #software #softwareengineer #sysops #linux #terminal #console #cli #keyboard #commandline #sql #database
Рекомендации по теме
Комментарии
Автор

This editing is next-level. Thanks for going the extra mile to cover these advanced topics with such depth. Treesitter objects are one of those things I have been meaning to learn forever and I already had some crazy realizations just from the default keybinds you showed

dabzilla
Автор

After my man prime, your videos are the ones that I eagerly wait to see the notification of. The moment I do, I stop my work and listen to you and drop a like. You teach me always something new man! Thank you!(have been using treesitter text objects for past 2 months already and they are a game changer!)

hemanthkotagiri
Автор

Everytime I hit one of your videos I end up editing my dotfiles. Love your content mate, thanks!

niln
Автор

These videos are really helpful, thank you!

Redyf
Автор

this was amazing. i finally understand why treesitter text objects are so powerful

staystealth
Автор

This intro's are getting sick + wild video by video🤣 very cool intro btw and video was also so much informative.

ronitgandhi
Автор

These shortcuts for selecting text objects are nice. But I prefer a shortcut for incrementally extending the text object selection until you have covered the area I want. The advantage is that it needs no configuration per language or text object type, and has even lower cognitive load during usage.

Another, killer, alternative is to use the flash.nvim plugin by folke. With that, you can't only move your cursor at lightning speed, but also make treesitter actions like e.g. this: press v to enter selection mode. Then press S to enter the Treesitter mode of flash. Then flash will show you letters as jump labels around _all_ text objects. (The same letter at the beginning _and_ end of each text object.) Then just press the jump label, and you have your selection. It also works with actions like c instead of v. Again, no need for any language-specific or text-object-specific configuration.

CarstenFuehrmann
Автор

Thank you so much, very helpful video 🙏

binhify
Автор

Just discovered this plugin today (which is probably why YouTube is recommending me this video). I reckon it's time to dust of the old config and do some tweaking... Who am I kidding I don't leave that thing alone long enough to get dusty 😂

Teslacoil
Автор

I've always been afraid to change from native vim motions. I like being able to easily transfer my editing skills to wm's and other workstations. But these improved textobjects is something I've always missed in vim. Here's hoping they will become native in the future, otherwise I'm installing this right now :)

ErikOnNoobTube
Автор

I 'm just a noobie, at 55yo, and this is gold.
Thanks for the channel.

maurolimaok
Автор

I feel like most of this can be achieved with "cib, vib, cab, vab, etc.." (for parameters / arguments; essentially anything inside parenthesis) and "ciB, viB, caB, vaB, etc.." (for loops, functions, classes, structs, etc..; anything inside curly braces). It's also more convenient since it's basically just one motion for all the things. However I think text objects shine for things like quickly changing lhs/rhs of an assignment or multi-line comments like you showed in the video and other things that really require language context. Also ciB doesn't really work for non curly brace languages lol

austinevans
Автор

Hi, thank you for your videos. Which keyboard can you recommend? It is important to me that it can be connected both by wire (for a quick response for games), and there via bluetooth (I often connect the keyboard to my laptop, then to the desktop, because the laptop has a dead keyboard. Also, the keyboard should be compact, because I will carry it along with my laptop (that is, 100% of the keys with numpad disappear).

I don't understand keyboards, that's why I'm asking this question here. Is it also possible to buy a clave without engraving? And most importantly with Linux support and to have mechanics.

I was considering Numpy Air 75 or something from Keychron, but I really don't understand this topic. And I would not really like to buy some garbage.

arthurlokhov
Автор

I have a question, in the minute 6:17 when you write a file, the output message shows you only the file name, when normally shows the full path, How can I configure it so that it only shows the file name and not the full path?

yesidev
Автор

I have tried them earlier but was not having an intuitive set of mappings.
Your mappings seem intuitive will give them a shot again maybe this time it stays XD

niksingh
Автор

Awesome stuff. I use fsharp primarily, so I think the support is limited for treesitter.

WillEhrendreich
Автор

Thanks for sharing. (Somehow, I can only watch this video in 720p quality...)

jizhang
Автор

Huh, have been using af motion for ages, didn't realize it's not a native vim motion 😅

CZiNTrPT
Автор

why is the video just 720p? is there some issues with youtube?

a_maxed_out_handle_of__chars
Автор

how did you add blur to your terminal?

akshay
join shbcf.ru