How to prevent RubyMine editor from modifying files - ruby

I'm working with RubyMine 2017.1.3 on Linux and it appears that RubyMine has modified one of my files to better fit its own idea of formatting. That causes distracting changes in the files since I have to inspect the differences (as detected by Git) and see if they are changes that I meant to make or what.
Is there a way to prevent RubyMine from automatically modifying a file? I searched through the settings but I wasn't able to find anything.

Go into Preferences -> Editor -> Code Style -> Ruby and change the settings to match your existing code (e.g. line spacing, tab width, etc).

Make sure to pick the correct boxes when commiting changes.

Related

Anyway to use someone else's neovim/vim keybindings config on VS Code

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.

Mimic Sublime's handling of unsaved files in Atom

Sublime has this cool feature where you can create a new file (or modify an existing one) and close the text editor without having to explicitly save the modifications.
Next time the editor is opened, the unsaved modifications will still be there.
Is there a way to mimic this behaviour in atom?
This functionality is already included in Atom by default now.
Settings -> Core Settings uncheck Open Empty Editor on Start
Set Restore Previous Windows on Start to Always.
Settings -> Packages -> autosave. In package settings check Enabled.
Also, restore will not work in Atom unless at least one Project has been added to the Project pane. You can add anything there. You can just add my Documents folder.
This sublime feature is called hot exit. Although atom doesn't has this feature this package claims to implement it.
Note: I haven't tested it, so I don't know if it really works; be careful in order to avoid losing your work.

How to keep indentation uniform in xcode and eclipse

In our project there are two teams and are using different IDE for development (MyEclipse and Xcode). Is there any way to keep indentation similar in both the IDE, because when we are doing diff it's showing lots of changes only because of indentation.
If they are using the same code base, there should be no differences. If you are comparing copies of the same code base, maybe there are XCode settings that modify tabs when saving code. If you are using Windows with MyEclipse and OS X with XCode, maybe line endings get switched on save. There should be preferences for that, too. There are also preferences for formatting code on save, or you may have plug-ins for cleaning up code. Lastly, there is a preference for using spaces or tabs to indent code.
There are preferences for how code is displayed, such as how many spaces to use for tabs, but this doesn't affect the actual files. So, again, if the same code base is used then there should be no differences. Perhaps you could expand on what you are comparing with what, if this answer doesn't help.

Disable Sublime Text Minimap for a specific syntax

I'm trying to find a way to disable Sublime Text 3's minimap for a single syntax (Markdown) only and I'm not having much luck.
I've found a lot of references to adding "show_minimap": false, to your preferences both here and elsewhere but it doesn't seem to do anything regardless of whether I put it in Markdown.sublime-settings or Preferences.sublime-settings (I am restarting Sublime Text after changing the setting just to be safe).
The View/Hide Minimap menu item works globally but I can't set it for a specific syntax.
In most of the threads I've found I see some people saying that the setting doesn't work for them with other people saying it does but none of them seem to have an answer why and how you might fix it.
Has the syntax for that setting changed or has it simply been removed? I don't see it mentioned in the unofficial documentation.
If it does (still) exist is it something you can apply to a specific syntax or does it have to be a global setting?
Thanks!
I've tried both "hide_minimap": true and "show_minimap": false (alone and in combination) with ST2 2.0.2 and ST3 Build 3056 on XP, and nothing seems to work. I don't know the versions/platforms the answerers/commenters on your linked questions were using, but it seems that either the behavior was somehow removed recently, or it's platform-specific (maybe a little of both). I went back through the changelogs for ST2, ST3 Public Beta, and the ST3 dev builds and found a number of references to the minimap, but nothing to indicate that the functionality you're looking for had been removed intentionally.
We don't know if it makes a difference to the developer, but the community maintains an issue tracker on GitHub for things like this. Feel free to submit a new issue, with as much information as possible about what you've tried and the platform(s) and version(s) used, and we'll see where it goes.
If you're the plugin-writing type, there theoretically is a way around this, though. You could write an event listener that checks the scope of any newly-opened files, and if it matches text.html.markdown (or whichever type(s) of file for which you'd like to have the minimap hidden), it could execute the toggle_minimap command, which is what is fired when you select View -> Hide Minimap.
I'm working on that plugin, but it's not coming along very quickly. I'll report back if I can get it to work.
In OS X, Sublime text 3 try:
CMD+`
In Windows perhaps:
CTRL+`

P4Merge forgets my comparison method preference. How do I set a default value?

When running P4Merge, the comparison method is always initially set to 'Recognize line ending and white space differences' (aka all changes). I want to use 'Ignore line ending and white space length differences', but I have to manually re-set this every time the tool runs.
I have changed the setting:
with the toolbar button
in the preferences dialog
on the File menu
and it never sticks. In fact, the preferences dialog entry is reset every time I go back to the menu, without even closing the program. I have changed the setting before using the Exit command from the File menu and before closing the window, and also before saving a merge.
In the past I was able to save my setting and have it be remembered, unfortunately I don't have any recollection of the software version involved. I was using P4Merge as standalone and none of the rest of the Perforce suite was installed.
I can update with any other supporting information that might prove relevant.
[Edit: It's the radio button setting in the preferences dialog that ignores changes and resets every time it's viewed, not the File submenu.]
If you are in Unix/Linux, I would blow away the .p4merge directory in your home directory, which stores all your preferences. In Windows, I'm sure there is a similar directory in your home folder. Sometimes things can get out of sorts in that directory, and cleaning it out could help. After doing so, try saving your preferences again (do it via Edit -> Preferences to change the defaults) and restarting p4merge.
If that doesn't work, it could be a buggy version.
It looks like this issue was fixed in 2013.3. I ran into this issue, updated to the latest version of P4, and the problem was resolved.

Resources