Set Left option key to Left command key and Left command key to Left option key (and do the same for Right command and Right option if you please). One common need is to exchange cmd and option. You have separate control over left and right command and option keys. This window is called the "hotkey window" and is most commonly used for occasional administrative tasks. ITerm2 offers a special terminal window that is always available with a single keystroke. Pressing the shortcut again restores the hidden panes. You can "maximize" the current pane-hiding all others in that tab-with cmd-shift-enter. You can navigate among split panes with cmd-opt-arrow or cmd. The shortcuts cmd-d and cmd-shift-d divide an existing session vertically or horizontally, respectively. ITerm2 allows you to divide a tab into many rectangular "panes", each of which is a different terminal session. In Prefs > Profiles > Keys you can assign keys to move the beginning or end of the selection by a single character, word, or line. You can bind keystrokes to create and adjust selections.At most one line of text can be selected this way. To move the beginning of the selection to the left, press shift-tab. Then press tab and the end of the selection will advance by a word. Enter the beginning of the text you wish to copy and the find feature will select it in your window. To select text without using the mouse, press cmd-f to open the find field. You can use the find feature's "mouseless copy" feature.There are several ways to select text to copy to the clipboard: Clearly named buttons help keep things, well, clear.This chapter describes features of iTerm2 that go beyond basic usage and are not generally found in other terminal emulators. For something destructive like this, we ask for confirmation by popping up a dialog box. If button returned of result is "Clear" then (Actually, to be pedantic, the default value is ¬ The default value for text item delimiters is "", the empty string. When you tell AppleScript to convert a list to text, it separates list items using a global AppleScript property called text item delimiters. We want text because we’re going to write the list to a simple text file. Next, we want to convert url_list from an AppleScript list to text. Write url_list to open_file starting at eofįirst, we create url_list, a list of the URLs from each Safari document. Open for access file prefs_file with write permission Set prefs_file to prefs_folder & "Safari Saved URLs" Set prefs_folder to path to preferences folder as string get path to prefs file where URLs will be stored Set AppleScript's text item delimiters to old_delim Set AppleScript's text item delimiters to return Set old_delim to AppleScript's text item delimiters While we’re at it, we’ll create a third script, “Clear Safari URLs”, which will simply delete the contents of the “Safari Saved URLs” file. Tell Safari to open each URL in the list. Read the “Safari Saved URLs” text file in the Preferences folder. We’ll name the second script “Restore Safari URLs”. Overwrite the previous contents of the file - we only want to remember the URLs that are open right now. Write that list to a text file named “Safari Saved URLs” in the Preferences folder. The first script, which we’ll name “Save Safari URLs”, will do the following:Ĭreate a list of URLs for each Safari document window. (Actually, I saved them in a “Safari” folder inside the Scripts folder, grouping them together in a sub-menu of the main scripts menu.) I use Apple’s system-wide script menu for Mac OS X, so I saved these scripts in the “Scripts” folder in the “Library” folder in my home directory. We can solve this problem with AppleScript. Not to mention that there’s no easy to way to add bookmarks for all open windows in one step. These aren’t URLs I want to remember forever if I were to bookmark them, I’d need to clean them out of my bookmark list later, after reading them. These are URLs I want to read once, then close. I don’t want to bookmark them - that would be overkill. I don’t want to quit, because I need to do something to remember the open URLs which I haven’t finished reading. Having all these windows open makes me reluctant to quit my browser. I typically have half a dozen or so web browser windows open at any given moment, open to URLs I mean to read in the future. By spending the time up-front to make an application scriptable, developers save time down the line, by allowing users to add new features on their own, using (relatively) simple scripts.įor example, I’ve long been annoyed by the inability of web browsers to remember which URLs were open the last time they were quit. The whole point of scriptable application software is that it allows us, the users, to add and tweak features. Save and Restore Safari URLs Monday, 3 February 2003
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |