Disable code autoformatting in Xcode? - xcode

Does anyone know of a way to completely disable any form of automatic formatting or indentation in the current version of Xcode? Essentially, as far as text editing, I want it to behave like a "dumb" editor, e.g. TextEdit or Notepad.

Related

How do you edit Text Editor (not Keyboard) shortcuts in VS 2019?

I know that you can edit the keyboard shortcuts via the Tools>Options>Keyboard, but it seems to be that if a shortcut is selected that's already being used by the Text Editor, VS won't override it. Also, I can't get to the source of where the Text Editor shortcuts are stored to override it at the source. I'm highly irritated by Ctrl+E,V as duplicate line shortcut and I'd like to do away with it. I tried to assign the Edit.Duplicate command to my preferred Ctrl+Down Arrow shortcut. No dice. I tried to reassign Ctrl+E,V to something else. No dice. Nothing I do at the Keyboard level is reaching the Text Editor.
Does anyone know how I can modify the Text Editor's Duplicate command? (as opposed to the Keyboard's)

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.

Keyboard Shortcut Ctrl+B and Ctrl+I in RMarkdown and RStudio

When writing reports in RMarkdown I realized that hitting Ctrl+B for bold or Ctrl+I for italic won't emphasize the text marked. Many other Markdown editors (for example the editor on StackOverflow) do this job.
For the moment I work with Shift+* after marking the text I want to show in bold which returns *text* which would be displayed in italic. However for making something bold I need to do this twice. And returning the action (removing the **) is not possible with this procedure.
Is there a hidden button somewhere in RStudio where I can turn this option on? Or is there some other solution to this problem like a package who does the job?
One way to do it is installing the addin remedy remotes::install_github("ThinkR-open/remedy") and then to map your preferred key combination to the bold formatting offered by the addon.
So, it's a two-step process. First, install remedy, and then modify the keyboard shortcuts (Tools > Modify Keyboard Shortcuts...).
After installing remedy, there should be a 'bold' option for you in the shortcuts' list to make the binding.

Visual Studio-like autocomplete in Vim

Coming from Visual Studio, I've grown accustomed to having automatic autocomplete when I type a non-alphanumeric character:
At this point in time, if I press space (or ), ;, etc.), Visual Studio will assume I want public and will insert it for me.
I'd like this functionality in Vim. The default autocomplete is close (pressing
Ctrl+P while in Insert mode), but I'd like to have the autocomplete dropdown open automatically.
I tried out the AutoComplPop plugin, which pops open the options dropdown automatically, but also requires the user to press Enter to actually insert the selection:
Is there a plugin that provides Visual Studio-style autocomplete functionality? Or is there a way to configure Vim's default autocomplete to behave in this manner?
Just to be clear, I'm not asking about the suggestions provided by Vim's autocomplete (I've found plenty of documentation about adding custom dictionaries), but rather the mechanics of the autocomplete itself.
Unlike <Down> and <Up> which only move down and up the popup menu, <C-n> and <C-p> also insert the selected suggestion so you can just keep typing (a <space>, a .…) without having to press <CR>.
For what it's worth, I've forked AutoComplPop to add PHP and JavaScript support and just hacked in support for the kind of interaction you want.
Fear not citizens, enter YouCompleteMe: finally a good, intelligent code completion plugin for Vim. It's free, fast and will save you lots of time. Couple YouCompleteMe with Supertab and you'll be even more of a coding machine than you already are in Vim. source
https://github.com/Valloric/YouCompleteMe

Turn Off XAML error underlining

This is a simple issue, and I hope someone can help
For reasons I don't think I need to explain, my XAML thinks it has some errors in it in the Visual Studio code editor (which shows as wavy blue underlines across most of my XAML).
Does anyone know how to turn this underlining off in Visual Studio 2012 ?
It's incredibly annoying, and makes my XAML hard to read
Thanks
I would suggest setting the editor for .xaml-files manually.
Go into
Tools->Options->Text Editor->File Extension
Write xaml in the Extension field and choose XML (Text) Editor from the Editor drop down and then click Add.
Your XAML files should now open as ordinary XML files, without error underlining.
You will probably loose a lot of the nice to have features of the XAML editor, but as far as I know (I've struggled a bit with this myself) it is the only way.
Found this on MSDN. There is a specific setting to disable this.
Open the Options dialog by selecting Tools > Options, and then select
Text Editor > XAML > Miscellaneous.
Uncheck the Show errors detected
by the XAML designer check box.
Article from MSDN
It is possible to hide the SquiggleShape by making the surrounding adornment layer hidden or collapsed using the Snoop tool.
To achieve this, the Snoop crosshair tool has to be dragged on the editor window with shift and ctrl keys pressed (keep them pressed a while when releasing mouse button). You should end on some Canvas (with the editor window highlighted), and below there is some ViewStack. Inside, there are some AdornmentLayer, one of which contains multiple SquiggleShape. In the properties section on the right side of the Snoop window, scroll to the Visibility row and select the value Hidden or Collapsed. Now, the squiggle lines are not visible any more.
This involves some manual work, but as long as the file stays open, the squiggle lines are hidden. In principle, it should be possible to write an extension which hides the lines automatically. However, at the moment I don't find the time to do this...
The only decent fix for this silly bug that I can find is right click on the xaml and click open with. Select source code editor (without with encoding). Not a great fix when you consider it gets rid of important errors. But it should help you read it better for the most part.
Another Option for this is to change the color of the line under: Tools > Options > Environment > Fonts and Colors. Change it to the same as the background.
It will turn it off in all other editors also though.

Resources