![]() When I'm using TextMate, I'll use Control-Command-T (brings up the "select bundle item" window), in which I can type part of the command and TextMate will filter the list until it finds the one that matches. ![]() There's also a Prototype/Scriptalicious bundle if you're going that way. I bring this up because there's a good chance your Rails project is using jQuery. Of the topic of Ruby/Rails a bit, there's also a really good jQuery bundle. Also "Partial From Selection" is another killer feature. The Rails bundle is worth it for the migration snippets and association snippets alone. If you're into HAML there's a bundle for that too, or the Formtastic bundle if you like to use that for your forms. There may be one for your fixture framework too (I know there's one for Machinist, don't know if there's one for FactoryGirl). In addition to the Rails bundle, there's probably a bundle for your unit test framework ( Shoulda, RSpec), and there's also one for Cucumber (if you lean that way). I've read this question on SO: What are some useful TextMate shortcuts? but I was wondering if there was something a bit more specific to Rails development. What are some good keyboard shortcuts and plugins that I should be aware of for TextMate with specific reference to Rails Development? So I was hoping to hear from other Rails developers out there: Looking around the net, I was a bit overwhelmed by the amount of shortcuts and plugins available. I've noticed some of the other TextMate users I've come into contact with using heaps of nifty keyboard shortcuts and other plugins to help make their dev environment more friendly. So far I've added a few TextMate bundles like Git Bundle, Project Plus and the theme from Railscasts. I spend most of my time in TextMate so it seemed like a great place to start the optimising. We also took a brief look at how to use the auto-suggestion plugin once it has been installed.Working on Rails code for a bit has started me on the spiral into obsessively customising my dev environment (I say obsessive as at the last Rails meetup I went to there was some guy who was raving about shaving milliseconds off each line of code and therefore upto half an hour a day. The most important step is to add the plugin to the list of enabled plugins in the ~/.zshrc file so that it starts working. This tutorial was about how to install and use the autosuggestion plugin for Zsh. This is how easy it is to use the autosuggestions plugin on Zsh. To ignore the suggested command you can press the down-arrow ( ↓) key or you can ignore the suggested command and keep typing. To accept the suggestions simply enter the right-arrow ( →) key and the plugin will replace the entered command with the suggested command. After the plugin has been added and enabled, whenever you type in the terminal the plugin will suggest a completed command after the cursor in a grey color. Using the Autosuggestions plugin is very simple. You will see that autosuggestions are up and running. Close the terminal and by pressing Ctrl+D and run it again. The Zsh autosuggestions plugin has been installed. Press Y and hit Enter to save the changes and exit. # Add wisely, as too many plugins slow down shell startup. # Example format: plugins=(rails git textmate ruby lighthouse) # Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Standard plugins can be found in $ZSH/plugins/ Refer to the image below to see what the plugins section looks like in the ~/.zshrc file.Įdit the above text as shown below and add plugins=( zsh-autosuggestions) below the plugins option to enable the autosuggestions plugin. Scroll down in the file and locate the plugins section. zshrcĪbove command will open the ~/.zshrc file. ![]() We are using the nano text editor to edit the ~/.zshrc file by executing the below line. ![]() You can open the ~/.zshrc file in any text editor of your choice. Now all that is left for us to do is to enable the plugin from the ~/.zshrc file that contains all the configurations that will run when the Zsh shell is started. This will add the autosuggestion plugin repository to the plugins directory. Execute the command stated below to do this. To install the zsh-autosuggestions plugin via Oh My Zsh GitHub we need to clone the git repository to the plugins directory. In order to use the Zsh autosuggestion plugin, we are going to have to install it and then enable it from the ~/.zshrc file. We’ll quickly cover how to install it on Debian/Ubuntu-based systems or RHEL-based systems:Īssuming you have fulfilled all the prerequisites, you can install and use the autosuggestions plugin for Zsh. ![]() You can achieve this using our tutorial on Installing Oh My Zsh on Linux. To do this you can use our tutorial on How to Install Zsh on Linux. In order to install and use the Zsh autosuggestions plugins, you must have: ![]()
0 Comments
Leave a Reply. |