Trackpad gesture to switch to header/source - macos

I used to be able to use three finger scroll-up to switch between source/header. Since upgrading to Lion, I it just does a regular scroll. Is there any way to get that feature back?
Aka, it doesn't jump to counterpart when I scroll up / down like it used to.
Update
Apple fixed the issue in Xcode 4.2. So, upgrade your versions.

This is the correct and best answer. It works. It is posted by "#Buyin" above. Another individual commented that it doesn't work. He is wrong. It works, I've confirmed it. It restores the three finger vertical swipe to switch between interface and implementation files (.h and .m) in xCode in Lion.
From your terminal:
Change to appropriate directory (note, if your Library dir is hidden, in the terminal just type the following: chflags nohidden ~/Library )
1. cd /Users/YOURUSERNAME/Library/Preferences/ByHost
List files so you can see the .GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist
2. ls -lah
Open that plist file in xcode
3. open -a /Applications/Xcode.app ".GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist"
Set value to 1 for the key "com.apple.trackpad.threeFingerVertSwipeGesture"
Save the plist file
Log out and back into machine
VOILA!

Given apple took this away (hopefully just for now) the only way I can think of to get this working again would be to install BetterTouchTool[1] and bind the keyboard control - control-cmd-up, ctrl-cmd-down - to the three finger motion. You'd also have to switch the default three finger motion in sys prefs to use four fingers for mission control.
[1] http://blog.boastr.net/

As found in internet:
defaults -currentHost write -g "com.apple.trackpad.threeFingerVertSwipeGesture" -int 1
Logout and Login again

If you're using an Apple magic trackpad, you'll also need to edit
com.apple.driver.AppleBluetoothMultitouch.trackpad.plist
which can be found in the
/Users/YOURUSERNAME/Library/Preferences
directory. Open it and change the threeFingerVertSwipeGesture key to a 1.
Save the *.plist
I also changed both my App Expose and Mission Control swipes to be 4 finder swipes instead of Lion's default 3 finger swipe.
Restart your computer
Hope that helps!

The answer from icnivad was so very close to working for me. With one additional step.
From your terminal:
Change to appropriate directory (note, if your Library dir is hidden, in the terminal just type the following: chflags nohidden ~/Library )
1. cd /Users/YOURUSERNAME/Library/Preferences/ByHost
List files so you can see the .GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist
2. ls -lah
Open that plist file in xcode
3. open -a /Developer/Applications/Xcode.app ".GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist"
Set value to 1 for the key "com.apple.trackpad.threeFingerVertSwipeGesture"
Save the plist file
Restart machine
THEN
Make sure the "Three finger drag" System Preference is disabled. This seems to take precedence and stop the Xcode gesture from working.

Looks like you can now switch using a left and right two finger swipe. Seems pretty buggy though, given that this also scrolls the screen. It also switches the butler from automatic to manual mode.
I'm starting to hate the combination of Lion and Xcode.

Apple fixed the issue in Xcode 4.2. So, upgrade your versions.
Have fun coding and mind the occasional crash.

This stopped working for me in MacOS Big Sur and the plist changes recommended here didn't fix it for me.
What finally fixed it for me was to go to
System Preferences > Trackpad > More Gestures
and change the setting for "Swipe between pages" to "Swipe with two or three fingers". I suspect setting it to "Swipe with three fingers" would also work.

This worked for me in Mountain Lion, XCode 4.6:
a busy cat http://monosnap.com/image/iakMgffAeOtp9G04qLdsnb3v5

I think the reason Apple removed the h/m 3-finger swipe is because they expect you to use the "Assistant" editor, which displays the h and m files together, side by side.
This works, sort of, on a wide screen, although it is an inefficient use of space. But when you're on the road with a MacBookAir, it's a major handicap.
Xcode4 feels like a straitjacket.

Related

Can't see the sidebar in geany 1.27 on mac

I can't see the sidebar in geany 1.27 on Mac OS. Because of this I have no way of seeing the symbol list or document list
Is there a configuration option or else I missed ?
Close Geany, then in .config/geany/geany.conf inside your home dir, set
treeview_position=100
and restart Geany.
When sidebar is collapsed, you can't restore it from the GUI
Per default it should be visible. Check .config/geany/geany.conf inside your home with e.g. vim for this options I could imaging of maybe causing the issue
tab_pos_sidebar=2
sidebar_pos=0
sidebar_symbol_visible=true
sidebar_openfiles_visible=true
sidebar_visible=true
(these values are actually taken from my working OS X configuration of Geany. I'm referring to config file as its much fast the double check than go there click here)

Clear Recent items in Preview Application of Mac OS X..?

Hello all,
Can anyone tell me how to clear the 'Recent items' list in Preview application of Mac OS X through code? Is there a terminal command that can do this?
Or is there any way to click on 'Clear Menu' in 'Open Recent' of the 'File' menu in Preview?
Alternatively, does someone know where Preview stores this information and how do to remove it?
Check out this image to see what I mean.
Ok, so none of the described methods on the websites I could find actually succeeded in getting rid of all the 'recent document' lists in all of my apps.
I feel the most common sense approach would be (for OSX 10.12 / Sierra):
First go to system settings > general and choose "none" in the recent file dropdown menu (my OSX is in another language so the exact terms might be different, but you should be able to see what I mean). / This will get rid of most, but not all recent-items in different apps.
Get familiar with Apple's 'defaults' command in terminal. Now, hunt for any lists you might still want to get rid off, e.g. none of the options mentioned in the answers already listed here helped to get rid of the recent-items list in Finders "GO" menu. I played around with the defaults command and found that: "write com.apple.finder "FXRecentFolders" '({})' && killall Finder" does the trick for me. Playing around I found similar solutions for many of the other apps that where still able to maintain a list of recent items.
Create a shell script containing the commands you found during step 2.
Schedule the script to be run automatically on a preset interval or action (e.g. log out). AND/OR create an alias in your shell's profile (or directly apply the script as a function inside it) so you can call it with a single command from your terminal. (for instance: I have created an alias to it, so when I now type "killrecent" in terminal, it empties all the recent-items lists I've been able to find.
Hope this will be of some help to others. Good luck!
open Preview ->- go to File ->- Open Recent ->- Clear Menu
You may try the approach outlined here, which is to run
defaults delete com.apple.Preview.LSSharedFileList RecentDocuments
in the Terminal (manually or through your app). However I tried this and it didn't work for me (OSX 10.11), since the Preview defaults file doesn't contain this entry.
You can use
defaults write com.apple.Preview NSRecentDocumentsLimit 0
which will hide all recently used items, but as soon as you set that number to anything greater than 0, they will show up again.
I also checked the ScriptingBridge Interface for Preview, but couldn't find anything useful. So unfortunately it looks like this is not possible.
with 10.11, there are at
~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.apple.preview.sfl

Why does Command + V behave like Page Up?

On OS X 10.10 (Yosemite), the keyboard shortcut to paste the clipboard Command ⌘+V behaves like Page Up.
Right now I'm able to reproduce this issue only in Mail and Evernote.
Pressing Super+v, Super+v does pageup, paste though.
I use Karabiner to remap some keys, but never Command ⌘ keys.
If I close Karabiner it doesn't change anything.
I have at some point used vim, the pbcopy terminal command, and some OS configuration from https://github.com/mathiasbynens/dotfiles/blob/master/.osx
But I don't see why this could be a problem.
Does anyone know how to fix this or why it happens?
Are you able to replicate this issue in multiple users on your machine? If so, then the issue is likely to have something to do with the modifications you outlined above (such as Karabiner or Vim), or some larger operating system related issue.
If you're not able to replicate the problem in multiple users, it could be related to a problematic preference file. If you open a Finder window and navigate to ~/Library/Preferences, you could try moving the com.apple.HIToolbox.plist to your Desktop, logging out, then logging back in and testing again.
Let us know if either of those suggestions help!

How to make application autorun on Mac?

I want to make my application autorun, like using autorun.inf on Windows. I googled and there is one way for me to do that:
"On the Mac side there are many applications you can buy for creating a Finder window that looks a certain way but all these changes can be made within finder. You then will need to copy the DS_Store file to the CD and finder will automatically apply any changes that you have made.
Also using -hfs-openfolder will cause it to open automatically when inserted on the mac."
Can anyone tell me more clearly about that, or is there any other way?
Thanks so much.
According to this page, you should be able to do that with bless:
sudo bless --folder "/Volumes/discName" --openfolder "/Volumes/discName"
The man page confirms that, at least on 10.6.8. I don't have Lion in front of me right now.

xcode The document "..." could not be saved

I use xcode 3.2.4 on snow leopard. Today when I tried to save a file on my project I get an error message saying: The document "nameOfFile.m" could not be saved. I tried reinstalling xcode but no luck. The file can be edited with other editors and I see the same behavior on all my projects as well as newly created projects. Any ideas?
Simply by rebooting the computer the issue was fixed.
We were having this problem in a lab environment where user files are mounted via NFS.
The client machines are running OS X 10.6.7 and the file server is running Debian Linux.
After much grief and reading /var/log/syslog on the client machine I discovered it was a subtle file locking / race condition issue with the file system. Evidently, when editing files in a "bundle" (e.g. as in an Xcode project), the OS is using some form of "safe writes" which involves writing transient data atomically to ~/Library/Caches/TemporaryItems/ (which of course is on the NFS mounted system) -- there is a race here that requires proper file locking. We hope we have fixed the problem by changing the nfs_mount options
as described in Mounting NFS volumes in OS X
Not sure why but the temp files ended in a odd state. In "/private/var/folders" I simply removed all the folders and it cleared up the problem
cd /private/var/folders
sudo rm -fR *
Note: never do a "sudo rm" unless you really know what you are doing. It can cause irrecoverable damage
I restarted XCode (by a force-quit, not just closing it) and that fixed it for me.
Make sure you have you mouse focused on the code area and not the file in the file list.
Cleaning the project (Product > Clean), then force quitting Xcode (Command + Option + Escape, select Xcode, click Force Quit) solved the issue for me. I'm not sure if the clean was necessary, but that was what I did. Upon re-opening the project, I let Xcode index the project before doing anything, then did a Build, and all is well.
Force quiting Xcode for me worked. I would recommend the same.
Hey........... even i faced the same problem..... But got the answer......
steps:
reveal in folder the project.
select the file that is locked
select 'GEt Info'
deselect ie uncheck the label 'LOCKED' in the Info.
I just ran into the same problem, then I noticed I ran out of disk space. You can disable the warning that pops up when you run low on disk space (perhaps not a wise thing to do). I did that a few days ago and was puzzled for a moment when this message appeared. They could've just said "Disk full" or something instead of "cannot save". Anyway if anyone ever runs into this just free up some disk space.
You might be able to save in an external editor because its not also building your app which might use up the little remaining space. It might also be why it worked after rebooting (if OS X cleaned up some cached stuff on reboot) so it seems plausible.
Either that or your HDD might have just crashed.
tic....tic....tic.....
In my Case, the File which was saying document could not be saved was basically Shortcut/Allies of the file present at another place.
I don't know why it was not able to save if it was opened by shortcut/allies in xcode but by overwriting(Copy and Paste) the orignal files to that shortcut my problem was solved.
Regards
Umair Bhatti
1.Right click on that file
2.Go to Show in Finder .
3.Click on get info .
4.Goto Sharing & Permission
Everyone,username,Fetching & selection ----You can choose appropriate read write option.
I have face this issue many times. I followed below steps to fixed this.
1. Select file->Show in Finder
2. Copy those file and past different destination.
3. Remove those file from xCode (to selecting show in finder)
4. Then again add those files from other destination to actual location
5. Clean code and run the code.
Another possible reason is that the file you are trying to modify is an alias (i.e. a soft link).
You will have to modify the source file directly in this case.
Thanks #Wayne Cochran,
When I use Xcode to save it, I rebooted the machine several times, and all failed.
So I changed to Visual Studio Code to edit and save. Then it's OK.
Just change the file editor
This can happen when you are working with a network hard drive (or are on a cloud) and not connected to the network (connection lost)

Resources