mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 00:03:39 -05:00
Updated On MacVim with iTerm2 (markdown)
@@ -38,3 +38,40 @@ to control the size of the generated iTerm window you just need to insert the li
|
|||||||
set number of rows of myterm to R
|
set number of rows of myterm to R
|
||||||
```
|
```
|
||||||
for some numbers C,R after `set myterm to (make new terminal)`
|
for some numbers C,R after `set myterm to (make new terminal)`
|
||||||
|
|
||||||
|
**And for zsh**:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/usr/local/bin/zsh
|
||||||
|
|
||||||
|
osascript -e \
|
||||||
|
'on run argv
|
||||||
|
tell application "System Events"
|
||||||
|
set old_frontmost to item 1 of (get name of processes whose frontmost is true)
|
||||||
|
end tell
|
||||||
|
tell application "iTerm"
|
||||||
|
activate
|
||||||
|
set myterm to (make new terminal)
|
||||||
|
# set number of columns of myterm to 250
|
||||||
|
# set number of rows of myterm to 30
|
||||||
|
tell myterm
|
||||||
|
set mysession to (make new session at the end of sessions)
|
||||||
|
tell mysession
|
||||||
|
exec command "env PATH=/usr/local/bin/:$PATH /usr/local/bin/zsh -f"
|
||||||
|
write text "cd " & quoted form of (item 2 of argv)
|
||||||
|
write text (item 1 of argv) & " && exit"
|
||||||
|
end tell
|
||||||
|
repeat while (exists myterm)
|
||||||
|
delay 0.1
|
||||||
|
end repeat
|
||||||
|
end tell
|
||||||
|
end tell
|
||||||
|
tell application old_frontmost
|
||||||
|
activate
|
||||||
|
end tell
|
||||||
|
end run' $1 $PWD
|
||||||
|
```
|
||||||
|
|
||||||
|
And put it in PATH (I've put it in `/usr/local/bin`)
|
||||||
|
|
||||||
|
Note: it doesn't work very well if you've got an instance of iTerm2 running in full screen
|
||||||
Reference in New Issue
Block a user