Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another thing you can do to improve speed is learn the keybindings for readline. They are the same keybindings as emacs, and lots of other things use readline too like python shell, sqlite, etc. A very useful set of keys to have in your muscle memory. See the readline manual: http://tiswww.case.edu/php/chet/readline/rluserman.html#SEC3


if your a vi/vim user in you're .inputrc set:

    set editing-mode vi
    set keymap vi-command
see more settings @ https://github.com/shawndumas/dotfiles/blob/master/readline/...


This won't work for some standard stuff that OS X ships with, for instance Python (when started as a command-line interpreter). That's because .inputrc is read by the GNU readline utilities, and Apple links with the BSD equivalent.

To make this work for Python:

Add a file called .editrc with the following content:

bind -v

Add a file called .pythonrc with the following lines:

import rlcompleter import readline

Add a line to your .bashrc which makes Python run .pythonrc when it starts interactively:

export PYTHONSTARTUP="$HOME/.pythonrc"

Now Python will understand your vi keystrokes :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: