Hacker News new | past | comments | ask | show | jobs | submit login
Everything I Missed in "Vim After 11 Years" (statico.github.com)
50 points by statico on March 5, 2013 | hide | past | favorite | 8 comments



> But have you ever heard of :g//? I hadn’t.

> :[range]g[lobal]/{pattern}/[cmd] (default 'p')

This is the origin of grep, i.e. g/re/p!


My first reaction to that was "surely grep is older than vi" - but the grep wikipedia page points out that the g/re/p pattern dates all the way back to ed - which vi extended

http://en.wikipedia.org/wiki/Grep


Interesting timing: I was reading through Practical Vim last week and came across a sidebar describing the origins of grep. Why do programmers love their acronyms so much?


Or my favorite, :g/re/d


On EasyMotion:

    " let g:EasyMotion_leader_key = '<Space>'
    let g:EasyMotion_keys = 'abcdefghijklmnopqrstuvwxyz'
    let g:EasyMotion_mapping_f = '<space>'
    let g:EasyMotion_mapping_w = '<space><space>'
This lets you type space then a character then jump. Space space jumps words. I'm fine with my leader on \. I had my space toggle folds but easymotion is a MUCH better use of the key. I also remap 's' to surround.vim keybinds:

    ""s/S is pretty useless. :help text-objects
    nmap s      ysi
    nmap S      ysa
    nmap s$     ys$
    nmap sv     gvs


This is one of the things I love about vim. After 11 years, there's still so many new things to learn and improve your experience. I've been using vim just over a year now, and it seems every week or so I pick up a new trick that significantly improves my workflow. I had always remapped ; but after learning its actual purpose here, I may reconsider.


I have similar thoughts towards Vundle. It seems to solve a problem that simply doesn't exist for me with Pathogen, and is slightly more annoying to boot.


I'm a little jealous of the CSS Color Plugin. Wish TextMate had something like that.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: