Contextual menu Mac OS X - Pasting a text string - string

I would like to know if it is possible to set up a contextual menu option that allows me to select a string, e.g. from BBEdit or TextEdit etc., and after selecting it > right click > call Contextual menu item > Paste/Replace with string of text.
For example, if I had a text file open and wanted to select the word "blue" I would like the contextual menu item to be able to replace that with "red."
Yes, this is like copy and pasting, but there's a reason I am asking for this specifically and it would save me tons of time at my job.
I am not an experienced programmer, so consider me to be a complete newbie.
I want to do this in Automator. I know all the steps to get to the building part, just don't know which Utilities item to use for something like this.

I did figure out how to do it with a keyboard shortcut, though I'd also like to have a universal right-click contextual menu option. I used to use some app to do this for me in the old days.
Here's what I did. Go to Automator, select "no input" and "any application" above the actions window.
On the left, click on Utilities, drag "Run AppleScript" into the window on the right.
Insert, into the middle:
tell application "System Events"
keystroke "Text You Want To Input"
end tell
Save it, then go to System Preferences » Keyboard » Keyboard Shortcuts > Services, and find your saved title. Create a keyboard shortcut.

Related

How to exclude some directories from "Analyze -> Inspect Code" in Android Studio?

One code directory is from a long working library, but the code inspector complains about many issues in it. How do I exclude it from analysis?
I've tried looking at the settings, and also tried right clicking on various things through the analysis.
I'd like the code inspection to work for most of my project, but not from parts of it that work and analysis is unneeded. In this case, it is a complex open source C language library where I do not want to touch the code.
Okay - I feel a bit dumb, but so others don't have to go through this, here are details. Also, it is very easy to screw this up - the Android Studio GUI will let you do stuff that looks good in the dialog, but doesn't work. It took me several tries to find the magic that works.
Here is the procedure:
From the main menu, select "Analyze" then "Inspect Code"
Click the button next to "Custom Scope"
Click the three dots button - to the right on the same line. A new dialog will pop up.
Click the plus ( + ) - upper left, to start a new Custom scope
Give it a name
Select "Local" or "Remote"
In the drop-down of the new dialog, select Project view
Of the four icons, click them until only the one for file display is emphasized
Find the top directory of what you want to analyze, and click "Include"
Find each directory you want to exclude, and click "Exclude" for each
Click OK - the custom scope dialog will close
Click OK - the analysis will run
In the future, that scope is available by name, but remember that it does not honor the implied scope if you right-click a directory in the hierarchy.

Moving between text and input and textarea areas without using mouse and closing panels

In the majority of programs and sites it is possible to switch between input and textarea fields by means of combinations of the Tab and Shift+Tab keys.
But in Sublime Text Tab — tabulation.
For example, for me open Goto Line Panel and console.
May I move between entry fields and my text also as in the majority of programs becomes by means of keyboard combinations of Tab and Shift+Tab? I know, what the Tab and Shift+Tab keys is needed for tabulation, but any combination of keys can be used to move between input and textarea fields.
Thanks.
TAB will not work but this can be achieved by series of shortcuts:
Opening line selector: Ctrl+G
Opening search: Ctrl+F
Going from search to founded string: Alt+Enter
Shortcuts above are available on Linux version. They may be different on Windows but they are there and can be found in online documentation.
With Sublime Text you can personalize your shortcut!
I found this guide on the official website and this "different but useful" question about it.
So you can create your own sort of switch with comfortable combination. Example:
alt+1 to go to search
alt+2 to go to the text
alt+3 to go to the bottom
...
this is also faster then the "tag way" because it is not cyclic!
i haven't tried it but as mentioned by Draco the commands to move exist so you can just make them more comfortable.

Code::Blocks Find Window Closing

I was wondering if there is a way to keep the "Find" window open in Codeblocks IDE (I'm using v13.12 if that's relevant). I'm talking about the window that usually opens (in any IDE) when you hit 'cntrl + F'. In Codeblocks it keeps closing everytime I hit 'Find'. I would rather it stay open like in Eclipse, Notepad++, and so forth.
I normally use the "Find in files" function instead of the normal Find function.
When pressing Ctrl+F select the second tab in the window and you will find "Find in Files".
Normally I use the scope "Project files" which limits the search to the project only.
After a search you will be provided with all the results in the bottom log window in the tab "Search results". You can then easily click around on all matches and C::B will jump to the file and location.

VS2012: Ctrl+F now synchronizes with Ctrl+Shft+F

In Visual Studio 2012, I want different context for Ctrl+F and Ctrl+Shift+F. However, when I enter data in the Ctrl+F dialog (in the upper right corner of the text editor), it synchronizes that information to the dialog shown by Ctrl+Shift+F. I don't want that. I want Ctrl+Shift+F to do a search in the Entire Solution for now and forever. How can I disconnect these dialogs? I'm using Resharper 7.1 and VSCommands11, if that changes things.
(And why does Ctrl+F take three seconds to show the dialog in the upper right corner? It bugs me when I press Ctrl+F and start typing only to find that it changes my source file.)
Open the options-window. (Tools->Options). In the tree on the left side select Environmend->Keyboard. There are two entries relevant for you:
Edit.Find is for the Search-Box at the right upper corner (Ctrl+F)
Edit.FindinFiles is for the SearchDialog (Ctrl+Shift+F)
Maybe any of your VisualStudio-Extension has set these Commands to other commands.
In my studio both searches are separated from each other. If I set Entire Solution in the Ctrl+Shif+F-Dialog, that does not affect the Ctrl+F-Dialog
Please try this: Tools/Options/Environment/Keyboard > click reset button

in Applescript, can you add an item to the left menu bar if you’re creating an app?

Hello I’m Tate and I have a Question.In applescript, can you create an item for the left menu (application menu) on mac that is not already there by default? if you know the answer, please tell me.
I don't know of a way to add menu items to the application menu bar, but you might check into FastScripts, which offers the ability to customize a script menu with whatever order of scripts you like and with keyboard shortcuts. It's free for any number of scripts and up to 10 keyboard shortcuts.
Also, although I've never used it, ThisService apparently allows you to use AppleScript to add items to the Services menu in the application menu. You might check it out also.
Automator can save Applescripts so that they show up in the Services menu in each Application menu. Just run Automator, create and Applescript workflow and save it as a service. You can assign a command key to it as well.

Resources