The ADM-3A leaving it’s mark


Did you ever ask yourself, why on *NIX-Systems your home directory has the shortcut tilde (~)? Or why on the text editor vim the cursor could not only be moved by the arrow keys but also via H, J, K and L? Why not W, A, S and D, which today is famous as it is used by many games? Well I often did ask myself, but never actually tried to find out why. I had my explanation for H, J, K, L, as they lie on the home row of the keyboard, thus allowing fast movement.

One might think that H, J, K and L an idiosyncrasy of vi/vim, but when you look carefully you find other software that use the same keys for moving: Rouge, Hack and NetHack – the predecessors of Diablo use HJKL. Also the C Shell (csh) and it’s improved and today still popular version TENEX C-Shell (tcsh) can be controlled by H, J, K and L. The most recent tools are the web interfaces from Gmail and Google Labs – as well as the browser Pentadactyl. Of course, for the later tools it’s more convenience than a historical cause. But regarding vim, by accident I just now found out why these keys are used – and why the tilde is the shortcut for the home directory on *NIX systems.

Continue reading

Advertisements

Markdown and vim


Just recently a fellow student asked me, if I’d ever used Markdown before. Of course I had. As fan of DVCS and their web sharing platforms (of course I talk about Bitbucket and GitHub), one is bound to stumble upon them, especially when one also uses rails for development. Every new rails project is set up with a generic Readme.markdown.

And Markdown itself is great. It’s kept as simple as possible but still is pretty powerful when it comes to formating easy text. The formating is done by a parser that parses Markdown into well formated XHTML and there you have a neat layout for all kind of lists, and type settings, Headings, etc. using nothing more than simple ASCII symbols that even make perfect sense when reading it unparsed. Just have a look at an example:

An Example
==========

See how a simple text file is turned into a beautiful *XHTML* file using
nothing more than **simple** ASCII methods. On can also use `inline code` or
even Codeblocks:

    public static void main(String args[]) {
        System.out.println("Somehow I always use Java examples");
    }

Of course, my all time favorite:

> Quoteblocks
> Nice for quoting clever people

Then there are (this is worth a subsection)

Lists
-----

1. Numbered
1. Lists
1. And I hate keeping track of counts
1. And why should I
1. It is done for me!

and

* Plain
* Old
* Bulletin Lists
* All of them with
* nesting capabilities!

Oh, and did you ever [Visit my blog?](http://pygospa.wordpress.com).

### There is so much more

e.g. yet a deeper subsection. And it won't stop there. Try your luck with four
hashtags 😉

I could just paste the parsed code for comparison, but instead I’d rather like to give you an example rendered HTML page with proper CSS styling. Isn’t this beautiful?

Parsed Markdown in Bitbucket

Screenshot of parsed Markdown in Bitbucket

Continue reading

(> emacs vi) → #f


Im Vorkurs zum Informatikstudium gab es unter neben EinfĂŒhrungen in Versionskontrollsysteme, LaTeX, Unixbedinung, etc. auch eine EinfĂŒhrung in den Editor emacs. Dort wurde unter anderem gesagt, dass der emacs ein besserer Editor sei, als der vi.

Das mag fĂŒr die Ur-Version des vi vielleicht sogar stimmen. Diese kenne ich jedoch nicht, und ich habe sie auch noch nie auf irgend einem Unixsystem gefunden. Wann immer man unter Linux/BSD/Unix/Mac OS X den “vi” installiert, steht dieser i.d.R. fĂŒr den aktuellen Vim, also den Vi Improved, einem Clone von vi, der kontinuierlich weiterentwickelt wird, und etliche Features bietet, die ihn sehr mĂ€chtig machen.

Ich möchte mich hier an den Übungszettel zur emacs EinfĂŒhrung orientieren, und daran zeigen, dass der vi dem emacs in nichts unterlegen ist (meiner Meinung nach lassen sich sogar etliche Sachen um einiges einfacher im vi lösen, als im emacs). Dabei werd ich auch ein paar alternativen Aufzeigen. Zum Schluss möchte ich dann noch ein paar tolle Tipps zum Besten geben, die mir die Arbeit das ein oder andere mal doch um einiges erleichtert haben. Nur damit das niemand falsch versteht, dass soll kein emacs-Bashing sein, oder so – es geht mir lediglich darum diese (in meinen Augen) Falschaussage des Professors zum Thema vi hier mal richtig zu stellen.

Continue reading

[Linux] Vim as (Man)Pager


Those who know me, also know, that I love vim(1). Vim is the editor for any system. It works great on Linux, Windows, OS X, …. And there’s a GUI version of it (gVim), as well as a CLI version.

Yesterday I made a new discovery, while installing vim on a fresh installation of Gentoo. In portage there’s a vim-pager USE flag. It caught my attention, I googled a bit, and soon I found out: vim can be used as a pager application!
Continue reading