Friday, September 23, 2011

Vim: Reading from stdin

Here is a neat tip for Vim.

To read from stdin use
<other commands> | gvim -R -

-R instructs Vim to read the file in read-only mode.
- is a utility convention that means open from stdin. (See Guideline 13 of Utility Syntax Guidelines from the Posix standard.)

Source: http://stackoverflow.com/questions/230718/redirection-and-vim

Sunday, September 18, 2011

Mercurial: Automatically pushing changes on commit

Here is a neat tip for Mercurial.

To automatically push on every commit add this hook to your repo hgrc:

[hooks]
commit.autopush = hg push

Source: http://stackoverflow.com/questions/1235597/mercurial-automatic-push-on-every-commit

Tuesday, March 22, 2011

Moving the Windows User folder

With a bit effort, it's now possible to move your user folder and link to it with junction point. Here are some instructions I found on superuser.com.

This makes it possible to truly separate your data and system files by moving your user folder to a completely separate drive.