Tuesday, July 3, 2012

VIM - Python Koans plugin

Yesterday i start (again) python koans, and switching into terminal to run again and again pissed me off. So from now i press 1 combination and shell has gone away :), koans run in background and My lovely editor put cursor on last error.

Meet the VIM python koans helper:

https://github.com/exu/vim-python_koans

Output format sucks a little (because my VimL skills sucks - I didn't find solution for this ^@ ^] symbols) but it is great productivity improvement.


Picture 1: Output window with cursor on last error

Thursday, June 21, 2012

Merge many PDF files into one in linux shell

Do you want to merge many PDF files into one? There you are:

Shell code:
$ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf

- out.pdf - destination file name
- in1.pdf, in2.pdf - source file names

(gs - Ghost Script - on Ubuntu 12.04 and OpenSuse 11.3 is installed by default)

VIM - inserting UTF-8 symbols (digraphs)

In VIM in very simple way we can insert some of UTF-8 symbols. List of available symbols we can display by running  :digraphs command


If you locate interesting symbol, you can insert him by pressing  <C-k> key combination and two letters on the left of that symbol on the left. For example equilateral triangle right ordered <C-k>PR
and here you are.



I've tested this technique in UTF-8 encoded files (in LATIN-1,2 or other there could be problems).