Highlighted
Super Contributor.
Super Contributor.
235 views

How can I hide left margin?

Jump to solution

At this time, I don't need the left margin, so it's currently loss of workspace to me.

So far, I couldn't find an option yet to hide it.

Can the left margin be hidden in Micro Focus option settings?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How can I hide left margin?

Jump to solution

Currently, the left margin cannot be hidden if you are using SOURCEFORMAT(FIXED) or SOURCEFORMAT(VARIABLE) directives. The default for .NET code is VARIABLE and the default for native code is FIXED. Using these formats the COBOL Area A begins in column 8 and the comment indicator is in column 7. The margins containing characters 1 thru 7 will always be displayed. 

If you change the source format you are using to SOURCEFORMAT"FREE" then the concept of Area A and B goes away and you can begin coding in Column 1 and then the margin will not be displayed. You can change the source format directly in the Project Properties page under the COBOL tab.

 

View solution in original post

6 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How can I hide left margin?

Jump to solution

Currently, the left margin cannot be hidden if you are using SOURCEFORMAT(FIXED) or SOURCEFORMAT(VARIABLE) directives. The default for .NET code is VARIABLE and the default for native code is FIXED. Using these formats the COBOL Area A begins in column 8 and the comment indicator is in column 7. The margins containing characters 1 thru 7 will always be displayed. 

If you change the source format you are using to SOURCEFORMAT"FREE" then the concept of Area A and B goes away and you can begin coding in Column 1 and then the margin will not be displayed. You can change the source format directly in the Project Properties page under the COBOL tab.

 

View solution in original post

Highlighted
Super Contributor.
Super Contributor.

Re: How can I hide left margin?

Jump to solution

Ah, I see ... It looks the effect is the same as unchecking the "Show margins" option at Tools > Options > Text Editor > Micro Focus COBOL > Margins.

That's not truely what I'm looking for, I'm afraid, as it still displays the left margin, yet with a white background instead of the lightgray background, so it's still taking up screen ressource and cursor movement action.

I was looking for an option that's rather collapsing the left margin (see animated GIF image attached).

I understand that this is uncommon for COBOL, I know. Particularly as it would hide the comment column. (Yet, the greenish comment code color would still unveil the comments.) I'm just asking if such option does exist.

You know, I don't require the left margin at this time, so I was looking for such option because for me, at this time, the left margin is merely a nuisance due to the cursor movements I need to perform using the arrow keys in almost each line to exit the margin. This is particularly true with (yet) empty code lines.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How can I hide left margin?

Jump to solution

You could try scrolling the horizontal scrollbar on the editor past the margin. For the most part it seems to stick and not go back to the beginning while editing code.

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: How can I hide left margin?

Jump to solution

Nice Idea 😁😊

If your workspace is larger than a few dozen columns, though, there will never be a horizontal scrollbar.

I tried your suggestion just for fun and noticed that the behavior you suggested is only temporary (as I would have expected). As soon as the cursor enters the left margin (e.g. hit <END>, <ARROW RIGHT>), the editor viewport scrolls along.

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Feature Request: Lock/hide left margin

Jump to solution

I think I put a wrong emphasis to my quesion. I't less about hiding it visually than rather locking it for cursor movement, just like the Visual Studio left margin, which is generally used to show break points or line numbers.

The following animation depicts the currently redundant keyboard action that's required for escaping the cursor from the left margin.

The left pane depicts the current situation whereas the right pane depicts the desired situation. I emphasized redundant keyboard hits in red (on the left).

Micro Focus COBOL - Lock left margin_.gif

 

Tags (1)
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: How can I hide left margin?

Jump to solution

Today I noticed that all I was missing was to execute "Edit > Advanced > Format Document" after switching to the "FREE" source format you suggested.

After executing Format Document, the leading margin characters were automatically removed and (eventually) I recognized they are redundant in FREE source format mode (in contrast to the other modes).

Lesson learned.

Thanks a lot, Chris, for your very valuable suggestion! 👍

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.