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

Displaying code and editing it are two separate things. Sounds like Vim is pretty bloated acting as both an editor and a pager.

Use ed to edit, and pick a side in the more/less wars if you want to read it.



I realize that you're joking, but... vim is a better less than less is, in almost all cases, for viewing code, because you get syntax highlighting.

I'm not a vim user, but I use it to replace less because syntax highlighting is the bee's knees: (you may need to change `vim74` to whatever it is on your system.)

  alias less='/usr/share/vim/vim74/macros/less.sh'
You can then do things like:

  less Makefile +400
which pairs very nicely with `grep -n`.


Why not just pipe pygmentize to less? That's truly embracing The Unix Way™.

  pygmentize foo.py | less -r


But ed also displays code. I think you're looking for some way of editing code without displaying it on the screen at all.




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

Search: