Wow, it's finally done! After 4 hours of hacking and digging through documentations, API references and three other plugins I finally wrote my own Gedit 2.26 plugin :) The fun fact is I completely don't know Python at all(only basic ideas). Most of the code is either a rip-off from one of the previously mentioned plugins or my wild guesses 'how the hell does it work?!'. I hope your PC won't melt :D
What does it do? Well, it's a really simple script despite the time I put into writing it. It saves the current file you are working on and executes git add [file] && git commit [file] making your life a lot easier because you don't have to remember about those annoying commits in your local repo every time you change something. Useful!
Script is in it's early beta, I didn't give it any version number. There are lot of things to do so don't be suprised that it's not perfect. I must also warn you it's not exactly idiot-friendly and even if I tried to make it as safe as I could, you still can make your local repository unusable. Use at your own risk!
And yes, I know that the code is not a state of art. It was written during my NADD (Nerd Attention Deficiency Disorder) period, not during the NAND (Nerdy Attraction to Naughty Development - code have to be sexy!) one. Sorry :D
You can download the plugin from my server (4 KB)
I welcome any feedback and bug reports, but please, don't be too hard on me, I'm just learning.
Also if possible don't be too harsh on my english - still studying ;)
Reklamy: sklep komputerowy ,
After 4 hours of hacking and digging through documentations, API references and three other plugins I finally wrote my own Gedit 2.26 :)
Looks like intro text in The Top #3 8-bit Atari mega demo. „After three months of brainstorming, coding and hacking…”
Nice.
Anyway, wouldn’t it be easier just to stick to an editor which provides as basic features as version control system’s support is? What’s so fun in gedit anyway?
Dodek – find a better one without shitty keyboard shortcuts that slows your work and annoys you because you have to keep a list of them nearby :|
Dodek, it has a clean and easy-to-use interface. And maybe it would be easier, but not as fun as creating own plugin ;)
flegmatyk, after those previously mentioned hangups he decided to write his own gedit ;)
zgryw, that makes sense ;) Hope he would share his whole gedit, not just a small portion, as he did now :P
you wish, it’s just beginning of his taking-over-the-world plan ;) and that’s why he can’t share it with us :D
D4rky, it’s like switching operation systems – at first you might feel confused and find everything so odd and difficult to learn, but after a while you get used to it and get at least as productive as you had been before a change. There really is no need for remembering many keyword shortcuts – at least, in my editor.
„Dodek – find a better one without shitty keyboard shortcuts that slows your work and annoys you because you have to keep a list of them nearby :|”
Vi? ;P
This plugin is not a very good idea. While it might be useful in some situations, committing every time you save file is not a good idea for three reasons: a) you often end up committing code that does not work b) you commit files to many times without real need, making tracking changes harder and c) a commit should cover a ‘change’ in a codebase not in a file – change in a codebase may mean change in more than one file. And d) as a bonus: tracking single files is not a git way ;)
AdamK – ad a) – I didn’t say that I’d commit code every time I save, it’s overstatement ;) ad b), c) and d) – from what I’ve heard, commiting in short period of time IS ‘the git way’ (following the rule ‘if you can’t describe in one sentence – you are not commiting enough). I see your point, but I don’t mind having one file commits. However I’ll get that into consideration if I keep developing the script further, maybe there’s a smarter way :)
19-letni geek-webdesigner uczęszczający do ZSE w Bydgoszczy. więcej...
D4rky
Ooops, I was changing the title and few random letters stayed on their places. Fixed already, but the stain on permalink will stay ^^”