Monday, October 15, 2012

Finding perfect text editor part 129021: Emacs

I'm putting my emacs configs back to all my linux machines. New prelude based configs, nice and shining (and working) with Emacs 24. Configs are machine based (work machine - different projects from home machine).

Some of nice plugins in My config:

  • GPicker
  • Multiple-cursors
  • php-mode
  • twittering-mode
  • and many many more ... see install_vendors.rb for details.


  • yasnippets integration with used PHP projects (Symfony1 Symfony2 Silex) - rewrite existing vim   snippets (UltiSnips) python -> elisp.
  • find some  system independent nice way to run emacs server on system startup,

After cleaning up configs from unused mess my emacs starts 2 times faster.

My config on bitbucket:

img: my emacs

Sunday, September 9, 2012

Handling archives in linux (ranger file manager)

Today I was looking for a some plugin for unpacking files in Ranger file manager. I found great tool ( atool :) ). It is nice and simple command for packing and unpacking many types of archives.

First install atool, in ubuntu you do it with apt-get:
sudo apt-get install atool

Now update your rc.conf in ranger (after default instalation you need to copy-config from default skeleton. ranger --copy-config all). Now edit your bindings in ~/.config/ranger/rc.conf

map Pu shell atool -x %s
map Pa shell atool -a %s

Now after pressing Pu/Pa archive is unpacked or directory/file is packed.

Tuesday, July 3, 2012

VIM - share current file in your LAN (for one person)

Inspired by César Bustíos Benites I've made nice VIM key map to share my current file using NetCat tool.

map <Leader>= :!cat % \| nc -l 5555 &<CR>:let @+=''<CR>

You can change port and IP address to your own. Now I'm pressing ,= followed by (my leader is ",") and Ctr-V (Shift-Ins) into my friend IM window :) (Of course everything in LAN)

What above nc command do?
Echoing file content and pipe it to nc which listen on given port and if connection from client begins netcat returns piped content to client, that's all.