MacVim always force tabs - macvim

I've noticed that if I open too many files on my MacVim simultaneously, i.e., select all files in Finder and drag to MacVim, it takes some of the files and places them in a split window rather than giving them their own tabs.
Is there a way to disable this so that every file is always opened in its own tab? I've already selected the with a tab for each file option in the Open files from applications Preferences.
The interesting thing is if I open each file one by one, then they do always get their own tab. The problem occurs when I do a bulk open.

Looks like this is still an issue so I've posted this as a Github issue.
UPDATE: looks like you can solve this by setting tabpagemax to a higher value in your vim config!

Related

Unable to modify value of "prompt_for_download" in chrome preferences file

Gurus,
I am using uipath(A Ui Based Automation Tool) to download a file from a website using chrome browser.
I want browser to not prompt before downloading and just download the file in the downloads folder.
From various posts on this website i found that there exists a file called "preferences" which can be modified to solve this problem.
Before coding further i decided to do the changes in the "preferences" file manually on multiple machines, just to make sure that the changes i do in the preferences file reflect in the chrome browser as well .
I am manually modifying values for these 2 options in the preferences file.
download.default_directory
download.prompt_for_download
When i changed value for download.default_directory(Manually in Preferences file), it reflects the same in the chrome browser settings on every machine that i tested on.
But When i change value for download.prompt_for_download, it reflected in the chrome browser settings on some of the machines while on others i found that it does not reflect in the browser and rather the preferences file also seems to have reverted back to previous values.
The steps i followed are as below..
close any running instance of chrome
do the modifications in the preference file and save it
open chrome and go to settings>advance and downloads
i see DreamCatcher pointing to a similiar situation in this post, but no answers there..
I hope I can help solve your issue or at least give you some direction :)
Option#1: Chrome Settings
Wouldn't the problem be solved by changing the settings for downloads in the browser before running the bot? https://support.google.com/chrome/answer/95759?co=GENIE.Platform%3DDesktop&hl=en
Option#2: Do it in UiPath
And the other thing, is that when the prompt (to save the file) appears, couldn't you insert the path of the file that includes the default folder to save + name file + extension? (e.g. on the save path of the prompt, use type text "c:\myDocuments\downloads\filename.ext" ? I've done this in the past with UiPath...get the prompt window, type text and just modify the string being passed to carry the path, file name and extensio...then click "SAVE" or use hotkey "Enter"(if the file requires replacement, these are another 20cents you will have to program in UiPath, but it'd doable).
Option#3: Script
Another option, which I have not done, but see my friends do is creating BAT files to reset certain browser settings or the "registry"...so what they do is that they configure the BAT to do the changes to the browser and they add an activity (in UiPath) to invoke the BAT file every time the browser is opened by the robot.
Links for reference:
https://superuser.com/questions/59465/is-it-possible-to-download-using-the-windows-command-line
https://getadmx.com/?Category=Chrome&Policy=Google.Policies.Chrome::DownloadDirectory

How to avoid download file rename?

I have a file named <h1>test.zip on my webspace. When i try to download it, it get renamed as
__h1_test.zip
Is there a way to leave the original filename to the downloaded file?
I'd like the downloaded file to keep the name <h1>test.zip once downloaded.
I'm using ubuntu at the moment and i can rename files as <h1>test.zip on my device.
"<" this tag is coverted into "_"
so i suggest you , don't use "< >" tag , add another name.
No. The browser does that to prevent the user from accidentally overwriting an existing file with the same name and you have no control over this.
You have a few options to change it. None of them are perfect.
Go to chrome settings in your browser bar chrome://settings/, scroll down to advanced, click it, scroll down to downloads and check the box to prompt. You can then specify the same name so it isn't auto-renamed but it will prompt every time, even if there isn't a duplicate. You get used to it fast, so it isn't as big of a deal as it sounds like.
If that isn't what you want check out a Chrome extension that attempts to address this issue (not sure if it works with ubuntu though). There are numerous forums out there where people are asking for the same functionality and have been for years so don't expect Chrome to change default behavior... Here's one (untested by me) -> https://chrome.google.com/webstore/detail/downloads-overwrite-alrea/lddjgfpjnifpeondafidennlcfagekbp?hl=en-US
Finally, depending on what you are doing (always downloading the same set of files for example) you could configure an FTP client or something else to pull the files and set the name instead of using a browser to pull them... you would be able to configure that more easily to overwrite. If you are downloading random things and just want to save bandwidth/etc when accidentally downloading the same file, then you likely need an extension/different browser/etc. to resolve it.

PhpStorm file cache conflict with TypeScript compiler

I've just started using TypeScript in PhpStorm but I keep getting a "File cache conflict" window every time I make changes to my .ts (typescript) file. There are three buttons and I have to keep pressing the "Load from memory" button. Nearly after every single edit.
This happens a lot after making changes and leaving the PhpStorm window (i.e. when PhpStorm loses focuses).
I did some research and found some solutions
Disable Emmet Everywhere - Don't have this plugin installed
Remove fsnotifier.exe and fsnotifier64.exe - Did it, no luck
Sync files on frame or editor tab activation and Save files on frame - Checked it and Unchecked it - no luck
Please can someone tell me how to stop this? I wish there was a way to tell PhpStorm to make "Load memory" default.
P.S. All files are on my local drive. There is no network involved.

Change to this file were not saved to file system error in google chrome version 30.0.1599.101 m

In the google chrome version 30.0.1599.101 m I am not able to save the changed js file.
On saving the js file I got yellow triangle symbol with "change to this file were not saved to file system" message.
I know this used to work in older version
I am using windows-7 64 bit
Click on the cog in the developer tools window (lower right corner)
Go to workspace and add the directory which you would be working on.
This is to accidentally prevent you from modifying files that you did not intend on changing.
Happened to me too. After picking the workspace directory, I also mapped the file from the "Source" panel of Devtools to its filesystem equivalent (using right-click on the file, from the file tree). It solved my problem.
In chrome > 63, accepted answer option is disabled.
In later should be done through workspaces.
Tonight, I accidentally managed to fix this problem, just open the file on the disk and save it with a simple change even with a space.
Refresh the page in Chrome, Chrome will link it(The file) to the disk.
Using Ctrl + F5 to clear the browser cache worked for me.
I found nothing in "workspace" that seemed relevant, and other things people listed didn't help either. What helped was to go in dev tools, where it says Pages, Sources etc., there is also Overrides (duh :)), I chose it, it said "Select folder for overrides", I did, and then also clicked "Allow" on Chrome asking for confirmation. That's it, after that I was able to save the files, the overrides worked.
Ok, my case might be a bit different but I will share my experience on what I was facing that caused to this warning and how I solved it.
I was trying to check a certain strange behavior on a React app for video streaming, so I opened up Developer console, enabled local overrides and tried editing the js file, immediately upon saving I got the warning “Changes to this file were not saved to file system”.
Note the message at bottom right “Source mapped from app.bundle.min.js”, this indicated that this is not an actual file but a mapping from the app.bundle.js (Webpack bundle)
So I moved to editing the app.bundle.min.js, I searched the appropriate string I was interested in from the mapped file (react-dom.production.min.js) and searched it in app.bundle.min.js
Again I got the same warning but I noticed the “app.bundle.min.js” file was fetched using a url parameter ?v=4900, I decided to remove it to check if that was the culprit causing the issue, to achieve that I modified the index.html file and edited the script tag that was fetching the js file from
<script src="libs/app.bundle.min.js?v=4900"></script> to <script src="libs/app.bundle.min.js"></script>
After that I forced refresh the page (Shift+F5, normal refresh didn’t work), tried modifying and saving and Jackpooot!! (Take away: You can’t override files fetched with a url parameter). I then was able to beautify, modify and override the app.bundle.min.js implementation and achieved what I wanted.
On Chrome Version 109~ :
Go to F12 > Sources Tab > Overrides (You may need to click the chevron next to Page)
Select/Create a folder to contain Overrides
You can now right-click a file or editor window & save it for Overrides
Image of sources tab where Overrides is located
Something to note: if you are making dynamically loaded JS available in devtools via the helpful: //# sourceURL=Example.js comment, this network to local mapping will not work.
Note: Notice the "//# sourceURL=dynamicScript.js" line at the end of dynamicScript.js file. This technique gives a name to a script created with eval, and will be discussed in more detail in the Source Maps section. Breakpoints can be set in dynamic JavaScript only if it has a user supplied name.
https://developer.chrome.com/devtools/docs/javascript-debugging
When you're using sourceURL, you can't actually find the respective JS file in the Sources tree where you might expect it to exist. It is available to open via the "no-domain" tree, however (or quick open with CTRL/CMD+P).
I'm still looking for a solution.
The easiest solution I found to this problem:
(keep in mind, I was manipulating an html page that lives on my machine)
open the associated html page from the command line so the page displays
for mac, that's simply $ open <name>.html
open Dev Tools
open Sources tab
in Page, open a new .js file there with whatever name you need
write in some text and save
This worked for me. Yes, I had to create a new .js file, but my directory locally recognized it was there when I pulled it, and my editor was updating in real time with the dev tools each time I saved either. At that point, my editor and the dev tools source tab had become one thing.
Currently on Chrome 100.0.4896.60 (Official Build) (x86_64).
I've got a js file with source maps; the override has always been spotted.
I'm able to override the map file (which won't work though for the debugging purpose) and the index.html file.
Apparently my issue is related to minified js with source maps.
Seem to work in relation to the chrome version installed.
I tried the following attempts but didn't work:
remove cache
disable / enable override
add the dir to the workspace
install chrome canary
To debug then I've tried:
build my file.min.js to test. In my case was production/file.min.js
start a npx http-server in production (cd production && npx http-server) which open to http://127.0.0.1
override index.html to consume http://127.0.0.1/file.min.js
Interesting considerations:
When i was doing basic overriding i had to replace the file manually all the times.
Now, I've got a watch task going on and i can basically refresh the page.
I can see as well the source map update.
It's simple! Right click on your page, Go to Inspect, go to the Network tab and tick the check box 'Disable cache'. Reload the page and you will see the effect.

Opening files in tabs in Macvim

I am using Macvim with Janus build. I have installed it just now. I have opened a project by
mvim <project-name>
But problem is that while I am double clicking a file on left hand side project explorer window, it keep on opening in the same window overriding the earlier opened file. But I want, while I double click a file it should open in a new tab.
So I am asking if anyone can help me to fix that. Thanks in advance.
NERDTree opens files in a new buffer because you are supposed to use tabs in vim in a different way. You might want to read :help buffers