Sublime Text Quick Tip: "Go To Definition" Click Shortcut
5:50

Sublime Text Quick Tip: "Go To Definition" Click Shortcut

Corey Schafer 31.03.2015 22 306 просмотров 152 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
In this Sublime Text Quick Tip, we're going to see how we connect a mouse shortcut to the "Go To Definition" command. If you have ever programmed in Eclipse, you have probably used this shortcut a lot. If you're like me, I find myself missing this functionality in Sublime Text. Luckily it isn't difficult to get this setup. ✅ Support My Channel Through Patreon: https://www.patreon.com/coreyms ✅ Become a Channel Member: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join ✅ One-Time Contribution Through PayPal: https://goo.gl/649HFY ✅ Cryptocurrency Donations: Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3 Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33 Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot ✅ Corey's Public Amazon Wishlist http://a.co/inIyro1 ✅ Equipment I Use and Books I Recommend: https://www.amazon.com/shop/coreyschafer ▶️ You Can Find Me On: My Website - http://coreyms.com/ My Second Channel - https://www.youtube.com/c/coreymschafer Facebook - https://www.facebook.com/CoreyMSchafer Twitter - https://twitter.com/CoreyMSchafer Instagram - https://www.instagram.com/coreymschafer/

Оглавление (2 сегментов)

Segment 1 (00:00 - 05:00)

hey everybody how's it going uh I have a quick tip for Sublime Text that I find extremely useful um right now I am over here in Eclipse uh if anybody's everever programmed an eclipse before um you know that they have uh this really nice functionality where you can hold in command and click on a function or method and will and it will take you directly to that definition um it would be nice if Sublime Tex had something like this um they do have some keyboard shortcuts but I really like that uh click functionality uh it's um helps me out with my workflow just to be able to get there a lot quicker um so if I open up Sublime Text here uh you can see that they don't have anything like this if I do control click uh it just does a right click um if I do a command click just creates multiple cursors um so in order to set this functionality up we're going to have to uh create a special file and so if I open up terminal here the directory where we need to create this file is in our home library and then application support Sublime Text 3 and that is in packages and then user so let's go ahead and navigate there and now I already have the name of this file copied to my clipboard and is default space and then these parentheses OSX do Sublime Das mous mat so I'm going to create that file oh and it looks like I need to put this in quotes here okay so create that file and now you can open up this up in any text editor of your choice uh I have a Sublime shortcut here in my terminal so I'm going to go ahead and open this up in Sublime Text oh and I forgot that command is uh just that okay so now I have this file opened up and this is going to be very similar to uh any other of the uh configuration files within Sublime um so we're going to uh open this up here okay and then the first option here is going to be called button and then we want to set this equal to button to button one and actually let me make these double quotes our second value here is going to be count and that's going to be one the next one is going to be called modifiers and this is going to be set this equal to control and the reason we're setting is because like I said before um in Eclipse it's command click to get to the function definition uh but uh command click already has some functionality within sublim it's to make these uh multiple cursers uh so instead we're going to use control so now we only have two more to go uh this one is called press command and set that equal to drag under _ select and then the last one here we actually set the command and the command that we want is go toore definition and let's save that and now I'm going to restart Sublime and go down here and open it back up and now let's see if those changes took effect um okay so that is not working uh let's see if we can find where we made a mistake let's make sure that we put this file in the right directory okay that's where the file needs to go and let's make sure that the files there okay so it looks like whenever I uh left the quotes off the first time it uh put in some spaces here so um uh this there shouldn't be any spaces here between these parentheses um so let's try to move that file and I think I still have this saved on my clipboard so now we'll put this in quotes actually need to take these quotes out here back that okay so that should be good and let's check that okay let me clear the screen and don't save that okay now I'm going to restart Sublime Text again and pull it back up and now let's

Segment 2 (05:00 - 05:00)

see if those changes took effect okay so that works now if we hold in control and click on any of these uh functions or methods uh you can see that it takes us directly to the definition um so that's extremely nice especially in uh whenever you have bigger projects with uh tons of files uh instead of digging through to find those definitions it's really nice just to be able to uh click on those from your imported modules and it have it take you directly to the code um so yeah hopefully this tip was useful for you guys uh you know if you have any questions feel free to ask in the comment section and be sure to subscribe for future tips and tutorials and thank you for watching

Другие видео автора — Corey Schafer

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник