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.
Related
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)
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
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.
I've started using F# with the visual studio shell and I like the capability to be able to send lines to fsi by highlighting them, but the alt+Enter shortcut is really awkward and I would be much happier with this being on shift+Enter. (mainly since shift+ up/down arrow is select lines already)
Does anyone know how to change this? Thanks.
You can alter the keyboard mappings within Visual Studio. If you go to Tools -> Options -> Environment -> Keyboard, you'll see a window like the image below.
In order to check existing bindings, place the cursor in the "Press shortcut keys:" box and hit "Shft+Enter". You'll then see any potential conflicts in the drop-down box as shown.
In the example below, I'm searching through Global, which means shortcuts for anything in the application. You can switch it to be just the console or whatever you like.
Once you're happy with the shortcut you want to use, you need to select the command from the window containing all of the Action.* lines and then press Assign.
So I don't mean to be trite, but have you tried mapping the key?
So for F# Interactive I see Alt+Enter mapped to:
ClassViewContextMenus.ClassViewMultiselectProjectreferencesItems.Properties
Have your tried mapping Shift+Enter (or whatever) to that command?
Tools->Options->Environment->Keyboard
You should be able to get it all working from there.
Is there anyway to disable the rather annoying feature that Visual Studio (2008 in my case) has of copying the line (with text on it) the cursor is on when CTRL-C is pressed and no selection is made?
I know of the option to disable copying blank lines. But this is driving me crazy as well.
ETA: I'm not looking to customize the keyboard shortcut.
ETA-II: I am NOT looking for "Tools->Options->Text Editor->All Languages->Apply cut or copy to blank lines...".
The real problem you probably experience is that you go to paste, with CTRL+V. And you accidentally type CTRL+C, and end up overwriting the stuff that's on your clipboard. You can't disable this as far as I know, however, the work around for this, is that you can press CTRL+SHIFT+V multiple times to go back up the stack of things you have copied in visual studio. Not only does this allow you to recover what you originally copied, but you'll also find that CTRL+SHIFT+V very useful in a lot of other situations.
If you aren't willing to customize the keyboard settings, then Ctrl+C will always be Edit.Copy, which will copy the current line if nothing is selected. If you aren't willing to use the tools VS provides to customize the interface, then you can't do it.
However, the following works:
Assign this macro to Ctrl+C:
Sub CopyOnlyIfSelection()
Dim s As String = DTE.ActiveDocument.Selection.Text
Dim n As Integer = Len(s)
If n > 0 Then
DTE.ActiveDocument.Selection.Copy()
End If
End Sub
There's an extension called CopyOnlySelection for visual studio 2019 and 2017:
https://marketplace.visualstudio.com/items?itemName=KiwiProductions.CopyOnlySelection
This won't solve it immediately, but will add another command called Edit.CopyOnlySelection, which you can bind to Ctrl+C (and remove Ctrl+C from the normal Edit.Copy).
I'm pretty sure the way to do it in 2008 is the same as the way in 2005... check out this tutorial on 'customizing keyboard shortcuts' (about 1/3 of the way down)
http://msdn.microsoft.com/en-us/library/bb245788(VS.80).aspx
I don't believe it is possible to do this without some type of 3rd party clip board manager that would prevent you from overwriting the clipboard content with the empty string.
I've the free SlickEdit add-in installed, and its CommandSpy feature shows that Ctrl+C executes Edit.Copy whether you've got text highlighted or not. Therefore I guess the answer to your question is No.
However, I do remember this feature annoying the hell out of me when I first encountered it; now I rely on it and get annoyed when I try the same trick in other programs and nothing happens.
I have the same problem, but I found a workaround of it.
When I click one time on word in text editor, all occurrences of it are highlighted.
Then I think I will copy this word. But double-click will select text to copy only.
I copy then whole line instead wanted text.
Problem Is: Color of highlighted text parts are very similar to selected text.
I changed these colors to make it easy to distinguish between the situations.
Tools -> Options -> Environment -> Font and colors -> Selected Text
Tools -> Options -> Environment ->Font and colors -> Highlighted references
This is fixed in the latest preview of VS2022 (17.4.0 Preview 3.0)
It now has the option: 'Cut or Copy the current line without selection' and I can confirm that it works.
As for the original question, I don't think it will be fixed in VS2008 :-)