I have a SublimeText 3 and RubyMine 2016.1 versions installed. When I work with HAML files in Sublime, I have a nice auto-completion similar to this:
As I type h1 and press Tab it becomes %h1, so I don't have to type % symbol.
Tried the same thing in RubyMine and nothing happened.
How can I achieve same auto-completion feature in RubyMine HAML as I had in a Sublime? Is that even possible or should I consider this behaviour as a feature of RubyMine IDE?
Thanks!
I don't think this kind of auto completion is supported in Rubymine.
By the way, even the code completion in HTML templates requires you to first type the < character so that auto-completion starts presenting suggestions, so I guess it is a general intention of the Jetbrains team to require the user to type the special character (such as % in HAML) first.
For a while I thought you might be able to add this functionality using Textmate Bundles import (Textmate bundles use the same format as Sublime bundles), but it appears that only the syntax-highlighting rules in them are supported in Rubymine. So this approach probably won't work either even if you managed to find a bundle with the auto completion feature for HAML files.
Related
I have just migrated from Atom, there, I was using Vim-plus but now on VS Code I have switched to neovim, but the problem is, there are many conflicting keybindings.
I tried to change them manually (something like, to close editor, 'Ctrl+c+t', which I mapped to close editor's tab, similarly others).
But I feel that's very unproductive and also can cause strain in my fingers. So any suggestions, or keybindings config of anyone which I can use alongside the NeoVim to increase my productivity. Or any other suggestions how to properly configure my VS Code?
NOTE: I know about the existence of an Atom Keybindings Extension which I honestly don't care, as I was mainly using Vim keybindings there and never bother to learn atom specific keybindings.
If you want VS Code to act like VIM, which is super unique in its interface and keybindings, there is an extension called:
VSCode Vim
VSCode Vim's Marketplace ID: vscodevim.vim
Personally I can't stand the VIM keybindings, so I don't know how great the extension is, but I know people who use it. It has 2.4 million downloads and counting. I also know, because of my buddy, that its not perfect, but it's close.
As with any other extension, don't just install it and hope it's what you wanted "out-of-the-box", this theme is customizable, and requires you to configure it. Make sure you read the README.md, and set it up so you know that it is best suited for your expectations.
If you are already using the VSCode VIM Extension, and you find that you are having conflicting issues using the keybindings associated with it. You can troubleshoot them using the keybindings troubleshooting tool by selecting it from the quick input menu.
Press F1
Type the phrase: "Keyboard Shortcut Troubleshooting"
Select the option "DEVELOPER: Toggle Keyboard Shortcut Troubleshooting Tool"
The tool should open in the console below. The menu might look like gibberish at first, however; the output of the newly opened console should make more sense once you use a familiar keybinding. Make sure that the console window is scrolled to the bottom and opened wide enough so your able to read everything logged. The tool will tell you what is attached to the keybinding your using, so you can see any conflicts that are happening, and what the key is set to do by you, by extensions, and by default.
Make changes to your keybindings.json file as necessary.
Xcode code formatter Swift
I'm trying to auto format my code written in Swift. It's necessary if you're working in team and using CVS and don't want to merge for hours.
Ctrl+I just makes an indent, but for example i want to have proper space between functions and just all the stuff like in Clang.
The reformat code command in xcode is Ctrl-I, not Cmd-I and it appears to work just fine.
I write a extension app about format Swift code: Swimat
There has two way to install
brew cask install swimat
Clone this repo, build and restart Xcode.
See https://github.com/Jintin/Swimat for more information
In Xcode [Objective-C, Swift]:
1) ⌘+A: highlight code
2) ⌃+I: reformat code
⌃+i: reformat code
Ctrl+i: fix code indentation
Eventhough it has good IntelliSense, xcode sucks at code formatting generally.Wish it was better.
Apple has to spend so much effort in this in order to make it VS level good.
Xcode and Swift 2.0: Per file, Cmd-A then Ctl-I. Ctl-I works for what is highlighted, Cmd-A highlights all. Just be careful not to accidentally delete all your source after the Ctl-A!
SwiftFormat is a popular code formatter for swift. It has an extension for Xcode, which can be accessed from the Editor menu.
Quote from the SwiftFormat readme:
SwiftFormat is a code library and command-line tool for reformatting
swift code on macOS or Linux.
SwiftFormat goes above and beyond what you might expect from a code
formatter. In addition to adjusting white space it can insert or
remove implicit self, remove redundant parentheses, and correct many
other deviations from the standard Swift idioms.
(I know the question says Xcode but)
personally this is another reason to use AppCode alongside Xcode.
While Xcode only fixes the indentation for Swift code, as mentioned in the question, AppCode at least handles spaces too. Somewhat relatedly it removes indents from empty lines by default.
AppCode's Swift support definitely isn't perfect yet and you still need to check the code in both, but it's still worth it because of better navigation and things like this.
The command in xcode is ctrl-i to format code, not cmd-i.
I would suggest using sublime text with the swift plugin, which will allow you to hotkey the code formatting.
https://sublime.wbond.net/packages/Swift
Select lines, then press Ctrl+I.
I am use Aptana Studio 3 for Ruby on Rails development. The project I am working on uses Slim (http://slim-lang.com/). I was hoping to find editor and formatting support for the slim file type. So far my Google search have some up empty.
It could be a poor solution, but Sublime (http://www.sublimetext.com/) have a template for Slim. Using the Package Control (https://sublime.wbond.net/) you can install it easily.
This isn't perfect, but you can get HAML syntax highlighting for slim files in Aptana Studio:
Open 'Preferences' (on Mac under 'Aptana Studio 3)
Goto 'General' > 'Editors' > 'File Associations' (or search for 'File Associations')
Click 'Add...' to add the '*.slim' file type
With the '*.slim' file type highlighted, select 'HAML Editor' from the list of 'Associated editors'
This at least gives you syntax highlighting for strings, symbols, some keywords (if, yield, etc.), and HTML id's and classes.
The bigger win for me is that the HAML Editor uses the better built in search that allows you to search the current file, open files, enclosing project, or the entire workspace. Before making that change a much more limited search was the default for slim files.
I'm a pretty heavy user of colon hashes but the default Aptana Studio Ruby doesn't provide any highlighting for them.
Here's a colon hash in Ruby 1.9:
{ animal: "duck" }
Does anyone know what bits I need to punch to make the "animal:" part display in another colour?
Update:
It seems from reading the source that the PLists file isn't being used by Aptana and that the feature is presently incomplete.
https://github.com/textmate/ruby.tmbundle/issues/17
I've tried changing the scopes in source but it doesn't seem to update for me.
To find the scope Aptana is trying to highlight
Commands -> Bundle Development -> Show Scope and Matching Theme Rule (alternatively the default shortcut is Ctrl+Alt+P)
Read the box. It may list several scopes.
The way you add a scope:
Window -> Preferences
Select Aptana Studio then the Themes option.
Press the + button next to the Scope Selector textbox.
Add your scope and set the colours.
Apply and click OK
I'm all out of ideas. Hopefully this will help someone get closer.
Aptana Studio 3 uses TextMate themes for syntax highlighting, so you just need to find a TextMate theme that supports it.
I was wondering if there was a Ruby IDE for ubuntu linux 64 bit. I have checked around a bit and found Aptana studio but it will not actually install just launch from a folder. So any suggestions guys?
I have tried several (Aptana, redcar, etc.) and always go back to using gmate, which is a set of plugins for gedit. It includes several themes like textmate and railscasts.
It allows you to extract partials, display the directory structure and class definitions in the side bar and comes with loads of autocomplete snippets for common tasks, such as:
typing end and pressing tab when editting an erb file results in:
<% end -%>
I also recommend the tabextend plugin which allows you to close all tabs at once, middle click to close a tab and close all except the tab in focus.
Installation instructions here: http://maketecheasier.com/transform-gedit-into-a-web-developer-ide/2010/12/29