You can find the article here:
micahcarrick.com/09-29-2007/gedit-html-editor.html
This is my external tool I came up with to do svn commit from gedit. Currently you need to type the file to commit or a . (dot) to commit whole directory. Maybe someone knows how to fix this mistake. But it works for now so I have to stick with it until I fix it. Yay, now I can commit from gedit. :) The file is below. You can place this file in ~.gnome2/gedit/tools/ and use it as an extenal tool or in gedit goto tools->external tools and type it in manually, minus comments after shebang.
file: svn-commit
#!/bin/sh
# [Gedit Tool]
# Comment=svn commit
# Name=svn commit
# Shortcut=F11
# Applicability=all
# Output=output-panel
# Input=document
svn ci -m exec `zenity --entry --title="Commit" --text="Enter Commit Message"`
EDIT:
Okay, I fixed it after looking at the commit log. Use this one below and not the one above since it's the new updated version that allows you to commit changes to svn repository from gedit. I don't know why I had to say that. But there you go. Notice the dot on the end. Although, you may want to change it to commit a single file instead of the cwd. If so then you can use $GEDIT_CURRENT_DOCUMENT_PATH instead. Just as a note for all my readers. I use my blog posts as a reminder for me for how I did certain things so that I don't have to re-google and re-research my finding again.
#!/bin/sh
svn ci -m "`zenity --entry --title="Commit" --text="Enter Commit Message"`" .
you might also want this as well:
#!/bin/sh
svn add $GEDIT_CURRENT_DOCUMENT_PATH
It's also not very hard to run python from external tools as well. See example below:
#!/bin/sh
python -c "
import os
os.system('ifconfig')
"
After having learned this about gedit. I have a feeling that I'm going to dwell on it alot more and come up with some plugins hopefully. That depends on how swamped I am with everything else though. Look for plugins in the near future. Hopefully one that can cook and clean. hehehe, jk. :)
No comments:
Post a Comment