New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move MARGIN/VMARGIN to iTermAdvancedSettingsModel #316

Merged
merged 3 commits into from Dec 11, 2016

Conversation

Projects
None yet
@jcs
Contributor

jcs commented Dec 4, 2016

A mostly mechanical change of MARGIN -> [iTermAdvancedSettingsModel terminalMargin] and VMARGIN -> [iTermAdvancedSettingsModel terminalVMargin] to allow these to be adjusted by the user (or to easily change the defaults from 5 and 2, as per #283).

It would probably be nice to move these to per-profile settings so different profiles can have different margins, but these values are used in so many places that make it hard to reach the current profile settings.

@@ -134,6 +134,8 @@ + (NSString *)name { \
DEFINE_BOOL(indicateBellsInDockBadgeLabel, YES, @"General: Indicate the number of bells rung while the app is inactive in the dock icon’s badge label");
DEFINE_STRING(downloadsDirectory, @"", @"General: Downloads folder.\nIf set, downloaded files go to this location instead of the user’s $HOME/Downloads folder.");
DEFINE_FLOAT(pointSizeOfTimeStamp, 10, @"General: Point size for timestamps");
DEFINE_INT(terminalMargin, 5, @"General: Terminal Margin\nHow much space to leave between the left and right edges of the terminal.");

This comment has been minimized.

@gnachman

gnachman Dec 8, 2016

Owner

Add this text to both terminalMargin and terminalVMargin at the end of the description, please:

You must restart iTerm2 after modifying this property. Saved window arrangements should be re-created.

@@ -134,6 +134,8 @@ + (NSString *)name { \
DEFINE_BOOL(indicateBellsInDockBadgeLabel, YES, @"General: Indicate the number of bells rung while the app is inactive in the dock icon’s badge label");
DEFINE_STRING(downloadsDirectory, @"", @"General: Downloads folder.\nIf set, downloaded files go to this location instead of the user’s $HOME/Downloads folder.");
DEFINE_FLOAT(pointSizeOfTimeStamp, 10, @"General: Point size for timestamps");
DEFINE_INT(terminalMargin, 5, @"General: Terminal Margin\nHow much space to leave between the left and right edges of the terminal.");

This comment has been minimized.

@gnachman

gnachman Dec 8, 2016

Owner

Change Terminal Margin to Width of left and right margins in terminal panes, and change Terminal Vertical Margin to Height of top and bottom margins in terminal panes.

@gnachman

This comment has been minimized.

Owner

gnachman commented Dec 8, 2016

This is scary to change because it's completely metastasized. The effort to move it to a profile preference would be immense, as you note, and I think making it configurable this way is a pretty big win for a lot of people. Thanks for taking this on.

@jcs

This comment has been minimized.

Contributor

jcs commented Dec 9, 2016

I've made those requested changes.

@gnachman gnachman merged commit 309a542 into gnachman:master Dec 11, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@jcs jcs deleted the jcs:move_margins_to_settings branch Dec 11, 2016

@yogasukma

This comment has been minimized.

yogasukma commented Feb 13, 2017

Hi i really interested with this jaredculp/iterm2-borderless-padding#19 (comment)

does it mean this PR we will have margin in top and left like that screenshot?

@gnachman

This comment has been minimized.

Owner

gnachman commented Feb 13, 2017

@ysupr Yes, try the nightly build and see how you like it.

@jesseleite

This comment has been minimized.

jesseleite commented Feb 28, 2017

@gnachman Is this still only available in the nightly build?

@luco

This comment has been minimized.

luco commented Mar 3, 2017

This is very, very nice.

@yifanchen

This comment has been minimized.

yifanchen commented Mar 3, 2017

I have nightly build 3.1 - 20170303 now, in advanced setting, I changed the margin to 25 and 25, restarted the iterm, nothing changed, any ideas?

@gnachman

This comment has been minimized.

Owner

gnachman commented Mar 4, 2017

@jesseleite You can get 3.1.beta.1 from the downloads page now. The march to 3.1 is underway!

@yifanchen If you save prefs to a folder (in prefs > general), maybe it's not set to save changes back to the folder?

@jesseleite

This comment has been minimized.

jesseleite commented Mar 4, 2017

@gnachman Thank you! Just downloaded the beta and found the experimental setting; Love it! ❤️

@yifanchen

This comment has been minimized.

yifanchen commented Mar 4, 2017

@gnachman Hmm, it didn't work either. Isn't the padding/margin setting not in the place where the following image showing?

image

@jesseleite

This comment has been minimized.

jesseleite commented Mar 4, 2017

@yifanchen I found it here:

itermmargins

@yifanchen

This comment has been minimized.

yifanchen commented Mar 4, 2017

@jesseleite That works, thanks.

@jpruetting

This comment has been minimized.

jpruetting commented Mar 27, 2017

This is soooooo nice. Super happy this finally got added!

@aquartier

This comment has been minimized.

aquartier commented May 13, 2017

It's look like this functionality is missing in 3.0.15 beta.

@gnachman

This comment has been minimized.

Owner

gnachman commented May 13, 2017

It's not missing so much as it is a new feature of 3.1.

@ErraticFox

This comment has been minimized.

ErraticFox commented Jul 26, 2017

I cannot find it anywhere and @jesseleite photos broken...

@jesseleite

This comment has been minimized.

jesseleite commented Jul 26, 2017

@ErraticFox fixed photo :)

@ghost

This comment has been minimized.

ghost commented Nov 29, 2017

Is it possible to have the margins be different for every profile? or is this a global setting for item?

@gnachman

This comment has been minimized.

Owner

gnachman commented Dec 8, 2017

It is a global setting. I would like to make it per-profile one day.

@justinpage

This comment has been minimized.

justinpage commented Jan 11, 2018

For those wondering how to get rid of the title bar:

Open Preferences, click the Profiles tab, select your profile, click Window and select No Title Bar from the Style dropdown menu.

@kizerkizer

This comment has been minimized.

kizerkizer commented Apr 14, 2018

How do you change this setting?

I figured out that it's an advanced setting (https://iterm2.com/documentation-hidden-settings.html). So I ran defaults write com.googlecode.iterm2 TerminalMargin -int 20 in the regular terminal app, which worked. The vertical setting is TerminalVMargin.

@gnachman

This comment has been minimized.

Owner

gnachman commented Apr 15, 2018

It's easier to change it in Prefs > Advanced > Height of top and bottom margins in terminal panes and Width of left and right margins in terminal panes.

@cbartondock

This comment has been minimized.

cbartondock commented Jun 26, 2018

I still have a right margin in vim after setting all the margins to zero in iTerm2 preferences:
screen shot 2018-06-26 at 1 00 43 pm

Any thoughts?

@justinpage

This comment has been minimized.

justinpage commented Jun 26, 2018

@cbartondock Maybe your .vimrc has some column configuration set?

@gnachman

This comment has been minimized.

Owner

gnachman commented Jun 27, 2018

@cbartondock Your window's width is not an exact multiple of the width of a cell. If it's a fullscreen window, that is unavoidable since text size is limited to integer points size. If it's not a fullscreen window resize its width a little and it should snap to the grid and fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment