Hello! MacVim does a lot of things I wish I had previously, so thanks
so much for it. I did have a couple tweaks with the tab bar though.
First, I don't need the tab button so I disabled it. Second, the
starting width of the tab was a little small, so I resized it to
Terminal.app's 200px default. Third, I didn't like how the tabs were
truncated on the right side. That left me with tabs like:

| /U/S/e/P/f/l/...   | /U/S/e/P/f/l/...    | __init__.py |

Which weren't that helpful. Since it didn't look like PSMTabBarControl
actually exposes that, I hacked that in too. It'd be a lot better to
have these as .gvimrc options though, but I couldn't figure out how to
do that. One thing I definitely couldn't do was allowing you to tear
off a tab into it's own window. Is there an easy way to do that?

Anyway, here's the patch to do all these crazy things. Thanks!


diff --git a/src/MacVim/MMAppController.m b/src/MacVim/
MMAppController.m
index 91307d9..bb2d097 100644
--- a/src/MacVim/MMAppController.m
+++ b/src/MacVim/MMAppController.m
@@ -161,7 +161,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
         [NSNumber numberWithBool:NO],   MMNoWindowKey,
         [NSNumber numberWithInt:64],    MMTabMinWidthKey,
         [NSNumber numberWithInt:6*64],  MMTabMaxWidthKey,
-        [NSNumber numberWithInt:132],   MMTabOptimumWidthKey,
+        [NSNumber numberWithInt:200],   MMTabOptimumWidthKey,
         [NSNumber numberWithInt:2],     MMTextInsetLeftKey,
         [NSNumber numberWithInt:1],     MMTextInsetRightKey,
         [NSNumber numberWithInt:1],     MMTextInsetTopKey,
diff --git a/src/MacVim/MMVimView.m b/src/MacVim/MMVimView.m
index 0836343..6968456 100644
--- a/src/MacVim/MMVimView.m
+++ b/src/MacVim/MMVimView.m
@@ -129,7 +129,7 @@ enum {
     [tabBarControl setCellOptimumWidth:
                                      [ud
integerForKey:MMTabOptimumWidthKey]];

-    [tabBarControl setShowAddTabButton:YES];
+    [tabBarControl setShowAddTabButton:NO];
     [[tabBarControl addTabButton] setTarget:self];
     [[tabBarControl addTabButton] setAction:@selector(addNewTab:)];
     [tabBarControl setAllowsDragBetweenWindows:NO];
diff --git a/src/MacVim/PSMTabBarControl/source/PSMAquaTabStyle.m b/
src/MacVim/PSMTabBarControl/source/PSMAquaTabStyle.
index dba0250..1a69657 100644
--- a/src/MacVim/PSMTabBarControl/source/PSMAquaTabStyle.m
+++ b/src/MacVim/PSMTabBarControl/source/PSMAquaTabStyle.m
@@ -288,7 +288,7 @@
     // Paragraph Style for Truncating Long Text
     if (!truncatingTailParagraphStyle) {
         truncatingTailParagraphStyle = [[[NSParagraphStyle
defaultParagraphStyle] mutableCopy] retain];
-        [truncatingTailParagraphStyle
setLineBreakMode:NSLineBreakByTruncatingTail];
+        [truncatingTailParagraphStyle
setLineBreakMode:NSLineBreakByTruncatingHead];
         [truncatingTailParagraphStyle
setAlignment:NSCenterTextAlignment];
     }
     [attrStr addAttribute:NSParagraphStyleAttributeName
value:truncatingTailParagraphStyle range:range];
diff --git a/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m b/
src/MacVim/PSMTabBarControl/source/PSMMetalTabStyl
index 3113480..85c59b7 100644
--- a/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m
+++ b/src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m
@@ -302,7 +302,7 @@ void MyNSDrawWindowBackground(NSRect rect)
     // Paragraph Style for Truncating Long Text
     if (!truncatingTailParagraphStyle) {
         truncatingTailParagraphStyle = [[[NSParagraphStyle
defaultParagraphStyle] mutableCopy] retain];
-        [truncatingTailParagraphStyle
setLineBreakMode:NSLineBreakByTruncatingTail];
+        [truncatingTailParagraphStyle
setLineBreakMode:NSLineBreakByTruncatingHead];
         [truncatingTailParagraphStyle
setAlignment:NSCenterTextAlignment];
     }
     [attrStr addAttribute:NSParagraphStyleAttributeName
value:truncatingTailParagraphStyle range:range];
diff --git a/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m b/
src/MacVim/PSMTabBarControl/source/PSMUnifiedTab
index 2bd5976..5025a80 100644
--- a/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m
+++ b/src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m
@@ -272,7 +272,7 @@
     // Paragraph Style for Truncating Long Text
     if (!truncatingTailParagraphStyle) {
         truncatingTailParagraphStyle = [[[NSParagraphStyle
defaultParagraphStyle] mutableCopy] retain];
-        [truncatingTailParagraphStyle
setLineBreakMode:NSLineBreakByTruncatingTail];
+        [truncatingTailParagraphStyle
setLineBreakMode:NSLineBreakByTruncatingHead];
     }
     [attrStr addAttribute:NSParagraphStyleAttributeName
value:truncatingTailParagraphStyle range:range];


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to