Macvim - how to prevent tab names being abbreviated? - macvim

In macvim, is it possible to make tab names full length (i.e. not shortened?)
e.g., If I open a-very-really-quite-long-file-name.txt, its name in the tab is shortened to a-very-really-q.... This is frustrating if you open several files open with long names, which are similar at the start. (In console vim, this shortening doesn't happen).
Is there an option or setting which prevents this shortening?
(My option guitablabel=%M%t where %t is the file name (the docs don't seem to mention shortening), and I'm using macvim 7.3.)

I found an ok solution at http://code.google.com/p/macvim/wiki/UserDefaults
You can make the tab labels wider with the following code typed into a terminal ($ signs are prompts, don't type them):
$ defaults write org.vim.MacVim MMTabMinWidth 200
$ defaults write org.vim.MacVim MMTabOptimumWidth 300
$ defaults write org.vim.MacVim MMTabMaxWidth 400
Where you can change the numbers (which are pixel widths) as you like. It's not a perfect solution -- tab label widths are not dymnamically sized to the file name length. So it you open a really long file name, too wide even for the extra wide setting you made, you will still get abbreviation & dots.
If anyone knows a better solution, I'd be keen to hear it ...

Related

How to display hidden characters in PhpStorm, especially line seperators

I got some special characters in my codes, take a look at:

 a




It's just shown in frontend with normal characters like an "a".
Now the same characters without any normal characters:
Characters starts here





Characters ends here
Ok it looks like this Editor will not save empty 
 , try it with snippet.
<html><p>
 </p></html>
The problem is, in PhpStorm this characters wont be shown, even not with
"settings - Editor - General - Appearance - show whitespaces" or
"settings - Editor - General - Appearance - show method separators"
Only "strg+f, strg+r" will find this characters.
I think this character is an "only-mac-char" :) I'm working with Windows, and I can't test it on mac.
EDIT: Sorry i could identify it as "U+2028 : LINE SEPARATOR"
http://www.babelstone.co.uk/Unicode/whatisit.html
The big problem is that phpStorm didn't show anything in the code. Like there is no character, but moving with the arrow keys notice 2 steps at this position, between 2 tags looks like "><" but it's "> <".
Based on your update it is now clear what character you have in mind:
Sorry I could identify it as "U+2028 : LINE SEPARATOR" http://www.babelstone.co.uk/Unicode/whatisit.html
Install and use Zero Width Characters locator 2 plugin: it can detect quite a few invisible characters (e.g. UTF-8 BOOM sequence, non-breakable space, Unicode line separator (your case) etc).
It is implemented as a separate inspection with highest (Error) severity so will be easy to spot or check the whole folder/project just for these issues.
There is a ticket (Feature Request) to have an option to show invisible characters in the editor.
https://youtrack.jetbrains.com/issue/IDEA-115572 -- watch this ticket (star/vote/comment) to get notified on any progress. implemented in 2020.2 version.
Other related tickets:
https://youtrack.jetbrains.com/issue/IDEA-99899 (your case, as I understand)
https://youtrack.jetbrains.com/issue/IDEA-140567
https://youtrack.jetbrains.com/issue/WEB-13506
UPDATE 2021-11-10:
As of 2020.2 version the IDE can show invisible/special symbols right in the editor.
An example:

Force autocomplete suggestions for file paths

I am currently working on a controller file for a Phalcon project. I like how PhpStorm gives you autocomplete suggestions when writing a src or href value in an HTML file. I was wondering, is possible to enable autocomplete suggestions when adding resources in a controller?
This is what happens when I force autocomplete suggestions(Ctrl + Space)
This is what I would like to happen.
EDIT: I should also note that I have marked the folder, containing all my resources(ie. CSS, javascript, and images), as the "Resource root".
RE: EDITThis does not affect availability of this feature/functionality in any way as "Resource roots" are used for path resolutions/validation and not for actual "offer this functionality or hide it" choice. -LazyOne
Unfortunately there is no real way of automatically providing such functionality in random string as it's hard to guess that file path is expected in this particular place (function parameters is different case -- here some hinting mechanics (special annotation) may work).
But .. you can forcibly enable it manually for each particular place (should last until file or project is closed):
Have some code, e.g. $someVar = ['css' => 'aaa'];
Place caret inside aaa string (it has to be 3 or more characters, based on my observations, otherwise option in #4 will not be present -- must be some sort of optimisation/limitation from IDE side)
Invoke shortcut to bring "Quick Fix" menu (Alt + Enter on Windows)
Choose Inject language or reference from appeared menu
Choose File Reference from next menu
Start using it (Ctrl + Space)
EDIT: I should also note that I have marked the folder, containing all my resources(ie. CSS, javascript, and images), as the "Resource root".
This does not affect availability of this feature/functionality in any way as "Resource roots" are used for path resolutions/validation and not for actual "offer this functionality or hide it" choice.

Unknown characters on TYPO3 tx_news list view (in Chrome)

I noticed strange behaviour on TYPO3 tx_news list view. Sometimes on the bottom of the page appears unknown characters. I don't know how and why and it's only on one (list view) page and in chrome browser. Here is the screen shot of that:
I have noticed that I can call out that behaviour when I change some tx_news configuration in Extension Manager eg. "List actions shown in Flexforms"
Any suggestion what is wrong?
[EDIT:] After turn off OpCache - problem doesn't occur. Could it be related?
You best bet is to install XDebug and call your page with ?XDEBUG_TRACE=1
You can then search for the offending pattern in your trace file and find the very first place where this offending pattern occurs (if it's not random of course). This gives you the very best chance to figure out why it appeared at all.

JEditorPane print dropping spaces

I have a JEditorPane containing HTML like this:
use the <strong>File</strong> menu, <strong>Open File</strong> to run the conversion
In the interactive window it looks like what I expect: "use the File menu, Open File to run the conversion"
However, when I print it using JEditorPane.print I get: "use theFile menu, Open File to run the conversion"
i.e. It is dropping the space between 'the' and 'File'.
This is happening apparently at random throughout the HTML file, happens on 'span', 'strong', 'a', and 'em' tags that I have tried. About half such tags in the html are dropping a space. As in the example, it will happen on one such tag in a line, and not the next one. Or visa-versa. Or both. I've tried putting the space inside the 'strong' or 'a', or both inside and outside, and it doesn't make any difference. And the space only gets dropped at the start of a tag, not the end.
It happens on two physical printers, and on PDF creation, so I don't think its printer dependent. I have also tried multiple JEditorPane printing methods and they all have the same behavior. I have also tried different scaling, no difference either.
Using a nsbp; does keep a space, but I have many hundreds of such tags, and its going to be a real pain to insert that everywhere. I'm hoping to find something that is causing this and turn it off.
Thanks
I guess this happens because of incorrect fractional measuring.
Try to call editorPaneInstance.getDocument().putProperty("i18n", Boolean.TRUE);
Similar problem is explained here and here

Use method name for SublimeText 2 autocomplete as well as tab trigger

The default SublimeText 2 snippets, located in the Packages directory and then under, say, Ruby are useful but only if you happen to know the tab trigger. For example the file ~/Library/Application Support/Sublime Text 2/Packages/Ruby/alias_method-..-(am).sublime-snippet contains:
<snippet>
<content><![CDATA[alias_method :${1:new_name}, :${0:old_name}]]></content>
<tabTrigger>am</tabTrigger>
<scope>source.ruby</scope>
<description>alias_method ..</description>
</snippet>
So we can access this trigger by hitting am then tab.
My question is, if this snippet chucks in alias_method :${1:new_name}, :${0:old_name} isn't there a way that I can use this snippet without knowing its am trigger, just by starting to type alias_m... for example?
Umm, no, not that I can find. I just opened up a blank Ruby file, hit a, and autocomplete popped up with all sorts of options, including the snippet you mentioned. However, if I then typed an l (starting to spell out alias...), the option for the am snippet disappeared. So, it looks like autocomplete is not searching the <description> field, only the <tabTrigger> field. There aren't any options in Preferences -> Settings - Default that would seem to address this situation.
So, unfortunately it would seem the solution is one of two things - either edit all your commonly-used snippets to have tabTriggers that make more sense to you, or put together a snippet cheat sheet. It looks like at least one other person was thinking the same thing, as I found this collection without too much searching.
Good luck!