Zerobrane Output Window truncates output displayed - debugging

I have been unsuccessful in discovering how to force the "output window" in Zerobrane to show the entire output. My setup is inserting a CR at about column 80 followed by a few characters and ... on the next line. My dozen searches for various key words has not produced a solution. Any solutions to this issue? I'd think some configuration option might set this up but ????.

I don't see any truncation in v1.30 or v1.40 of ZeroBrane Studio (I've tried with lines of up to 10,000 characters in length). You may want to upgrade if you are using some of the older versions.

Related

How can we configure VS2012 to auto format <tabset> and <tab> elements used in Angularjs-ui?

We have tried on two machines now to set up VS2012 to recognize the <tabset> and <tab> elements. If we wrote our own directives we would probably need to get it to recognize others. We go to the formatting /validation menu. Set up everything but then when we try to format the code it still does not seem to recognize the new elements we added. Are we missing something. Has it been done by others ?

How to make Intellisense in Visual Studio 2012 not to substitute text right to the cursor?

While programming I often realize that I need to add something before already typed code. For example I type the name of the variable:
input[0]
and then I realize that my array is of type string and I need to convert it. So, I move to the beginning of the word (with Ctrl-Left Arrow) and start typing
Convert.To|input[0]
with pipe used to show the position of my cursor. I get some suggestions from Intellisense, including the ToInt32() method I am looking for. But as long as I confirm this suggestion with Tab or Space, I get the following:
Convert.ToInt32(|)[0]
So, the text from the cursor position to the end of the word is substituted with suggestion, and this is definitely not what I want.
This problem is not specific for VS 2012 and might be due to some extensions I have installed, but my attempt to pursue its origin did not yield anything. I have following extensions installed: ReSharper, PowerCommands, Productivity Power Tools.
If you are entering an unrelated expression before an identifier, add a space before you start typing the new expression. This will prevent the completion from replacing the existing identifier.
For example, if | marks the caret, the following scenario would avoid the problem you are facing.
Convert.To| input
This code completion feature is designed to prevent the insertion of incorrect identifiers. If Visual Studio behaved like some other IDEs I know of, using the code completion feature in your original example would result in the insertion of ToInt32input, which would never be valid.
If you are interested in additional thoughts regarding this feature in general, I have described this as the Extend (default for Visual Studio) and No-extend (default for NetBeans, Eclipse, and others) modes in my blog article Code Completion filtering, selection, and replacement algorithms.
A two years later answer. But it might still be useful for some.
What helped for me in VS2015 (which might also work in VS2012) is to add the a space character to the list of 'Member List Commit Characters' in the Intellisense settings.
After this the characters after the cursor are not removed by an auto-completion.

WinMerge: How to compare files with the same content but different encodings?

Motivation: I am rewriting a doc -- text files to be processed later. The new sources now use UTF-8. Large portions of the sources are the same. I need to find differences.
Details: The old doc sources use the cp1250 encoding, the new sources use the UTF-8. Both new and old sources use the same line endings (CR+LF). I am using the Unicode version of the WinMerge application (WinMergeU.exe), version 2.12.4.0.
It almost works, but... When the lines differ, they are initially marked as block by the dark yellow, and the different portions are marked using the lighter colour. When moving the red block cursor there, the panes below show the different part.
However, the block of text is marked by the dark yellow also in cases when (the Unicode representation of) the text is the same. The red block moves also to those portions of the files. In such case, the two panes below (that show the differences) containt the same text and nothing is marked as different. See the picture below:
The very first line differs -- this is OK. But the second line has visually the same content. The only character outside of the ASCII range is Ú there. It has a different representation in the encoded sources. This causes the line marked as different, but the panes below does not mark anyting at the line as different.
See also the following paragraphs that are exactly the same (only the encoding in the sources differ, the same line ending is used).
It looks as if the initial comparison were based on binary representation of the lines. Is there any setting to tell WinMerge that the comparison (I mean the block marking) should be based on Unicode content?
I tried hard, but no luck, yet.
Update: The above question was for the latest stable 2.12.4. The beta version 2.13.22 works just perfectly for me. See my answer below.
This doesn't really answer your question about WinMerge, but have you considered using another diff program? One of my favorites is kdiff - http://kdiff3.sourceforge.net/
When I do a compare on KDiff using one UTF8 file and another Unicode file, I get the following:
Here is the compare screen - note that the encodings on the files are different, but the files are considered to be equal from a text standpoint:
I think it really should not be the task of a merge tool to allow the merging of files stored in different encodings.
An encoding is a function that maps bytes (stored on the disk or in memory) to characters (displayed on screen). Unfortunately, by default the encoding of a file is not stored together with the file. Therefore, any program that wants to open the file and display its contents needs to guess the encoding. While this sometimes works, it is also an error prone procedure.
Now, the character sets of different encodings do not overlap in general. So what is the merge tool supposed to do if you merge a character C from file A in encoding X into a file B in encoding Y, if character C is not part of the character set of encoding Y?
Thus, I think the task of a merge tool should be to merge the binary content. Anything else is a dirty hack and damned to fail at some level. (A merge tool maker may decide to provide character level merging, which also might work most of the time. But there is some guesswork involved.)
Therefore, I'd also recommend you first translate the old files to UTF-8 and then merge those with the new versions.
Just for your information. The question was for the latest stable 2.12.4. I have tried the beta version 2.13.22, and it works just perfectly for me. See the difference for exactly the same files -- only the first lines in the files were removed. (My big thanks to authors.)
Edit -> Options
Select 'Compare' from categories pane on left.
Check box 'Ignore carriage return differences' (UNIX, Windows, Mac)
I would recommend converting the files to the same encoding before diffing.
If you are working with a version control system I'd recommend the following:
Create a fresh checkout of the files
Convert all files to UTF-8
Commit the files
Copy your new files over
Use WinMerge
That way you end up with two commits in the history - one for the encoding change and another for the content changes and WinMerge will work as expected.
What about option File -> File Encoding... in WinMerge? It allows to set encoding for files independently.

Creating Tabs in Ruby Command Line Programs

I would like to format data returned from my command line tools using tabs. I am not sure whether the solution is specific to Ruby or MacOS, could you provide an example of how to do this? (Maybe a simple Ruby puts statement with tabbed values) All of my research returned items dealing with having multiple shell sessions in the same window. Thanks
A tab character is represented by a "\t" in strings.
You may still need to do some string size checks for when a string overflows a field. Plus tab sizes are device-/app-dependent, so things will not necessarily align the same way across all viewing mechanisms (editors, terminals, pagers, etc.) if it's just being imported into, say, a spreadsheet, that doesn't matter.
IIRC there are some gems/libraries for doing various text alignment tasks, no references at the moment.

Workaround to allow leading whitespace in IPython

My standard mode of working in Python is to edit a text file while having IPython open in a terminal. I write functions one line at a time and paste them one at a time into IPython. When a line is wrong i correct it in the text editor and then re-paste it.
This used to work well but recent versions of IPython won't accept indented code. One suggested solution is to use the qt terminal, but often I am logged in over an ssh session. Another suggested solution is to use %cpaste but that's two much overhead if you paste one line of indented code at a time (%cpaste at the beginning and -- at the end; 2 lines of overhead per line of code). What I currently do is unindent every block in my text editor before i start working on it, but that's a pain too. Any other ideas? What would be great is if there's a way to put IPython permanently into %cpaste mode, or whatever part of that mode makes it disregard leading whitespace.
See also:
unexpected indent in ipython 0.10.1
https://github.com/ipython/ipython/issues/573
thanks
Just submitted a pull request that should fix this. For large blocks delimited by multiple newlines, %cpaste is still recommended.

Resources