.vimrc is not executed when opening a new tab in MacVim - macvim

I've got MacVim and Janus installed.
I have recently added set rnu to my .vimrc.after to enable relative line numbering and found out that I only have rnu working when opening a new window. I mean, when I open a new tab in existing window, I get normal sequencial numbering.
I would like to know how can I enable rnu for all my MacVim windows and tabs.

Ran into the same problem. The reason is that absolute line numbers are being set for some filetypes. Hopefully the janus devs can do something about it: I just opened an issue for that on the github repo: https://github.com/carlhuda/janus/issues/472
Update:
Add this to your ~/.vimrc.after file:
set nonumber
set relativenumber
Relative line numbers should persist with these settings.

Related

Cannot use Chrome Live Edit with Webpack source maps

I have a webpack 4 configuration that generates source maps for my app's JavaScript. While debugging my app in Chrome, the source maps get loaded so I can see my unimified code. I'll set a breakpoint in a function and in the Sources tab I'll make edits to the code. I hit CMD+S to save my edits.
Normally, I would expect Chrome to think for a little bit while it processes my edits and then I can continue debugging my session with my code changes.
But that doesn't happen. I get a little yellow icon next to my file in the Sources tab that says "Changes to this file were not saved to the filesystem". And the debugging session continues without my code changes.
I've tried different options like cheap-module-source-map and cheap-module-eval-source-map for the devtools option in my webpack config.
Any suggestions? Thanks!
I got something working!
I ended up posting my same question on reddit and got some help.
https://www.reddit.com/r/learnjavascript/comments/a98gh1/cannot_use_chrome_live_edit_with_webpack_source/
You need to add your project's directory to save changes in the
source.
Here are the steps:
Open dev tools
Click on the 3 vertical dots on the far-right beside X which brings up
a menu. Click on Settings
Click on Workspace
Add your Project's directory
Refresh the page, and you should be able to save your changes now.
Hope this helps.
Oddly enough, I was able to remove my Project's directory from the Workspace and STILL able to make Live Edits to my source maps!

PhpStorm: Save as Live Template does nothing

Trying to create a Live Template in PhpStorm by highlighting a block of text, going to Tools > Save as Live Template.
When I do this, nothing happens. The Live Template dialog does not open and there is no other indication of an error. I can manually open the Live Template menu and add one there.
Is there a setting or configuration that is needed for this to be enabled?
PhpStorm 2017.1.4 on Windows 10
You can turn a highlighted block into a live template, but you need to make sure that there is no leading whitespace in your selected text, or it won't do anything, as explained in the original question.
This is likely a bug, see the issue in the comments to track resolution.

My chrome browser is zoomed in

My chrome browser is zoomed in for no reason. I tried added /high-dpi-support=1 /force-device-scale-factor=1 at the end of C:\Program Files (x86)\Google\Chrome\Application\chrome.exe however I am getting an error saying high-dpi-support=1 /force-device-scale-factor=1 in the target box is not valid. Make sure the path and file name is correct.
If your target is not valid, you probably forgot the quotes when using a path containing spaces (like program files) and the slashes:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" /high-dpi-support=1 /force-device-scale-factor=1
Zooming out is just a workaround - not a solution !
I had the problem too, and I tried those solutions listed on this site:
http://techdows.com/2016/10/fix-chrome-54-looks-zoomed-in.html
However, I could not set the compatibility mode since all options are greyed out (probably company policy) and so I had to use the command line option.
Using both /high-dpi-support=1 and /force-device-scale-factor=1 did not work, my guess is that I am using a laptop and the default DPI level is set to 125 in Windows 10. If set to 100, most programs were too small to use.
Using only /force-device-scale-factor=1 worked for me (keeping my 125 DPI in Windows and 100% Zoom level in Chrome)
Recently, I am also facing the same problem when updating the latest version of google chrome. Do it again because this the only solution.
Delete your old shortcut code and create latest version shortcut code. And Follow this steps.
For Chrome:
Right Click the chrome icon or chrome shortcut icon, go to the
properties.
Then in the "Target:" field, Click the field and press end button.
Now you are seen this "chrome.exe" at the end.
copy this text : chrome.exe" /high-dpi-support=1
/force-device-scale-factor=1 and paste on chrome.exe"
Then Restart chrome or close the browser and double click the
shortcut icon.
For Firefox: here
I have been having the same problem thanks to the most recent Chrome update, tried a number of solutions but nothing worked, so looked for a way to go back to the previous version - which I have done an now everything is back to normal :)
So the insructions to roll back to a previous version can be found here: https://productforums.google.com/forum/#!topic/chrome/UFSYuIr1-80
However they are a bit long winded, so here is what I did.
Go Chrome's file location, should be something like C:\Program Files (x86)\Google\Chrome\Application.
Once there you should hopefully see a folder containing the previous version of Chrome - it should be something like 53.0.2785.143.
However, what's missing is the Chrome.exe, so we will need to get hold of this by downloading the older version of chrome again.
To do that you will need to go to this website http://www.chrome-portable.com/index.php/google-chrome-offline-installer and download the corrosponding installer, in my case i clicked on the link for the 53.0.2785.143 32-bit version.
Once it downloaded, right click on it and use WinRar (or similar) to 'extract here" - once extracted you should be left with another compressed file called "chrome". Again click on it and choose "extract here". This time you should get a file called "Chrome-bin".
Look inside "Chrome-bin" and you should see chrome.exe, now all you need to do is copy chrome.exe back to your older version folder (from step 2).
Double click on your newly copied chrome.exe and all going well Chrome should open back to how it was!
One final step, you will need to copy the entire 53.0.2785.143 folder to somewhere safe, other wise chrome will overwrite it again as it updates.
NOTE: So what you now have is two versions of chrome, the older version, version 53, which should look fine. And you have an the most recent version, version 54, of chrome which will continue to update etc. Any bookmarks you have will still point to the current version 54 chrome, so you will need to create new bookmarks pointing back to the old one!
Hope this helps, as I said I just followed the instructions in the link at the top of my post.
Good luck!
You can fix it by Holding ctrl and scrolling back
Or hold ctrl and press -
You could also change it in settings
Open Google Chrome.
Click Customize and Control Google Chrome >
Settings.
Click on "Show advanced settings" and scroll to the "Web
Content" section.
Use the menu next to "Page Zoom" to make your
selection:
Here is how to do it in the registry:
Add --force-device-scale-factor=1 to the registry keys
HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command
HKEY_CLASSES_ROOT\Applications\chrome.exe\shell\open\command
Note: The first key may be reset sometimes. I assume this happens with either a Chrome or Windows update; I can't tell.

Display changes in SCSS/HTML without refreshing [duplicate]

I am trying to set up the mapping feature in Chrome canary. I followed the screenshots in this answer.
The main feature works, when I inspect an element, it points me to my local sass file and when I edit it, the local file safes, and the `sass --watch' is triggered. However, the browser does not refresh, even though on the "General" tab in devtools I have checked "Auto-reload CSS upon Sass save".
Should the browser reload? Is there a way to get it to reload?
Ps - I have compass but I can not use that as it does not support mapping, so I am compiling sass through the terminal
Thanks
You probably forgot this step:
In the Sources tab, find your generated CSS file, right click on it and choose Map to network resource, and select the same file name in the shown dropdown:
and then choose the matching file from your workspace:
It could be that the Sass-file is still compiling when Chrome tries to reload the CSS. Setting the 'Auto-reload CSS upon Sass save' Timeout to 5000 ms fixed it for me. When Chrome triggers the reload, it can even prevent Sass from recompiling the CSS.
I solved the problem by installing tincr extention and now when I save locally, the browser refreshes.

PrimeFaces: How to increase the rendered size of a MindmapNode

I am following the PrimeFaces MindMap example from:
http://www.primefaces.org/showcase/ui/mindmap.jsf
My question is: How do I increase the size of the "bubble" (MindmapNode) so that I can display more text within it?
Any help would be appreciated.
I looked at generated source and found that size is controlled by rx and ry in eclipse element. Just put your numbers there. Here is some source of mindMap maybe will be useful.
I spent forever trying to find out how to do this, so for anyone else who struggles, heres how to do it.
Open your primefaces jar file in a ZIP program such as WinZip.
Navigate to META-INF -> resources -> primefaces -> mindmap and open the mindmap.js file.
When I open it up even in an editor such as Notepad++ it is displayed entirely on one line. Therefore the easiest approach is just to search the file for this line:
raphael.ellipse
Within the brackets after that line are 4 values. The last 2 are the ones you are looking for. The first of the two is width and the last is height.
All you need to do then is to save the mindmap.js file, go back to WinZip and update the files in the jar, go to your project in Eclipse (or your chosen IDE), refresh the project and restart the server.
And your done.
I hope this helps somebody