Visual Studio Code: can't edit LEFT-side file during COMPARE - compare

In Visual Studio Code I open file-VS-file compare mode via:
clicking on the file A and then "Select for Compare"
clicking on the file B and then "Compare A with B"
The problem is that I can edit file B (RIGHT side), but can't edit file A (LEFT side).

Edit: this should be working out of the box in vscode version 1.41.0
It will show Unknown configuration setting but it's working.
"diffEditor.originalEditable": true

like mentioned here.
Open VSCode, open the command palette (on windows it's Ctrl + shift+ P), then type setting and open the Preferences: Open Settings (JSON)
Then you will see something like this:
Paste "diffEditor.originalEditable": true, inside the {}
Example:

Related

Coldfusion Plugin In Sublime text

I just moved from ColdFusion Builder to Sublime Text 3 and now I want to add the ColdFusion plug-in into my Sublime. I have googled it and found one solution that says to add the "Package Control.sublime-package " file to the installation package folder and then restart Sublime.
I did this but am not able to find a "restart" option in Sublime. Due to this I am not getting any changes on my Sublime, regarding ColdFusion.
There is no restart button. Just close and re-open sublime.
edit:make sure you are opening the file as a coldfusion file. In the bottom-right corner of sublime, it says what file type is being considered. Changing this to CFML may be your solution.
edit2: removed some bad instructions that were confusing and incorrect
It may help someone else ...
Open the command palette ( CTRL + SHIFT + P on Windows, CMD + SHIFT + P on a Mac) and select Package Control: Install Package . Wait for the list to open and find the CFML entry (subtitled with this github repo github.com/jcberquist/sublimetext-cfml ), then select it to install. Restart Sublime Text 3.

New to Visual Studio - Can't see output

I have to do a programming project for an optimisation class, that has to be written in C or C++. So I'm trying to figure out Visual Studio 2015. I created a blank project, and opened a new C++ file, where I have the following:
#include <iostream>
int main()
{
cout >> "Hello World!/n";
cin.get();
return 0;
}
When I run it, I get a large blank white popup, and nothing else happens, even if I hit various key on the keyboard or wait for several minutes. It looks like this:
If I close the large popup, nothing happens. What Visual Studio refers to as output from build looks like this:
1>------ Deploy started: Project: LinearProgramming, Configuration: Debug Win32 ------
1>Updating the layout...
1>Deployment complete (157ms). Full package name: "53acc796-5708-4314-9034-f2a1f840a4f4_1.0.0.0_x86__eazt3av84y7ym"
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
Could anyone please explain to me what's going on? How can I create a simple C++ project in Visual Studio 2015 and run it?
I believe you selected the "Blank App(Universal Windows)" project template, which is like a Microsoft store application. What you probably want is the "Win32 Console Application" template, which creates an application without its own window (and uses the console for I/O).
This is how I create a Win32 Console Application.
Go to File->New->Project...
Select Visual C++->Win32->Win32 Console Application and name the project.
In the Win32 Application Wizard press the Next > button and be sure Console application and Empty project are selected, and then hit the finish button.
In the Solution Explorer right click on Source Files and select Add->New Item...
Select the C++ File (.cpp), name it, and hit the Add button.
After you change the >> to << add the code above and it should run.
The quick answer is to hit ctrl-f5 to open the console. After running your script and showing your output it waits for you to hit a key before closing the console.
I eventually found the answer to the question which can be seen at How to keep the console window open in Visual C++?

Visual Studio starts application two times (consecutively) [duplicate]

When I press the "Local Windows Debugger" button when working on any basic C++ project in Visual Studio 2013, the console opens and the program outputs, but when the console closes, another console opens, the UI changes slightly and the program outputs again.
Steps to reproduce:
Create a new C++ project
Inside the "Source Files" directory of the new project, create a file named "main.cpp"
Put a basic hello world program into the file:
#include &ltiostream&gt
using namespace std;
int main() {
cout &lt&lt "Hello world!";
cin.get();
}
Save the code and press the "Local windows debugger" button on the toolbar
A console opens, and waits until you press enter
After the first console closes, a new one opens up, and the UI changes:
Edit:
Link to download a zip folder containing the project: Test Project.zip
I had avast deepscreen enabled. To disable, goto avast user interface -> Settings -> Antivirus and uncheck the box that says "Enable Deepscreen"
On a new version of avast you need to uncheck CyberCapture option. To disable CyberCapture you need to open Avast->Settings->General and uncheck "Enable CyberCapture"
I had same problem.
Added exception to "c:\source\" where all my visual studio stuff is located.

Installing MinGW's gdb.exe for Code Blocks

Hey guys I really need help.
I have recently started programming C++ again and I am trying to get Code Blocks up and running but it keeps failing because of this error.
"ERROR: You need to specify a debugger program in the debuggers's settings."
Understandably this means there isn't a debugger program so I have to download one. I tried to find the gdb.exe for MinGW but I can't find it at all. I just end up with the MinGW's Installation Manager and being left confused.
Are there any tutorials about using the MinGW written for beginners or anyone willing to help?
Thanks in advance.
Steps to add gdb.exe
Open MinGW Installation Manager
select package "mingw32-gdb" from the list.
Then select "Apply Changes" in Installation menu.
This will automatically install gdb.exe in the path C:\MinGW\bin.
Please let me suggest you debugger program TDM-GCC. For download and install visit
http://wiki.codeblocks.org/index.php?title=MinGW_installation
Because a debugger program (toolchain) is very complex undertaking, is not standard in Code::Blocks. You must download it and install on Code::Blocks.
Note: It is impossible copy and paste images here. In the case linked page changes, I, or another one, should suggest new link.
However following are instructions according to images and my experience.
Download TDM-GCC from https://jmeubank.github.io/tdm-gcc/download/ click [tdm64-gcc-10.3.0-2.exe] and run it.
In Wizard Action window - Click [Create].
In Select Edition window - If MinGW/TDM (32-bit) is not checked, check it. Click [Next>].
In Licence Changes window - Click [Next>].
In New Instalation: Instalation Directory window - If text box is "C:\TDM-GCC-32", it's okay. If is not, click [Browse ...], and navigate: C:\ > TDM-GCC-32 > click [OK]. Now text box is C:\TDM-GCC-32. Click [Next>].
If a small window appears saying The directory TDM-GCC-32 is not empty! Are you sure you want to install here?. Click [Yes].
In New Installation: Download Mirror window - Click [Next>].
In New Installation: Choose Components window - Check whether Add to PATH box is checked. Actually is checked. Click [Install].
In Installing window - Wait till [Next] become black. Then click it. Even if Instalation Failed window appears click [Next].
In Completing the TDM-GCC Setup Wizard window - Click [Finish].
Go to Code Blocks > Settings > Compiler.
10a. In Global compiler settings window click "Toolchain executables". Just below, find "Compiler's installation directory". If the below text field is C:\TDM-GCC-32, it's okay. If not, click the [...] at the end of the field. In "Select directory" wizard, navigate to C:\TDM-GCC-32. Now "Folder:" should be TDM-GCC-32. Click [Select a folder] in "Select directory" wizard.
10b. In Global compiler settings. Below red "Note:..." find "Program Files" > "Debuger". If text field reads "GDB/CDB debuger : Default", it's okay, click [OK]. If not, click the down arrow at the end of the field > choose "GDB/CDB debuger : Default". Check that text field is "GDB/CDB debuger : Default". Click [OK].
Go to Code Blocks > Settings > Debugger... . In Common window, left list, click "Default". If "Executable path:"'s text field is "C:\TDM-GCC-32\bin\gdb32.exe", it's okay, click [OK]. If not, click [...] button and navigate C: > TDM-GCC-32 > bin > click gdb32 (or gdb32.exe) file > click [open] in "Select executable file" wizard. "Executable path:" should be C:\TDM-GCC-32\bin\gdb32.exe. Click [OK]. Now you can debug your program.
If Debugger does not function, close Code Blocks and restart them.
Regards.
Hey guys I suggest a better way. Download "gdb.exe" from the Internet and copy it to the below path.
C:\MinGW\Bin
It's really works. I did it.

How do I make PhpED preserve line endings/breaks?

Professionally I work with NuSphere PhpED on a Windows computer. Whenever I open a file from an existing project and save it the IDE automatically converts all the line endings/breaks to UNIX.
This presents a problem because it means that I am unable to track my changes in SVN afterwards as it will replace the contents of the entire file instead of just the lines I have actually touched.
I have tried changing the "Default file format" settings between "Unix", "Windows" and "Autodetect"; but regardless of this setting when I open the "Save As..." dialogue "File Format:" is always listed as Unix.
Has anyone encountered this problem before and managed to overcome it?
It may be your particular NuSphere version.
On NuSphere PhpED Professional Version 14.0 (Build 14040, 64bit), when I set "Default file format" to "Windows", the "Save As" shows "File Format" of "Windows".
If I change "Default file format" to "Unix", the "Save As" shows "File Format" of "Unix".