How do I change R's assignment operator to arrow and not equal size - r-markdown

Today during a RStudio session, I accidentally changed the assignment operator in R from arrow to the equal sign. I have no idea how this happened, and now Alt - results in the equal sign all the time. I am on a Mac and my R version is 4.1.1. I am using RMarkdown and only had dplyr and lsa packages installed in this session.
How can I change it back to the arrow operator?
I tried closing and re-opening the file and it doesn't help. Interestingly, the console and R scripts are not affected - this is only happening to RMarkdown

Turns out I had issues with Rmarkdown not seeing the chunks as code but text instead - retyping the block quotes fixed the problem!

Related

How do I paste the copied text in NeoVim integrated terminal while keeping its indentation intact

So I am a beginner competitive coder who just started using NeoVim after using gVim.
So when I copy sample test cases from lets say : Codeforces or Hackerearth.
For instance if the sample text is :
5
RRGRR
Then when I use Ctrl + C to copy from the website and then I paste it in the inbuilt terminal the code is now formatted in a different way as: 5RRGRR
So now the spaces and new lines are removed hence the answers I get are wrong.
Please help me correct this.
This is my first question I have asked so please forgive me for any mistakes I have committed
I have previously tried to use the
:set paste
in NeoVim but even that does not seem to solve my problem.
(I'am a windows 10 user)
Try using ctrl-v instead of p... that works for me

netbeans debugging pretty display string/vector

is there any way, that the debugger in netbeans directly shows me the content of string variables?
Currently, If I press on the small "+" left of the variable name it shows me things like "npos, _M_dataplus, _M_string_length ...". It would help a lot to simply show me the content of the sting instead.
Same happens if I have a vector. In this case it is really a pain to debug variables becaus I always have to search for the content...
(I use NetBeans IDE 8.2)
Thanks
image

Stata do files in Atom (script package)

I am trying to run a do file in Atom (macOS). The script package detects the language correctly but is "unable to run".
Atom is started from the terminal, script works for other languages and Stata is on PATH.
Any idea what might be going wrong?
Just to note, the issue can also be solved on Windows by editing grammars.coffee as well, the default path being C:/Users/*username*/.atom/packages/script/lib/ and changing "stata" to the location of Stata on the machine. Highlighted text also doesn't work, as each line is executed in Stata with quotes around it, meaning Stata will interpret it as a single command name, not as a command with arguments.
Figured it out: .
The code of the script package needs to be modified. In the grammars.coffee file, I replaced both commands of Stata by "/Applications/Stata/StataSE.app/Contents/MacOS/StataSE". Works fine now.
Adding Stata to the path variable is not sufficient (might not be necessary even).
This works for me too — but I use StataMP so updated the filepath as such to /Applications/Stata/StataMP.app/Contents/MacOS/StataMP and things are working fine now.
That said, I'm not sure if script supports this, but when executing a highlighted selection of code in a .do file crashes my StataMP 14.2

Visual Studio 2012: Syntax Highlighting is turning off and on

I'm using VS2012 and I'm quite happy with it. But the problem is, whem I'm coding in C++, that the syntax highlighting is turning off an on all over again. Sometimes, the highlighting is off and I have to reload the file. Also, it highlighting is quite slow.
Does anyone know how to fix it?
I know this is a while ago but I have had this same problem appearing randomly until just now.
It would disable when the last line in a file was a single line comment. (// blah blah). As soon as i removed that the text highlighting worked again!
Edit: In this answer I assume that your problem description is correct. In other words, I'm assuming that occasionally C++ highlighting is working, and the other times the text appears as plain text: completely black and white.
My guess is you are using an extension which modifies or replaces the way Visual Studio highlights C++ code. Try temporarily disabling all of your extensions and checking again if the editor is working. Some extensions might have the Disable button disabled; in that case you'll need to uninstall the extension for this test (possibly through Control Panel → Programs and Features).
As an example of one common extension that completely replaces the C++ highlighter is Visual Assist. However, I do not personally use that product and I haven't heard of any specific problems with it of this nature. I am merely mentioning it as an example of an extension that completely changes the behavior of Visual Studio in regards to syntax highlighting of C++ code.
For me, highlighting always stops working when the first visible line in the editor begins with the characters '//' and I trigger reparsing somehow (CTRL + S for instance).
Highlighting always works fine when the first visible line in the editor begins with anything else, even with a whitespace, and I trigger reparsing somehow.
I could indent all my comments and never experience this problem, but now that I know about it, it's not so annoying anymore, so I let it be.
This is a bug in Visual Studio 2012:
https://connect.microsoft.com/VisualStudio/feedback/details/760154/syntax-highlighting-sometimes-not-working
If you're using only Intellisense, you may go to Edit->Intellisense->Toggle Completion Mode (or hit Ctrl + Alt + Space), play with it and see if it works (maybe you've pressed this combination of keys by accident).
I've also installed Update 3 and haven't had any problems since. Who knows..
I had the same problem. Disabling the extentions sadly did not work for me.
After searching around and realizing that it only happened on larger files,
I got it to work by turning harware acceleration off.
Tools->Options...->Environment->General
*Automatically adjust [...] (off)
*Use hardware graphics acceleration (off)
In my case, it turned out that a large block of code (a 200+ line method) was commented out with // starting in the first column, and this was causing the syntax coloring not to work. I changed the commenting delineation to /* ... */ for that method and all of the syntax coloring was fixed.
Personally, I found that things like:
#if 0// bla-bla
mess up syntax highlighting badly. The solution that works for is to put a space before a comment, like so:
#if 0 // bla-bla
I installed Visual Studio 2012 Update 3 yesterday and started experiencing the exact same behavior described in the original post. Based on some suggestions in this thread, I took at look at my extensions, and disabling AllMargins fixed the issue. I've since re-enabled AllMargins and everything appears to be working as it should.
Try disabling and re-enabling any of your extensions; hopefully that will fix the issue for you.

Eclipse Debugger doesn't show the value of a long string in whole

I'm using Eclipse Juno to debug a Django app. However, a long string gets cropped when inspecting the variables in PyDev's debugger:
The content area of the variable is scrollable, but the value suddenly stops there with the dots (see picture). Clicking the variable or watching it doesn't help. This is not a huge problem, but is there an easy fix for this?
See discussion and answer here. Essentially, work around the limitation by typing the variable name into the debug console and it will print out in full.
You can change maxlength. It is a Integer.