-- Open terminal at given path
-- From: www.chipwreck.de
set p to POSIX path of (item 1 of i as alias) -- define i
tell application "Terminal"
do script "cd \"" & p & "\""
close window 2
When editing text or code it is quite often very useful to jump to the beginning or the end of a line, or to move the cursor one page up or down..
Unfortunately the keys dedicated to this task (home/end/pageup/pagedown on a windows-pc) have got a different meaning on a mac: Page up/down scroll one page up/down – without moving the caret (cursor), home/end move to the beginning/end of a document – also without moving the insertion point.