Create shortcuts for commands in windows 10 - windows

Its a general question, but I think that with my cenario is easy to explain. My deal is the following:
I have some files, I want to move them to a new folder that I am about to create, usually I press ctrl+shift+n to create a new folder, then I go to the files, select them and press to ctrl+x to cut, then go to inside the folder and paste.
I would like to do something like that:
Select the files, press some combination of keys, some that doesn't exist, and it creates the folder, let me give the name, and after I press Enter it moves the files to the folder autoatically.
Keep in mind that this should be something general, something I can write to a script or anything and use for multiple cenarios.

Related

How to add subfolders to the Context Menu by hand with registry

I have 2 programs and i want to add a folder with 2 subfolders to the right click menu on a file (Context Menu), so, when i press on a file, it shows me the name of the folder. When i move the cursor onto the folder, it should show the 2 subfolders (for 2 programs that i made that change size of this file.
MY PROBLEM: I don't know how to tell the registry that the folder (called MyPrograms, see below) has 2 subfolders.
IMPORTANT: I do NOT want to use software like Easy Context Menu.
This is how it looks so far.
When i press right click on a file, it looks like this:
You see that the last option has an arrow, i want the same, so subfolders.
[1
The Values of my Keys are the following
This now looks a bit weird.
Thank you for your time.
I had to add this "SubCommands":
Now there is an arrow.

Need a solution to open a custom file, print it, close it, and move onto the next file

Forgive me if this is the wrong place to look for help, but I have a problem in need of a solution:
We have a large collection of files with unique names that only open up in a specific editor. Embroidery files specifically (.dst or .pof). What I would like to do is print a matching library of these files as .pdfs. So, what I am after is a script or program that will open the file in the editor, print it, close it, and then move onto the next file in the folder till all are output.
Does something like this exist? Is there a custom script I could execute that would accomplish this?

how to group snippets in textmate

I have got a nice bunch of shell scripting snippets that I'd like to categorise (file manipulation tools, networking scripts etc.) I can only add scripts but not group them together (so I can hover over a group called for eg Networking and a submenu then lists my snippets. Does anyone know how to do this? I thik this would be really helpful given how many snippets I have
Perhaps the first question is should you? Read this disclaimer from the mailing list and decide for yourself.
This is currently not possible in the bundle editor it has to be done manually. It will be added as we revise the bundle editor shortly. Since it’s going to be added it’s not really worth describing how to do it manually unless you're really interested.
[as of Jan-2015]
If you really are interested, keep reading:
First back up your bundle. Then using XCode's plist editor, open your bundle's info.plist.
Your bundle is located here: ~/Library/Application Support/Avian/Bundles/[Bundle Name]/
So your info.plist is located here: ~/Library/Application Support/Avian/Bundles/[Bundle Name]/info.plist
In the info.plist: Create this structure if you don't already have it.
Right click -> Add Row -> "mainMenu".
Change "mainMenu"'s type to Dictionary.
Create nested items "submenus", "items", and "excludedItems", changing "submenus"'s type to "Dictionary" and "items" & "excludedItems" to Array.
Open Terminal.app and run the command uuidgen
Copy the output. (from now on called [UUID#1])
Create a new item under "submenus", naming it by pasting [UUID#1]
Change [UUID#1]'s type to Dictionary.
Add a child to [UUID#1] named "name", set its value to "Network Scripts" (or whatever)
Add a child to [UUID#1] named "items", set its type to Array
Add items using the (+) button, each item is a UUID from your commands. To get this UUID, open the command's file in TextMate. If you try to Open the .tmCommand file directly TextMate will complain, "The bundle item [Bundle Item]; is already installed".
a) You can simply open the Commands folder, and TextMate won't mind opening the files from the file drawer.
or
b) or `mate ~/Library/Application Support/Avian/Bundles/[Your Bundle]/Commands/[Your Command].
When the file is open find these lines. You're string will be different but formatted the same.
<key>uuid</key>
<string>8E9BA0D3-E282-4516-8565-E920EA98C898</string>
This is the UUID for your command. Now known as [UUID#2]
Go back to the info.plist, in step 9 you created a "items" array, add [UUID#2] to the array. Repeat 10 - 12 to add multiple items.
Now all you have to do is add your new sub menu to your 'mainMenu.items', simply add [UUID#1] to the array. (This final missing step thanks to the mailing list, thread "How to move, order or group bundle items in a TextMate 2 Bundle?", thanks Nigel!)
For me; the changes were reflected without a restart.
Do be sure to save your .plist file between modifications.
Once complete back up or commit the plist, you wouldn't want to lose it incase of something terrible happening.

how to come back when you are reading code in Xcode?

I have been developing in zend studio and there is a feature I miss a lot in Xcode. When you are reading code in a main function and you want to go in a specific function to read something, you can click in the left area of your current line of code were your are, and a flag-mark appears in that line of code, so you can go anywere else in the code and it will be very easy to come back to that line of code you were before because there is a flag and you only have to click on it and you automatically go back. Does Anybody know a similar way to do this in Xcode?
Unfortunately, this feature was present in earlier versions of Xcode (up to Xcode3 IIRC) and was called "Bookmarks", but it was removed since then.
You can use breakpoints (and disable them) as a workaround, even if it's not perfect. I personally prefer using other tricks, like "Open Quickly" and named tabs.
Alternate trick 1 : "Open Quickly"
One trick is to use Command+Shift+O (or "File" menu > "Open Quickly") to quickly open a file. In the field that appears, you can type:
The name or parts of the name of a file.
Typing "MainViewController" will propose to jump to the MainViewController.h or MainViewController.m file.
Typing "MainVC" will work too, as well as "MainViewCtrl", as long as the order of the letters you type is the same as the full name.
Very handy to just type "ContTVCell" to open the ContactsTableViewCell.h file that is hidden deep in subgroups of my project for example
Similarly, you may also type the name or parts of the name of a symbol, especially a method name.
For example, typing tvcellforrow will list you all the definitions of -tableView:cellForRowAtIndexPath: it could find in your project and let to jump to the one you want
When typing (parts of) the name of a file, adding : followed by a number at the end will allow you to directly jump at the corresponding line
For example, typing mvc:50 will propose you to jump to line 50 of MainViewController.h or MainViewController.m
Another trick : using (named) tabs
Don't forget that you can open tabs in Xcode, which can be very handy in this kind of situation.
When you are editing a file at some interesting position, you can create a new tab to browse elsewhere and go at any other place… and then go back to your first tab to find the code where you left it at the time you switched to the other tab.
Don't forget that you can name your tabs (simply double-click on their title) to give them a more explicit title. You may then quite think of them as "named bookmarks" somehow
Likewise, don't forget that you can detach tabs in separate windows too, if you prefer (for example to keep them around and visible on your secondary screen while you edit another part of your code)
You can even combine this with the "Open Quickly" trick presented above: once you made the "Open Quickly" field appear and typed something into it, instead of just validating using the enter key:
use Alt+Shift+enter to let Xcode present you a small widget that let you choose where you want the file to open (in the current tab, in another tab, in the assistant editor, in a dedicated window…)
use Alt+enter to open the file using the alternate navigation defined in Xcode preferences (Xcode > Preferences > Navigation > Optional Navigation). By default, the behavior when opening a file while using the Alt key is to open the file in the Assistant Editor. Personally I changed that in my Xcode preferences as I prefer to make Xcode open the file in a separate tab instead, which makes Alt+clic much more useful.
Sure, all those tricks with "Open Quickly…" and "Tabs" do not replace the bookmarks feature that you are missing. But they are still nice alternate ways to jump quickly to any position in your code, even any specific line of any specific file in your project, wherever you are in Xcode (even without having to have the Project Navigator visible on the left part of your window), and let you have multiple editors in different tabs to go quickly back to a part of interest in your code
its on top of your editor i have added two pics just check them.
When you navigate to another place in Xcode, say, open a different file, or Command-click and jump to definition, you can go forward and back by swiping right or left on the trackpad with two fingers.
You can also use keyboard shortcuts: Ctrl+⌘+→ to go forward, or Ctrl+⌘+← to go back.
Finally, you can click triangular buttons at the top left in your edit area.
There is a go back button at the top left of the editor!
If that is not good enough, whar I do is misuse breakpoints to set flags in my code. The breakpoint navigator thus becomes a table of flags. It isn't much but there you are.

Fastest way to "jump back" to a file in TextMate?

Often, when I am reading code or debugging, I want the ability to quickly jump around files. I especially want to "go back" to where I was. I know about "Command+T", "Command+Shift+T", and, bookmarks. But, I cannot figure out a way to jump around files quickly.
UPDATE: I do not think I my question was clear enough judging by two answers given. Specifically, I am looking for a way to "jump back" to where I was in a file. I know how to navigate in TextMate (in general). I want to know if TextMate has a "jump back" key binding.
It's subtle.
The command-T thing has the files listed in Most Recently Used order.
So, you can go command-T return to get back to your last file real quick. At first I couldn't find it either.
I don't think there's a go to last edit location as there is in, say, IDEA/RubyMine.
Courtesy of MacroMates.com
2.3 Moving Between Files (With Grace)
When working with projects there are a few ways to move between the open files.
The most straightforward way is by clicking on the file tab you need. This can also be done from the keyboard by pressing ⌘1-9, which will switch to file tab 1-9.
You can also use ⌥⌘← and ⌥⌘→ to select the file tab to the left or right of the current one.
It is possible to re-arrange the file tabs by using the mouse to drag-sort them (click and hold the mouse button on a tab and then drag it to the new location). This should make it possible to arrange them so that keyboard switching is more natural.
One more key is ⌥⌘↑ which cycles through text files with the same base name as the current file. This is mainly useful when working with languages which have an interface file (header) and implementation file (source).
When you want to move to a file which is not open you can use the Go to File… action in the Navigation menu (bound to ⌘T). This opens a window like the one shown below.
Go To File
This window lists all text files in the project sorted by last use, which means pressing return will open (or go to) the last file you worked on. So using it this way makes for easy switching to the most recently used file.
You can enter a filter string to narrow down the number of files shown. This filter string is matched against the filenames as an abbreviation and the files are sorted according to how well they match the given abbreviation. For example in the picture above the filter string is otv and TextMate determines that OakTextView.h is the best match for that (by placing it at the top).
The file I want is OakTextView.mm which ranks as #2. But since I have already corrected it in the past, TextMate has learned that this is the match that should go together with the otv filter string, i.e. it is adaptive and learns from your usage patterns.
If you have a project window open, you can leave frequently-accessed files open (in tabs), and then use ⌘+1-9 to jump to open tabs.

Resources