Sublime text 3 how to hide Definition on mouse over function? - sublimetext3

I've tried to find a solution in other posts but no solution found.
I'm using Sublime text 3 and since I installed last update 3126, when I put my mouse over a function, in PHP ou Javascript, I get a list of all files using this function and it's useless for me and takes all place on my screen.
How can I hide this ?
I'm using those Packages :
alignment
compare side by side
Emmet
minifier
Sidebar
livereload
SFTP
Sublimelinter
colorpicker
I love this tool but I need a bit more help to configure my own options.
Thanks for help !

Also new in 3124 is Show Definition, which will show where a symbol is defined when hovering over it with the mouse. This makes use of the new on_hover API, and can be controlled via the show_definitions setting. — Sublime Text Blog
Show definitions on hovers can be disabled via the show_definitions setting.
User
Menu > Preferences > Settings (Preferences.sublime-settings - User)
{
"show_definitions": false
}
Per-Project
Menu > Project > Edit Project
{
"settings": {
"show_definitions": false
}
}
Similar to this SO question on inline build errors.

Related

Is it possible to define different color scheme per project?

I was hoping that I could have Sublime set a different color scheme for different projects. So if my default is Monokai, use Monokai; but if a project has for example the Visual Studio Dark theme as preference, then changing to that projects would update the color scheme to that. And then changing back to another project would update color scheme to Monokai again.
The .sublime-project contains a JSON element, so I was hoping maybe I can copy my color scheme setting in there, so I turned that file into:
{
"color_scheme": "Packages/Visual Studio Dark/Visual Studio Dark.tmTheme"
}
And I've also tried:
{
"preferences": {
"color_scheme": "Packages/Visual Studio Dark/Visual Studio Dark.tmTheme"
}
}
But it didn't work. Changing projects back-and-forth didn't update the theme.
Does that functionality exist?
This is possible, but it doesn't go into the top level element of your sublime-project file. Project specific settings, as outlined in the official documentatuion, go inside of a key named settings:
{
"settings":
{
"color_scheme": "Packages/Visual Studio Dark/Visual Studio Dark.tmTheme"
},
}
Not all settings are allowed in project specific settings. In particular, only Editor settings are allowed, and the User Interface and Application Behaviour settings are not allowed. If you look in the default preferences, the top settings are the editor settings, and then there's a comment that indicates when the other settings groups begin.
Basically what this means is that things that control the behaviour of the application as a whole (like what shape the tabs are or whether or not git support is enabled) aren't customizable per project, but things that can be altered on a file by file basis are.
More details on preferences in Sublime in general (including examples of using a custom color scheme per project or per file type) can be found in this video on Configuring Sublime Text.

How to remove code suggestion / help popup in sublime 3

I keep getting this annoying code help popup in sublime 3.
It seems to have only appeared recently. I'm not sure if it's part of sublime or some plugin.
Is there a way to disable this from showing?
EDIT:
Turns out this is to do with the package Naomi. Does anybody know if this is a configurable setting with this package?
you need to do following steps:
Go sublime Menu bar
select preferences
add this following code to user file and save it.
Blockquote
{
// Controls auto pairing of quotes, brackets etc
"auto_match_enabled": false,
// Enable visualization of the matching tag in HTML and XML
"match_tags": false,
}
I installed sublime, and disable completions popup by adding
"auto_complete": false
to the preferences.
You get to the preferences by: Menu Preferences -> Settings. There, you are supposed to edit the User Preferences file by adding custom prefs like the above snippet between the existing curly braces.

How could I hide the minimap bar on sublimetext 3

It takes too much space on the window,
I tried some option in the configuration
It seems not working, any idea ?
User setting
"draw_minimap_border": false,
"draw_minimap": false,
"hide_minimap": true,
"always_show_minimap_viewport": false
Click on View (check the mouse arrow/pointer in below image) on top menu bar or hit Alt + V and click Hide Minimap
I added a shortcut on Sublime Text 3.
Go to Preferences -> Key Bindings. In user key bindings I added:
[
{ "keys": ["ctrl+f2"], "command": "toggle_minimap" },
]
Obviously you can choose another key combination.
I don't believe there's a setting in Sublime Text 3 to hide the minimap by default.
This solution has worked perfectly for me, however:
Save the following Python code as minimap_setting.py in the User directory (in Preferences -> Browse Packages):
# -*- encoding: utf-8 -*-
import sublime
import sublime_plugin
class MinimapSetting(sublime_plugin.EventListener):
def on_activated(self, view):
show_minimap = view.settings().get('show_minimap')
if show_minimap:
view.window().set_minimap_visible(True)
elif show_minimap is not None:
view.window().set_minimap_visible(False)
Then, you just add "show_minimap": false in your settings and you're good to go.
Ctrl+Shift+p to open the command palette, then type in minimap.
It's very easy in Sublime text 3. To hide Minimap:
View > Hide Minimap
Check your default settings; Preferences -> Settings - Default. If a setting is not listed there, your version of sublime will not handle overriding it in Settings - User - Don't waste your time.
Check if the latest version of sublime has settings you can override - http://docs.sublimetext.info/en/latest/reference/settings.html
On the latest sublime for me, I can't hide tabs, the minimap or the status bar via user settings - just by manually disabling them in the menu dropdown.
Just use package and once for all.
Tools > Command Palette > Package Control: Install Package > Search Close​Minimap​On​Multi​View and install. It will close all minimap for all windows.
Now you can disable on View menu clicking on Hide Minimap.
On SublimeText 3, I can see F2 Keymap, easier, isn't it?

XML attributes order in Android Studio

I'm facing problem with keeping proper order of XML attributes in Android Studio. As you can see below, the style attribute is between layout_* attributes, but I want it to be ordered by name (like in Eclipse). I'm using standard Intellij code formatter and the Android Studio gives users ability to set your own rules regarding XML ordering. The settings are located in Code Style -> XML -> Arrangement, but it seems not to work or I'm using it wrong. Any ideas how to order XML attributes by name using default code formatter?
<TestView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
style="#style/BackgroundLight"
android:layout_height="wrap_content">
</TestView>
Finally got it.
Choose File > Settings > Code Style > XML > Set from > Predefined Style > Android
Set File > Settings > Editor > Formatting > Show "Reformat Code" dialog
Run formatting on a XML file (CTRL+ALT+L by default)
You will see a popup window, set the Rearrange entries flag
Disable Reformat Code dialog in the settings
This way every XML file formatting will set the attributes in a proper order.
Edit:
Starting with Android Studio 0.2.6 release the XML Android style formatting is set by default, but you still have to set the Rearrange Entries flag manually.
http://tools.android.com/recent/androidstudio026released
Automatically apply the Android XML code style if a code style hasn't
already been customized. This will make it possible to automatically
order XML attributes (check the "Rearrange Entries" checkbox in the
"Code > Reformat Code..." dialog.)
UPDATE: the method I described below is an official way to fix this known issue, see: https://developer.android.com/studio/releases
After updating to the newest Android Studio v3.4.2 I found that it doesn't format XML code properly anymore. For instance, attributes ordering didn't work in layouts. It did indentation and namespaces ordering only.
I don't know the reason why it was broken after an update but was lucky to fix this:
Go to Settings (CMD + , ) on Mac.
Type format in Search box and click on Editor -> XML setting.
Click on the Android tab and make the same settings here as it's on a picture:
Settings on a picture quite normal, but of course you can tune this tab setting up to you.
Go to the Arrangement tab and you will see something like this:
The reason why attributes are not getting sorted - sorting rules are empty.
To fix this:
Choose Scheme and play with Default IDE and Project options. Switching between them may help.
Or choose Scheme which suites your needs and then click on Set from... blue text in right upper corner -> Predefined Style -> Android. You will see restored rules in the window:
I also chose Force rearrange - Always
To save result – click Apply.
Also you can click on a gear icon near Scheme and copy settings or even restore defaults.
P.S. To me standard rules are comfortable, but it can be customized further. Here is an article which may help doing this: https://medium.com/#VeraKern/formatting-xml-layout-files-for-android-47aec62722fc
Go to your layout XML
Try Ctrl + alt + shift + L then find checkbox label is Rearrange code and checked its.
To delete empty lines between them:
Preferences > Code Style > XML > Other > Keep blank lines: 0
And then just reformat your XML files.
There is a plugin for IntelliJ which might do what you're after...
http://plugins.jetbrains.com/plugin/?idea&pluginId=6546
File > Settings > Editor > XML > Arrangement Select Scheme and choose Default

Changing Gantry v4 menu color

I can't seem to figure out how to change the menu color or add a background to the menu bar in Gantry 4 for Joomla. Tired of the gray or dark gray default.
I could change the font and selection through the .less file but not the menu itself.
The documentation on the Gantry website is too general.
Thank You in advance.
Also check: menu-light.less & menu-dark.less in the less\ directory.
The folks at RocketTheme don't recommend editing the compiled CSS (but it works great as #Adriana pointed out).
Hi Gantry framework for joomla as you probably notice uses Less to really understand how to change things on the template you first have to learn how less works even that Gantry compiles the less files for you. Less it is fantastic so it worth it. Basically you use a code to define css in a clever way much more economic and then you compile this into more efficient css files
If you change the compiled files as our friends are saying here make not sense at all because as soon you compile again (and you will) this files will be override and all your work lose.
I will give you the direction and you will see that it is not that difficult as look.
1- check the menu you had selected on your Gantry template under Templates Manager - Style - menu style.
2- on your less folder you will see a less file for each of the menu styles with the main variables
for example menu-dark.less try to make sense of the variables and the colors and change them to see what is what.
3- on the same folder you have menu.less and there is where the magic is done using the variables from the previous file. You will see that for example define first level of menu you will have something like:
&.l1 {
> li.active {
background: #menuActiveBack;
So that menuActiveBack variable will be the background value of the active li of the level 1.
4- the last part will be the menu-hovers.less that i thinks it is over complicate things because it is not a need to have a different file to do the hovers but there it is.
You can control CSS compression, Compile Wait Time and Debug Header, as well as manually clear the cache with the Clear Cache button at Extensions → Template Manager → gantry → Advanced → Less Compiler.
more info at: ganty less documentation
Hope it helps to start with....
Happy coding,
Eduardo
it took me a while maybe half an hour to go through the "menu" css file in the "css-compiled" folder.
You can find all the css to alter the background and colors of Gantry's default menu.. I'm using Gantry v4 also.
Go here:
Joomla>templates>gantry>css-compiled>menu-675c76.....
Please view my image to see my results:
http://dream2unite.com/images/misc/GANTRY-MENU-675c76.png
Use FireBug or similar to find the default CSS styling.
Create a file /templates/gantry/css/gantry-custom.css and add your own CSS to override the default CSS.
This is a better method than editing compiled or other template less or css files which can be overwritten during compilation or when the template is updated.

Resources