Identify line and charater number in vscode without cursor pointing - visual-studio-code

We can directly jump to line number and character number in vscode using Ctrl + g
for example 23:7
it will jump to 23rd line and 7th character
how to know character number by just looking screen just like we look line number from left side
I m trying to jump directly to any line any character but character number is unknown

There's an issue for showing column numbers: https://github.com/microsoft/vscode/issues/60537. And apparently it was closed. Even if the feature is implemented, it'll be hard for a human to locate the exact column when your target is far from the column number line, and you still need to use arrow keys or your mouse.
As a workaround, you can add multiple rulers in the editor. For example, when you set "editor.rulers" to [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], you can locate the column approximately by count(rulers) * 10, then move your cursor by ctrl + ← / → (Go to the previous/next word) or ← / →. But your editor will end up ugly with these rulers.
In practice, I don't consider column numbers useful. If you can locate the target by them, the target should be on screen right now and the column range is limited. There are so many ways to move the cursor in such a small range.

Related

Tableau: how to align text in dual axis-ed column labels

I am having trouble with label's text alignment. I used workaround to have rows coloured based on a value of certain row (featured in e.g. this tutorial); for example, if the Status is "Cancelled", it colours entire row red, otherwise it is green.
I created AGG(MAX(1)) columns for bar (with fixed range 0 to 1) and AGG(MAX(0)) columns for text (with fixed range 0 to 0), then paired them through dual axis.
However, I found out the text label is automatically aligned to the centre. I looked into text label options and set my alignment to the left (in both Edit Label window and Alignment setting) but it had no effect whatsoever. I changed Format... settings for column but once again, it had no effect.
I even tried changing fixed range on AGG(MAX(0)) columns or changing the zero in MAX(0) to some other number but this only moved centre-aligned text so it was of no use.
Here is a picture to illustrate my point:
I found out what was the issue and also arrived at better way to do it than the one I described in my question.
Here's the tutorial (using Tableau 2021.4):
Create a column MAX(-1). Right-click the column, go to Edit Axis..., set Range to fixed (start at -1, end at 0), delete the Title, and disable all Tick Marks (by setting them to 'None').
In Marks panel, set the Mark to 'Gantt Bar'.
Drop your condition for coloring (e.g. calculated field) on Color in Marks panel.
Create a calculated field MAX(1) and drop it on Size in Marks panel. This will fill out entire column width with a color bar. If needed, increase the bar width by moving the slider under Size to the right.
Drop the text value on Label in Marks panel. Now you should see text labels. If not, increase cell's height (Format > Cell Size > Taller or Ctrl+Up).
If you want a header (just like shown in my picture), create a column MAX(0), set its Range to fixed (start at 0, end at 0), disable all Tick Marks and change the Title.
Right-click the MAX(0) and tick 'Dual Axis'.
In case you'll encounter some challenges when formatting the end result, check formatting hierarchy (this tutorial may help).

How do you edit the vertical line that line breaks the code in vs code?

I tried setting it in preferences, disabling word wrap, changing word wrap column, trying alt z, but the line is always there and forces the code to wrap into 1/3 of the available space which makes long code hard to read

Add left space/margin/padding in VS Code editor window between line numbers and code

I would love to have some space between the line numbers and the first intendation/code in the VS Code editor window:
I just want to indent the code in the editor without actually adding whitespace in the code.
I tried "editor.glyphMargin", but this will only increase the space on the left of the line numbers, not between the line numbers and the code.
I'm also aware of the "Centered Layout" view, but this also decreases the width of e. g. the tabs for the file selection.
Is there a setting I'm missing or do I need a plugin/custom CSS?
You can try this --
"editor.lineDecorationsWidth": 25,
This increases the space on the right side of the numbers. I haven't seen anything that increases the padding on the other side of the gutter nearest your code.
Opinion --
Ideally, there would be a editor.padding.left like there is a editor.padding.top, but I haven't seen this yet.

Auto frame splitting in emacs

Certain emacs function splits the current frame, for example magit-status or compile (probably there are dozens). How emacs decides whether to do a vertical split or a horizontal one?
My experiments suggests that if the frame's width is larger then 162 chars then it dose a vertical split, and otherwise a horizontal one. Is it the right value? More important, where is this value stored, how can I change this threshold?
split-width-threshold:
Minimum width for splitting windows sensibly. Hide If this is an
integer, split-window-sensibly may split a window horizontally only
if it has at least this many columns. If this is nil,
split-window-sensibly is not allowed to split a window horizontally.
Standard value is 160 here, looks pretty close to what you've found.

Vertical text alignment in Crystal Reports?

In the Crystal Reports editor that comes with Visual Studio (2008) is it possible to align text to the center of a text box rather than to the top?
I can't find the option anywhere and a Google search is not encouraging but I just can't bring myself to believe that they would not include such an obvious feature.
There is no vertical alignment for crystal reports that I could find. A potential work-around is programming line breaks.
I can't find an option to vertically align text within a label, but you can vertically align labels within a section. Use the horizontal guidelines on the left margin to adjust the alignment. You may need to right-click the guideline and un-check "Snap to Grid" to get more precise positioning.
You can achieve this with strings, as you will see a paragraph tab instead of a number tab when you enter the FORMAT FIELD menu. To make your number a string you should format it as a formula field thusly:
chr(13) + chr(10) + totext(mynumber,0)
Then in the FORMAT FIELD menu select - Line spacing: multiple of: 0.2
You may need to experiment with the 0.2 value until you find your number (i.e. string prefixed with a carriage return) nicely centered in the middle of your box.
Cheers,
Chilly
Vertical alignment with programming line breaks. Algorithm for the one cell:
Count the number of characters in data (iTextLen).
Find the number of text lines in cell (iLineNum). Calculated empirically.
Find the row length in characters (iLineLen). Calculated empirically.
Calculate count the number of halfbreaks by formula (iLineNum — 1) — (iTextLen / iLineLen).
#formula in crystal syntax:
Local NumberVar iLineNum:= 5;
Local NumberVar iLineLen:= 30;
Local NumberVar iTextLen:= Length({DataSource});
Local StringVar sRet:= '';
Local NumberVar i;
Local NumberVar iLinesNum:= Truncate(iLineNum - 1) - Truncate(iTextLen / iLineLen);
For i:= 1 to iLinesNum Do ( sRet:= sRet + chr(13) );
sRet
Add formula to the top and bottom of data. Text objects will look like this:{#formula}{DataSource}{#formula}
Font size of #formula must be halved of font size {DataSource}. For example, if the font size of {DataSource} equal to 20, the #formula should be equal to 10:
Algorithm works better with monospaced typeface, but with proportional typeface works in most cases.
Algorithm for multiple cells is differ only that iLineNum will be the maximum number of characters in data of all cells.
in crystal report 10 the label >> right click >> format Text >> Common >> text rotation . choose 90 degree the text will have a vertical alignment
same in a field or any object you add to the report
hope that i help you
note the answer (Format text > tab Paragraph, Horizontal alignment: Centered) is a wrong