Maximizing Your Efficiency in Sublime Text - Copy/Paste
Sublime text provides two helpful features that will make pasting text a lot easier.
Paste From History
The first helpful feature is “Paste from History”. This exists inside the Edit menu item but can be found using the shortcut command+option+v or ctrl+alt+v depending on your operating system of choice. I learned this using command+k, command+v but I haven’t been able to figure out why it’s different in the menu bar. When you use this shortcut or menu item this the following menu will be displayed:
Then you can use your mouse or keyboard to select the entry you want to paste into the current location.
I find this to be helpful when you’re replacing the same couple strings over and over again and don’t want to (or can’t) do a global search and replace.
Paste and Indent
The next helpful feature is “Paste and Indent”. This exists to allow you to match the current indentation level. For example, let’s say we have code that exists at no indentation and we want to paste it into an existing function with indentation.
If we use the normal paste option (command+v or ctrl+v) it will keep the existing indentation on any of the lines after the first one:
But if we do a paste and indent (command+shift+v or ctrl+shift+v) it will be formatted correctly:
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows