In running yarn upgrade-interactively, how does one actually mark individual modules for an upgrade?
The "Enter" and "X" and various other keys don't check-mark the modules in the list and neither does clicking them with a mouse!
In the latest version of Yarn, instructions are printed on the command line: The space bar selects individual modules and "a" selects all modules for update.
Related
My Simulators are destroyed somehow after installing different Xcode Versions on my machine, moved and renamed them etc. . Is it possible to remove all current Simulators listed inside the Devices Manager and do a clean reinstall or do i have to remove and add them manually ? I tried to reinstall Xcode with no success.
Yes, it is possible to remove / Add all of them, or whatever type you want. Go to
Xcode > Window > Devices
From here, scroll to the bottom, where you will see header saying "Simulators". Those are all simulators that you created (or system created), you can right-click and delete them. There is also button "+" at the bottom, where you can readd them.
Here is screenshot of how it looks:
Hope it helps!
EDIT: If you want to delete them all at once, please use following script, as it is not possible to remove them all at once from the UI:
https://gist.github.com/cabeca/cbaacbeb6a1cc4683aa5
Is there any way to disable Sublime Text 3 firing code completion, when cursor is inside single or double quotes:
This seems to be pointless behaviour and is a little bit annoying.
I'm using newest stable (3065) Sublime Text 3, with PHP Completions Kit plugin, if that matters.
So it turns out that your PHP Completions Kit plugin is probably to blame. I forked the code on Github if you'd like to follow along.
You can populate the auto-complete dropdown in Sublime by creating a JSON-formatted .sublime-completions file. Essentially, it's a long list of snippets with associated triggers, the names of which show up in the dropdown and are matched by a fuzzy search method based on what you type. The completions are all scoped so they only come up in the desired parts of your code: for example, you wouldn't want standard function names coming up when you're trying to define a class, etc.
Back to the plugin. For several of the completion files, the scope was built up using negative selectors: starting with source.php (the base scope for all PHP code), and subtracting unwanted scopes. Once analyzed by Sublime, the completions would show up anywhere except where they were explicitly denied. An example, from function.sublime-completions:
"scope": "source.php - variable.other - meta.function.arguments - support.class - entity.other.inherited-class - meta.use - meta.catch - comment.block.documentation.phpdoc"
So those were all the places the author didn't want these completions to show up. Unfortunately, in these several files, s/he forgot to include the string scope, so completions appeared when you were typing strings, clearly undesired behavior. Fortunately, the fix is easy: go through all the completions files, check the scopes for negative selectors, and add - string to the end of them. Now, they'll still work exactly the same as before, except the completions won't show up in any kind of string.
Like I said at the top, I forked the project here, and have made the necessary corrections. I've also submitted a pull request, so we'll see if/when that gets accepted into the main code base. In the mean time, feel free to clone my repo into your Packages directory:
Click on Preferences -> Browse Packages... to open up your Packages directory. Go to that directory via the command line, then run
git clone https://github.com/MattDMo/sublime-phpck.git "PHP Completions Kit"
This will clone the repo into a folder named PHP Completions Kit, overriding the one installed by Package Control. Keep an eye on the plugin's Package Control page, and when you see the Modified field change from 2014-09-05 (it's in the tooltip if you mouse over the text 3 weeks ago) to sometime more recent, check the repo to see if it was my pull request that got merged and a new version released, and then you can feel free to delete the new folder in Packages and just stick with the Package Control version, as I won't be keeping my repo up-to-date on any new modifications to the package.
Update
My pull request has been merged, and Package Control has been updated.
i am using vs.net with tfs. I have 1 workspace at the moment for 1 solution. I just did a get latest from another solution but now it already checks stuff out in the same workspace? how can I get one workspace for each solution so every things stays seperate?
With opened 'Source Control Explorer' navigate in VS to
'File' > 'Source Control' > 'Workspaces...'
From there you can generate any number of workspaces, containing any number of source control paths.Once you have generated your workspaces you toggle from one to another from within 'Source Control Explorer'
Inside a workspace you can create several mappings. A mapping links a directory in your source control to a path on your local drive. You can map *$\Team Project\trunk* to c:\temp and $\Team Project\Component\Subcomponent\trunk to *c:\somepath\someotherpath*.
Now you can call Get Latest. This can be done on several levels:
Get Latest on $\
Get Latest on $\Team Project\
Get Latest on $\Team Project\trunk\
The first one updates all your local mappings because the Get Latest has been done on the topmost level of your source control.
The second call will also update both mappings, because both mappings are below *$\Team Project*.
The third call will only update your first mapping because it's the only mapping below this path.
So the conclusion is: You do not have to separate your Team Project mappings into several workspaces. You just have to take care of the level you call Get Latest on.
I remember seeing it from the release notes of an earlier XCode version saying that it allows the three all in one IDE since then, instead of having to switch back and forth between the different windows when working on build, debug and editing. But with the latest XCode install, I still have to do that in separate windows. Is there a special setting to merge them all together under one IDE/window?
It's in XCode preferences, called "All in one" layout. Check this:
http://img.skitch.com/20101121-xsxhc34ywurcf14yuhm6hna5qi.png
Note that in order for that to be changed - all projects must be closed.
Is there a way to force Xcode to trim trailing whitespaces when I save file?
I'm using version 3.1.3 if that matters.
Starting from Xcode 4.4 whitespaces will be trimmed automatically by default, unless the line is all whitespace. You can also activate Including whitespace-only lines to fix this, which is not active by default.
Go to Xcode > Preferences > Text Editing > While editing
I'm using the Google Toolbox For Mac Xcode Plugin, it adds a "Correct whitespace on save" parameter that trim trailing whitespace on save. I missed that a lot from emacs.
You can create a script and bind it to a keyboard shortcut:
Select Scripts Menu > Edit User Scripts...
Press the + button and select New Shell Script
Give it a name like "Strip Trailing Spaces", and give it a shortcut like ⌃⇧R.
Set Input to "Selection" and Output to "Replace Selection"
Then enter the following script:
#!/usr/bin/perl
while (<>) {
s/\s+$//;
print "$_\n";
}
I find using the new Automatically trim trailing whitespace -> Including whitespace-only lines as suggested by #MartinStolz works well while editing but I sometimes need to do Cmd + a -> Ctrl + i and save the file multiple times with the file in focus when I'm not editing.
In case you want to clean a whole project (excluding .md files) without using scripts, you can also do a Find & Replace -> Regular Expression. Since this technique removes trailing space and tabs for documentation/comments as well, you can also try a negative lookahead for blacklisted characters to filter out single-line comments.
Find all trailing whitespace:
[\t ]+$
Find trailing whitespace without touching single-line comments:
^(?!.*\\\\)[\t ]+$
Replace:
<nothing>
So linting can also be done without swiftlint autocorrect or similar third party solutions.
For Xcode 8, I installed the swimat Xcode plug-in, for formatting Swift code, which removed all trailing spaces and whitespace-only lines.
Installation Methods
Install via homebrew-cask:
brew cask install swimat
Download the App directly:
https://github.com/Jintin/Swimat/releases/download/v1.3.5/Swimat.zip
Clone extension branch and archive to Mac App.
Usage
Once installed, you can run Swimat in Xcode via Editor -> Swimat -> Format.
This is not possible in Xcode 3.2
Edit:
I answered this question so briefly because there's no way to do this properly.
Of course, since it's software, you can do anything: Starting with Input Manager hacks or other ways of code injection to system wide keyboard interception, you can alter your local system to do anything anytime. You could set up an Applescript folder action (arrgh) or use a launch demon and the FSEvents facility to watch your source code files.
You can also add a couple of scripts to Xcode (user scripts in the menu, script phases in targets, custom Actions in the organizer, there's even the very unknown possibility a startup script), but all these solutions are flawed, since it involves the user or custom setup on the user's machine.
I'm not aware of a solution which simply works after checking out a project from SCM. I believe that there's need for this and similar customization scripts, so I filed a bug (radar 7203835, "Feature: more user script triggers in Xcode workflow"). I did not receive any feedback yet.
Here's the full text of the radar entry:
It would be useful to have more places to run scripts in Xcode.
Examples:
Pre build scripts
Pre build scripts could be used to build prerequisites like *.xcconfig files or config.h headers. This is not possible with a "Run Script Build phases", since dependency tracking takes place before any build phase is triggered.
Post build scripts
Similar to above, but running after the build
finished (including code signing etc).
Useful for additional packaging,
validity checking etc.
Pre/Post SCM Commit scripts.
To check project integrity.
Pre/Post File Save Script.
To check/alter a file before saving. E.g. run cody beautifiers
Custom project actions.
I'm aware of the organizer's ability to define arbitrary actions. But this is a per user feature (not part of the project). I'd like to define actions like build or clean that show up in the build menu and that are part of a project.
See here for Xcode4: http://www.wezm.net/technical/2011/08/strip-trailing-whitespace-xcode-4/
Cool, Google toolbox for Mac now adds a "trim whitespace" option for Xcode4.
http://code.google.com/p/google-toolbox-for-mac/downloads/list
Thanks you, Google!
The best and easy way without using scripts, hacks and much more.
Just go to Find And Replace and press alt/option + space and press space button in the replace bar and then click on replace all.
It will replace the whitespaces with normal spaces and the warning/ error will be gone !!
One way not perfect but it's working is to use Find and Replace.
Find double space and replace with nothing.
And after that Command+A and Control+I.
As I said is not perfect maybe you need to fix something, but for me worked.