Kategorien: development, html / css, JavaScript, php, b2evolution

27.01.10

TortoiseSVN/VCS GUI integration in jEdit

I've created the following macros to easily launch various SVN commands in TortoiseSVN at work.

To use them yourself, just create the displayed files (VCS/*.bsh) in your personal "macros" directory (~/.jedit/macros).

Code:

for i in ~/.jedit/macros/VCS/*; do echo "$i:"; cat $i; done
 
VCS/blame_current_file.bsh:
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:blame /path:\""+buffer.getPath()+"\" /line:"+(textArea.getCaretLine()+1);
Runtime.getRuntime().exec( exec );
 
VCS/commit_current_file.bsh:
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:commit /path:\""+buffer.getPath()+"\" /logmsg:\""+buffer.getName()+": \"";
Runtime.getRuntime().exec( exec );
 
VCS/diff_current_file.bsh:
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:diff /path:\""+buffer.getPath()+"\"";
Runtime.getRuntime().exec( exec );
 
VCS/log_current_file.bsh:
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:log /path:\""+buffer.getPath()+"\"";
Runtime.getRuntime().exec( exec );

You can now execute those macros either by calling them from the "Macros" menu, assign a shortcut to them or (my preferred way) via Ctrl-Enter, typing parts of them and then TAB-completing it (e.g. Ctrl-Enter, "log_", TAB, Enter).

They do not have "svn" in the name, since they might get extended to use the appropriate VCS GUI command in the future, for example by testing if there's a .svn control directory or using commands like "bzr st" or "git status" to check if it's a Bazaar/Git/... file.

(For debugging, you can use Macros.message( view, exec ); to display the "exec" value in a message)

By Daniel in development, Snippets2010-01-27 English (EU) Email

28.04.09

OpenSource is distracting

Having the possibility to report bugs against tools and applications you are using to report bugs in other applications can lead to a whole stack of browser windows, things and stuff being open.

Especially if there are bugs in the application to report the oh-no-it's-starting-to-recurse bug report (Yes, I'm looking at you, Launchpad).

16.04.09

b2evolution/whissip auf Deutsch: wieder zu 100% übersetzt

Dank Tilman ist nun b2evolution (und damit auch whissip) komplett auf Deutsch übersetzt.

Ich bin damals bei b2evolution eingestiegen, indem ich die deutsche Übersetzung beigesteuert habe, aber habe das leider in letzter Zeit vernachlässigt.

Glücklicherweise ist Tilman nun eingesprungen und hat dies nun zu 100% übersetzt.

Eventuelle Bugs/Vorschläge können bei Launchpad hinterlassen werden.

Von Daniel in b2evolution16.04.09 German (DE) E-Mail

11.03.09

Whissip.net

Link: http://whissip.net/

Registered my first .net domain today: whissip.net

This will host information about the b2evolution branch I'm maintaining.

see also: Reddit post, Ohloh entry

By Daniel in b2evolution2009-03-11 English (EU) Email

19.02.09

Vim settings per directory

When hacking on b2evolution using vim, I often forget to ":set noet" (to not expand tabs) and it's really annoying to change this global setting everytime I open a b2evo related file.

According to the mantra, to search for a shortcut when a task becomes repetitive, I've finally searched for it and found a plugin, which looks for _vimrc_local.vim files (in the parent directories (and $HOME)).

Now, I can have a single _vimrc_local.vim file in the directory where all my b2evo related directories/branches reside - and override my global settings therein; It gets sourced/executed whenever I'm opening a file "below".

For more information see the Question on Stack Overflow and the actual plugin by Luc Hermitte. Thanks! :)

Update: as noted on Reddit, you could also use the following code in a vimrc file (e.g. ~/.vimrc):

:au! BufRead,BufNewFile /path/to/project/* setlocal noet

I still like the approach of having local override files in the directory structure though, which might come in handy for projects: if somebody has installed the plugin already there's no need to edit any .vimrc file (if the project ships the _vimrc_local.vim file in the project's root directory).

05.02.09

bzr-pager Plugin

I like the feature in git, where commands that produce long output get piped to $PAGER.
This means, that if you do a "git diff" and its output will not fit into the current terminal window without scrolling, it will get piped to "less" by default, so that you can easily search and scroll in the output. Additionally (and that's the main point IMHO) it does not pollute your scrollback history (when you exit from your pager, the terminal will only display the call to the command, but not its output).

Luckily, there's a plugin for bzr, which provides the same functionality: bzr-pager

You can install it as follows:

mkdir -p ~/.bazaar/plugins && \
cd ~/.bazaar/plugins && \
bzr branch lp:bzr-pager pager

By Daniel in development, Ubuntu, musthaves2009-02-05 English (EU) Email

12.10.08

Clean URLs with lighttpd

To get clean URLs (e.g. for permalinks) in Lighttpd, you have to use the magnet module (lighttpd-mod-magnet in Ubuntu/Debian), and a Lua script.

I've created a file /etc/lighttpd/rewrite-to-docroot.lua:

if (not lighty.stat(lighty.env["physical.path"])) then
    lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. "index.php"
end

And enabled it using:

magnet.attract-physical-path-to = ("/etc/lighttpd/rewrite-to-docroot.lua")

This simulates the following mod_rewrite snippet known from Apache:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Previously I was using a tricky method, which would use the 404 handler ("server.error-handler-404 = /index.php"), but this caused missing GET params (as documented in the Lighttpd FAQ).
As a result, paged browsing of categories and tags wasn't possible.

1 2 3 4 5 6 >>

Seitenleiste