9/12/2023 0 Comments Sublime packages![]() I write my Rails views with ERB-flavored HTML, so Emmet is an incredible time-saver. When I hit RETURN while writing a Ruby comment, DocBlockr will helpfully indent and add the leading # on the next line. This is an install-and-forget-it enhancement to Sublime that saves me keystrokes when writing multi-line code comments. Don’t remember all the options for has_and_belongs_to_many? Just press CTRL-H. Assuming Dash is installed, I can simply press CTRL-H in a Sublime editor and DashDoc immediately opens Dash to show the appropriate documentation based on the cursor position. ![]() I’m a big fan of Dash, which is a programming documentation browser for the Mac. I use to SHIFT-CMD-W (see my key mappings below). CloseOtherWindows provides exactly such a command, which you can activate with a right-click, or assign a keyboard shortcut. It’s easy for tabs to get out of control, so I like to activate a “focus mode” where I close all tabs except the one I’m working on. It keeps a history of all copied text, and allows me to use keyboard shortcuts to browse that history or to cycle through previously copied text. There are system-wide solutions, but Clipboard Manager gets the job done for Sublime Text. Programming involves lots of copy and paste, so I consider clipboard history to be essential. With All Autocomplete installed, all open files are searched for autocompletion candidates. Sublime ships with autocomplete behavior, but it is limited to completing strings that exist in the current editor. (Note: I’m using the Primer theme in these screen recordings.) All Autocomplete Protip: if you prefix your path with the : character, AdvancedNewFile will create the file in the same directory as your current Sublime editor tab. AdvancedNewFile supports tab-completion, so you can quickly expand existing directory names. Just press CMD-OPT-N and type the path (relative to the root of your project) of the file you want to create and press RETURN. This is really useful for Rails, where even a brand new project contains dozens of directories. I use AdvancedNewFile to quickly create files at any level of a project folder hierarchy without needing to take my hands off the keyboard. Of course, make sure you have Package Control installed first! AdvancedNewFile Here are the handful of packages that I consider must-haves for Rails development. You can also peek at my latest Sublime Text settings files and snippets by browsing my dotfiles repository on GitHub. Enjoy!ĭid you know that there is a fantastic online repository and discovery tool for Sublime Text packages? The plugin community for Sublime is huge, and there are more packages being added all the time. I’ll keep this article updated as my Sublime preferences change over time. WordCount - Tells me how many words, sentences, characters I haveĪll of these packages can be installed with Package Control.These recommendations are for Sublime Text 3, which is currently in beta, but stable.TrailingSpaces - Highlights trailing spaces, and provides commands for removing them.Theme – Soda - Much nicer looking GUI theme.SublimeLinter - Linting as you code… bad PHP, CSS, JS, etc, gets immediately marked for me to fix.Puppet - Syntax highlighting for Puppet files.nginx - Syntax highlighting for Nginx config files.Modific - Highlights changed/added/removed lines in both SVN and Git.Highlight - Enables “copy as RTF” which I use when pasting code examples into Keynote for talks.Git - Control a Git repo without leaving the editor.Gist - Lets me publish directly to and puts the URL in my clipboard for code sharing.DocBlockr - Facilitates inline documentation creation including autocomplete.Bracket Highlighter - While over a bracket or parenthesis, it will highlight its matching open/close one.Better CoffeeScript - CS syntax highlighting and other commands.Alignment - Lets me block-align code (so, the equals signs are even, for instance).But the real power comes from the third party packages you add to customize it. It’s fast, keyboard-friendly, and finds a nice balance between a GUI and JSON-driven configuration. I use Sublime Text 3 as my main text editor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |