![]() ![]() Probably the best thing in Sublime Text is the multiple ways you can customize and extend its functionality. So essentially, if you’re just getting started with a development project you can download the free version from the official website. Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. The licensing of the software is also very reasonable as the Sublime Text website states: What’s more, with just one license you can use Sublime Text on every computer you own, even if they’re running different operating systems! The first thing that you’ll probably notice after a bit of playing around is just how fast it is when opening large files, like SQL dumps or projects with thousands of files. Sublime Text is available for the most popular platforms like OS X, Windows and Linux, so you’re likely to be covered. When you first open Sublime Text you might confuse it for a regular text editor there’s nothing immediately eye-catching about it, and it doesn’t even mention anything about coding, but after a few minutes with it you’ll know that this is the most powerful code editor you’ve ever seen. Here at GavickPro we tested multiple alternatives during our development cycles, including Expresso and Coda, but we fell in love with Sublime as soon as we used it for the first time. Hit Ctrl+ V to replace selection with the matching lines.Sublime Text is a very raw, yet at the same time, sophisticated code editor.Option 1: To get rid of all lines that are not selected Hit Alt+ Enter to multi-select all matches.Make sure Regular Expression matching is enabled ( Alt+ R to toggle).Option 2: To multi-select all lines matching a regexp Hit Ctrl+ L (Expand Selection to Line).Hit Alt+ F3 to multi-select all occurences.Option 1: To multi-select all lines containing a substring You can use Sublime's built-in capabilities to do this in 3 to 7 key strokes (not including the regex to be matched). The syntax is similar to the menu file you just edited: [ ![]() To make the command show up in the Commands Palette, you need to create a file named Default.sublime-commands (or edit an existing one) in the User folder. ![]() This will assign the shortcut ⌃ ⇧ F to this command. To assign a keyboard shortcut, open and edit the file Default (OSX).sublime-keymap on OS X, or the equivalent for other systems, and enter the following: [ See step 11 here for a more detailed explanation why that is. This will insert the filter command call (essentially, filter is transformed to FilterCommand().run(…) for the plugin call and Filter for the menu label) just below the wrap command. Add or set the following text to that file: [ ![]() If a file called Main.sublime-menu doesn't exist, create it. To add this plugin to the Edit menu, select Preferences… » Browse Packages and open the User folder. Save as filter.py in ~/Library/Application Support/Sublime Text 2/Packages/User Integration with UI Sublime.active_window().show_input_panel("Filter file for lines containing: ", cb, done, None, None) # if there's no non-empty selection, filter the whole documentĬlass FilterCommand(sublime_plugin.TextCommand): In Sublime Text 2, select Tools » New Plugin and enter the following text: import sublime, sublime_plugin Adding basic filtering TextCommand plugin You can create new commands (called Plugins) and make them available from the UI. Sublime Text 2 is an extensible editor with a Python API. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |