I use Vi a lot having to open the terminal --> Vi "Desktop/newfile.txt." got old fast. So I wrote this script
tell application "Terminal"
try
end tell
works great. Well having to end the terminal session when I am done with Vi is well "old."
I am trying to write a script that will read keystrokes that when I enter ":q!" to end Vi will end the terminal session as well
so far no luck here is what I have so far.
tell application "Terminal"
try
set input to keystroke
repeat until input = ":q!"
quit "Terminal"
end tell
any ideas?
tell application "Terminal"
try
do script "vi Desktop/new.txt"
on errordisplay dialog "Try Again"
end tryend tell
works great. Well having to end the terminal session when I am done with Vi is well "old."
I am trying to write a script that will read keystrokes that when I enter ":q!" to end Vi will end the terminal session as well
so far no luck here is what I have so far.
tell application "Terminal"
try
do script "vi Desktop/new.txt"
on errordisplay dialog "Try Again"
end tryset input to keystroke
repeat until input = ":q!"
set input to keystroke
end repeatquit "Terminal"
end tell
any ideas?