How do you open up vim from a CLI like svn and git do when you drop -m from commit commands?
I'm getting the follow error: Vim: Warning: Output is not to a terminal
`echo "Please edit this file" > file.name`;
`vim file.name`;
How do you open up vim from a CLI like svn and git do when you drop -m from commit commands?
I'm getting the follow error: Vim: Warning: Output is not to a terminal
`echo "Please edit this file" > file.name`;
`vim file.name`;
EDIT:
I just realized it sounds like you already have this set up for svn/git... what are you trying to open it from?
for bash: export SVN_EDITOR=vim
although EDITOR
will work as well, though this will influence other things as well. IF for some reason vim isnt on your path youll need to use the full path as well. Place this in your .profile
or .bash_profile
.
PHP Doesn't automatically pass thru the STDIN/STDOUT streams, you need to do it manually:
`echo "Please edit this file" > file.name`;
system("vim file.name > `tty`");
(Note: I don't really understand what I'm talking about, I just know the above works.)
This doesn't really answer your question, but I couldn't resist. PHP is more or less fine when it comes to web applications but it's a terrible choice when it comes to CLI scripting. Start with Bash for simple tasks and move to Perl/Python once it gets more complex.