Phantom line display in Visual Studio Code IDE - visual-studio-code

In VS Code I have a tab with a plain text file I use for scratch while working during the day. I place all kinds code, questions, TODO lists, etc in this file and will reference it from time to time. It's helpful for history purposes.
At any rate, this file has ballooned up to well over 46,000 lines over the years and I'm now seeing this odd phantom line being injected at my cursor. I am unable to select it or remove it. I thought it was being displayed as VS Codes way of letting me know that a software update was available but when checking that was not the case. This is what it phantom line looks like, it seems to contain a history of CSS classes used over the years which is odd.
If I restart VS Code it goes away for a little while but then reappears. I have a feeling it might be because of the number of lines or perhaps memory but can't say for certain.
Has anyone else seen this behavior? I've probably enabled some setting by mistake and have no idea how to disable it.
Any suggestions would be greatly appreciated. Thank you!

Turns out it was the HTML End Tag Labels plugin that was trying to auto complete some HTML that was somewhere within the 46k lines.
I would have thought by identifying the file as type Plain Text, the plug-in would ignore trying to close HTML tags (since its not an HTML file) but alas that's not the case.
Thank you Mark Ahrens for the tip!

Related

Different indentation in VSCode in the same project

I've always worked in VSCode indenting either with spaces or tabs, but with a size of 3 or more. But, currently, I'm working on a project where everything is configured to work in a size of 2. My issue is I really struggle to read with that size, I can barely identify each line of code and indentations, even with the visual guides that VSCode gives, and it is super uncomfortable to work in this way. I guess I have some visual impairment.
Is there an easy way, to work on a size of 3 or more for development purposes, but keep the files of the project in their original size? I'm looking just for a visual solution.
I couldn't find anything related, the only thing that I can think of now is every time I merge my changes, change the Prettier config, and format everything again, but I guess this could create issues for the maintenance of the repository.
Thanks in advance for your help!
I've found a VSCode extension called stretchy-spaces, maybe it will solve your problem
https://marketplace.visualstudio.com/items?itemName=kylepaulsen.stretchy-spaces

How to quickly format Github reply code block?

Every time when i past some code snippets in Github reply box, it past with weird indentation... which i fix manually every time.. i could possibly indent/format it first in my code editor.. copy and paste directly.. which could work.. however when i am more in a rush.. and copy a block directly from my running code.. it kind of a hassle to format... or even worse when i type code directly there...
is there any browser extension? hide short-cut wizardry that im not aware of in Github to format and indent my reply quickly?
You might want to try: https://github.com/panzerdp/clipboardy, it does look like it keeps formatting not only in GitHub, but also SO and others.
Many other extensions that might be useful here: https://github.com/showcases/github-browser-extensions.

Import docx file with comments into emacs org (vision)

I collaborate with other researchers and frequently have the following work flow:
I write a draft in Emacs org, then export it to docx.
Other authors make edits using track changes and add comments.
I revise the draft in emacs org.
For step 3, I import back the docx file manually, which typically involves:
- Accepting all track changes.
- C&P'ing text back into the org file, making sure that I do not delete markups (pandoc can help here).
- Putting the comments in a list and making todos and further edits; often I write down a note about what I did to address the comment.
I've been looking for ways to make this process better. I found other discussions of this issue, and it boils down to: if you can, have your collaborators edit the manuscript as a text file (not realistic for me, at list not at this point); or do some manual import similar to the one I described above.
So this post is about your thoughts / ideas regarding a great solution to importing back edited docx files that might become reality in the future, and how it could be done.
I think there are two parts here:
How to automatically import back text without destroying markups such as footnotes, references etc.?
How to automatically extract all the notes and integrate them into the Emacs org file?
For the second question, my vision would be to have some sort of comment blocks above the paragraph of the comment, or a list of headlines, each of them representing a comment and a link to the paragraph. A properties drawer would be a great additional feature, it could have one entry for open/closed and one entry for response / notes.
P.S.: I think this is a real barrier to using text-based manuscript writing and it would be a huge step forward if there was a good way. Even more, with all the capabilities of Emacs org, I bet the end result would be much better then revising a paper within word, which is just painful.
Here's how you might be able to do it
assume all changes are properly marked.
assume you know the "base version" of your org file.
assume every marked change comes with a "before" and an "after".
Then, analyze the .docx (same for .odt) looking for marked changes. Ignore everything else. Take the "before" version of each change, turn it into plain text, and try to find the matching element in the org file, then replace that text with the "after" version.
For comments, you could probably try a similar approach.
Caveat: I have no idea how easy/hard it is to find the marked changes, extract the "before/after" info and turn it into plain text.
Oh, and this will probably only work acceptably for small localized changes, e.g. the kind of thing you might get from a reviewer. For things coming from another author who may end up making larger changes and reorganizations it'll probably break down miserably.

Any method to restore garbled/distorted text file by Matlab?

I got a very weird situation that highly needs your assistance. I appreciate your effort and time in advance.
I have a machine which produces a text file that records some information of the machine's working status such as, the coordinate of the drill head and the rotating speed used at that position. While we examine the text file, it appears to be unreadable because most of the contents are garbled. Please see the attached figure. http://ppt.cc/sA1I
If I open it with UltraEdit I see: http://ppt.cc/TrnV
As you can see some part of the file is readable; however many unrecognizable characters, which should be those numeric values we want.
Two reasons that I believe this problem should be solved by Matlab. First, I am sure this machine has many built-in matlab code inside for analysis purpose. Second, we have a .exe file, which is compiled by Matlab, can restore the garbled text file into arranged and readable format (the values of the coordinates are restored).
We desperately want to see the contents of this file by ourselves. Please kindly provide solution or idea or any direction for me to solve this issue.
Sincerely,
Old question without answer: For the record, a suggestion.
Sounds like a case of Mojibake, a problem with text encoding. Here's how I solved it.
Background: I had text files created on a Mac, others on a Windows, others still on Linux, each in different text encoding. So I got a text editor that would allow me to view the format and to change it. In my case, I used TextMate on MacOS, opened the files, picked the correct encoding upon opening, which sometimes was a Windows format, a Mac format, sometimes a Latin format -- had to use trial and error to figure it out based on a preview this particular piece of software gave me. Once I had the file opened in the correct encoding, I would save it in the utf-8format, which is not platform-specific and allows me to move my text files across various computers.
There may be more scalable methods, but I only had a hundred or so files to deal with, so I opted for the manual method, in order to personally visualize the rendering on screen, and because my files came in different encoding to begin with.

Automatically generated R file

My eclipse project has one glitch and one glitch only which is a line of code in automatically generated R file.
How do I find the associated error be it in layout of my resources or in my values strings? I don't know where the error or disfunction is from in the R file.
Please help and advanced thanks to anyone who answers.
Thanks
Check your eclipse Problem or Marker tab, which will tell you exactly which xml resource or image have problem.
I have had this issue on many occasions and sometimes the warnings or error markers do no point to any specific issue.
It could be a letter has been typed in a resource file such as strings.xml or incorrect syntax in one of your layout files.
The most thorough approach, and one that I have had to do when I have exhausted other options, is to go over each of your resources that you have edited since it was last working correctly and look for things like a missing semi-colon or an incorrectly placed letter.
Check your resources such as your layout files, your color and string resources. Any of your .xml files could have an issue with them so check them all. More often than not it is something miniscule so don't give up looking.