I have my own build system for perl test files, and it works just fine except when capturing input. If I have an open file called, e.g., ~/projects/something.pm, on error the output of the build system will be something like Failed test at /home/username/projects/something.pm line 66.
The regex for capturing works fine, the problem is that sublime thinks that the two files are in different paths, so it opens a new tab, and I just want the open file to be brought up front.
Is there any setting to make this "match"?
EDIT: My .sublime-build file is generated every time I run the build, to support the fact that I may want to run a single test instead of all the file.
I have my own plugin that detects which test I'm using the cursor position and appends that to the command line. It makes no difference though, since the behaviour is always the same, even with a "standard" build.
The contents of the .sublime-build file are like this:
{
"shell_cmd" : "prove $file_path/$file_name" ,
"working_dir" : "/home/username/projects/",
"file_regex": " at (.*.pm) line ([0-9]*)",
}
I've tried replacing /home/username with the ~ character, but for some reason this breaks the build system, and when building I just get a black output panel, with the status bar saying "Building...".
I've found the real problem with a workaround anyway, posted that as an answer.
The problem in this case was that I didn't notice that the main directory of the project (which is generated beforehand), is actually a link to a directory of another user.
This means that if you add a folder to your project and that folder is a link, in the output you'll get the "real" directory, not the link.
Solved by removing the symbolic link folder from the project and adding the destination of the link as a folder to the project and now it works fine.
Related
When I use vscode's apple-swift-format (whose hot-key is Shift+Option+F) to format my code, the result show it doesn't work with the ../../.swift-format.
I set my custom .swift-format as
"indentation" : {
"spaces" : 4
},
but when I pressed Shift+Option+F, I got the result with indentation spaces 2. And this should be the default configuration.
As for the description from https://github.com/apple/swift-format:
For any source file being checked or formatted, swift-format looks for a JSON-formatted file named .swift-format in the same directory. If one is found, then that file is loaded to determine the tool's configuration. If the file is not found, then it looks in the parent directory, and so on.
Besides, I tried to use command-line-tool to format my source code and it works well in expection, with indentation spaces 4.
So why the vscode/apple-swift-format extention doesn't work in expect? Is this is a bug for the extention?
My swift-format tool's version is 0.50600.0.
enter image description here
I recently updated Netbeans from 12.0 to 12.1 on my Ubuntu 18.04 platform and I have noticed that code assistance has stopped working on C header files (*.h). Among other issues:
Selecting a hyphenated name like MY_C_MACRO by double clicking on it doesn't work; it only selects a token from the name ("MY", "C" or "MACRO") instead of the whole word.
Ctrl-clicking on a name doesn't switch to the definition of that name anymore.
Auto-tabbing doesn't work anymore (hitting ENTER brings the cursor to the beginning of the next line instead of placing it below the previous line's beginning.
Typing /** and hitting ENTER doesn't automatically insert the template for documenting the symbol below anymore.
Has anyone found the same problem and know how to fix it?
I am trying to modify a program that was contracted by my company before I came to work there. The program uses a .csv file to contain the product numbers and values based on the product number. It seemed simple enough to remove the old file from the current project, and replace the old file with the new file of the same name. I changed the values in 1 record to make the update to pricing. There were no other changes.
After I deleted the old file by highlighting the file in the project, select delete and then select move to trash. I bring the new file in by dragging and dropping from finder. When the Choose options for adding these files comes up, I make sure the check box copy items if needed is checked. I also ensure that Added folders has the option button Create folder references is selected. Add to targets has my project name and is checked. Then I select finish.
When I try to run the program, I get an index out of range error.
While debugging I found that the columns loaded from the file look like this.
["DDN080120000MG35", "DDN.08.01.20000MG35", "DDN.08.01.20000 HE MG35", "MK28708-2000", "Solid Carbide Drill", "Aluminum", "Internal", "8 X D", "20", "20", "243", "190", "160", "484.00 €", "\"$\t715.60\"\r"]
["\u{1A}"]
The last record of the file doesn't have the ["\u{1A}"] shown just above. I ran the old program in debug and this doesn't appear when I set a breakpoint.
Does ["\u{1A}"] represent an EOF marker that shouldn't be there? Am I missing some sort of compile action that I need to take with the file before I load it? I'm lost. Any help would be appreciated.
The issue wasn't with the code. It was with the difference between Windows and IOS system and how they handle files. The numbers program in IOS was attaching a character at the end of the .csv file that already had an EOF marker on it. Xcode was confusing the original EOF marker from an Excel file as a record in the file causing an index out of range error. The answer was to open the original csv file in TextEdit, make the modifications and saving it back as a csv. Once I dropped it into the project, the problem was solved.
Now my default file type of Visual Studio Code is Plain Text.
If I save a new file with name like a.in, it will save as a.in.txt. I have to change the dropdown to All Files.
I find the same problems in github: 1, 2. However, they seem not solve my problem.
This is not possible in the general case in VSCode.
The issue is that you cannot assign "no extension" to a language, and as per the links you mentioned, the All Files (*.*) option is disabled by upstream (electron).
Therefore, you will either have to remove the extension manually, OR you can create the file first (using the terminal, Explorer, an extension, etc.) and then open that existing file.
There is a way to change the default extension (but not to All Files)
Add the following line to your settings.json
"files.defaultLanguage": "<language>",
Replace <language> with the language of your choice.
Now, whenever you make a new a file, the default file language will be <language>.
A special value for <language> is ${activeEditorLanguage} which is the language of the file last opened (useful if, say, you copy a piece of code from one file to save as another).
Unfortunately, this does not fully answer the question, but provides a partial solution.
I copy a program SAPBC414T_BOOKINGS_01 to new name ZSAPMZ_BOOKINGS_01 in a new package ZBC400_01.
I select all items including INCLUDEs. SAP asks me to rename the includes and I rename them as shown here:
However, after copying I open my program ZSAPMZ_BOOKINGS_01 in my package ZBC400_01 and I am surprised to see all INCLUDEs have the same names as in source program. Why?
Entering a new name in the popup with includes is not enough, you also need to select all the lines of the includes you want to copy before you click the Copy button.