How to set an external editor in Xcode 4.2 - xcode

All the posts I have found suggest going to the "file types" sub-section under XCode preferences and adding an external editor for a specific file type. However this options does not seem to be there on XCode 4.2.

It looks like it just goes through LaunchServices, so... whatever you'd get by opening it using Finder by default.

I had a look around and I couldn't figure it out. I notice that right-clicking on a source file, there is a greyed out option for "open in external editor." I couldn't figure out how to get that working at a glance.
A reasonable workaround would be to right-click on the source file you want to edit, click "Reveal in Finder," and then edit the file in the editor of your choice. The changes will be automatically updated in Xcode. I think you'll lose any undo/redo history you may have had for that file in Xcode though.

you have to make the editor you want is the default editor for the file type(cpp/h/lua ..).
step: first time you 'show in finder', then open the file with 'open as', then choose the editor you want, make sure you choose the 'always open it'. then every is ok now.

I agree that you need to change the default setting for the file type in Finder. The best way to do that is to right-click any similar file in Finder. Select Get Info from the pop-up menu. Then look down the list for the "Open with" drop-down option. Select your chosen editor and then below the words "Use this option to open all documents like this one" click on "Change All..."
Then it will change the default for all your applications.

Related

XCode: Quick open property list file e.g. info.plist as source code?

In Xcode you can "quick open" files by selecting File/Open Quickly. When I enter the file name of a plist file, then this file is opened as "Property List". But often I want to open the file as "Source Code". How can I quick open property list files as source code?
The fastest method to open property lists in Xcode as source code is the following:
Press ⌘+⇧+o to get the Quick Open Dialog
Enter name of property list file e.g. "info.plist" and press "Enter"
Open "Version Editor" -> Property List File is shown as source code
Hmmm....I don't think you can, unless you set up the Open As > source code commands as a custom behavior with a key binding.
Apple is discouraging opening plists as raw XML. Their guidance on how to deal with .plists is here
I was able to accomplish most of what I needed with that, especially after discovering the trick for showing the actual names of the keys:
Important: The property list editor in Xcode displays human-readable strings (instead of the actual key name) for many keys by default. To display the actual key names as they appear in the Info.plist file, Control-click any of the keys in the editor window and enable the Show Raw Keys/Values item in the contextual menu.
If you still need to see the .plist source, though, there are two ways:
1) show the version editor. The source of the previous and current versions are shown side by side.
2) use the file browser... (there should be a way to automate this with Xcode behaviors)
Hold the Control key while selecting the file in the file browser.
Select 'Open As..'
Select 'Source Code'
It's certainly not as fast as OpenQuickly, but it does work.
Xcode 12
Right-click Info.plist > Open As > Source Code

Notepad++ replace "Save" Common File Dialog Box

In Notepad++ (Windows 7), is there a way to disable the Common File Dialog Box when saving a file? I would like to replace it with the standard Save File Dialog Box.
Notepad++ uses this dialog box for saving:
I would like to use the following dialog box:
Adding shortcuts to "My Place" bar is not an option as I don't plan to use the Common File Dialog Box at all.
The feature was implemented on 2017-01-30.
Settings > Preferences... > Default Directory > Enable "Use new style save dialog (without file extension feature)".
#Tamarindo94 found where the setting was a couple days ago:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/176#issuecomment-299876885
From the sounds of it this feature is on the books for the next release of Notepad++ once the support for XP goes away, details here: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/176
I noticed in Notepad++ they still don't have Favorites but they do have Libraries. My work around was to use Libraries instead of Favorites. You can actually add a Library that points to any folder you want. In Windows File Explorer on Windows 8, I had to go to Folder Options and check to turn on "Libraries" so that I could see them. Then I was able to right click and create Libraries pointed to the folders I wanted.

How to change file associations in Mac OS X

So I used Xcode and all. Now, whenever I open my text files it opens automatically with Xcode. How do I undo this?
RightClick on the file name -> Open With -> Choose the editor you wish to open with this kind of file. And that sets to be default editor for opening files with that particular file extension ( i.e., .txt ) when opened in future.
Edit: The above procedure is not a permanent one. Try this -
Right click on the file name.
Choose Get Info
Choose one from the Open With drop down. This will be set as default application and is used in future if opened the .txt file.
Right-click any text-file an select "Get-info", then choose your preferred Text-editor under "Open with" and click "Change all..."
You can change program association by right clicking on your file and clicking on "Get Info". This will bring up another dialog in which you can change the program associated with that file type.
You can find visual instructions here: http://osxdaily.com/2009/10/25/change-file-associations-in-mac-os-x/

Multiple editor windows in Xcode

When coding in Xcode, I double-click a file in the "Groups and files" list, and it opens a new editor window. I have several of these open at once.
Until today.
Today, when I double-click a file in the list, it opens the file in the last editor window I was using, meaning I can only have one editor window up at any one time.
I guess I've switched some option somewhere by mistake. How do I get it back to the way I like it?
I'm using Xcode 3.2.5
In the top right of the editing window is an icon that says "grouped", perhaps you clicked on it by accident.
Click on it so it says "ungrouped", and you'll be back to opening multiple windows.
perhaps preferences>General>Open Counterpart in same Editor

Open Dialog preserving settings

How does one preserve the settings in the Open Dialog box? For example, I would the Open Dialog to remember that I chose the Details view and sorted by date modified.
Microsoft didn't see fit to give us any documented way of doing this, but some people have figured out bits of the puzzle. This link shows how to set the view, but not how to get the current setting:
http://msdn.microsoft.com/en-us/magazine/cc164009.aspx
I'm not quite sure about this about isn't it an OS setting. If the user choose their Folder Preferences such as then Windows will remember or not. In this case from accessibility and usability point of view this is User's preferences.
You could inherit from the dialog's class and then see what can be overriden to do the persistence of its state.
Simple non-technical solution.
This worked for me (WinXP SP3) in some cases but not all. Since you don't have the option of changing things in a common Open dialog, you can try to do it in Windows Explorer.
Open Windows Eplorer. If you want to change the sort order, go to the details view and click on the column to sort, normally Name, but you may want to sort by Date. Now change
the view back to whatever you want. Now select "Tools" then "Folder Options". On the General tab, for "Tasks" select "Use Windows classic folders," for "Browse folders" select "Open each folder in same window." Now click the "View" tab. Scroll down and check the box for "Remember each folders view settings." If it's already checked, uncheck it then check it again. Click the "Apply" Button at the botton of the window. Click the "Apply to All Folders" button near the top. These settings may show up in your Open dialog. Having done this you can now change the settings in Windows Explorer or any other Folder window that allows you to change them and that Folder window should remember them. This fixed the Open dialog in my qraphics editor but not in my video editor.

Resources