Skip to content

Comment on Vim Croquet

Comments

ggvG$"zy can be replaced with ggVG"zy

Visual line mode is often very convenient.

Also, kana's text-object-entire plugin may come in handy here (many of her text-object plugins are very useful).

Better still, I'll recommend @kana's vim-textobj-entire[1]. This adds 'e' as an 'everything' text object, with 'ae' (around everything) and 'ie' (inside everything) bindings by default. Thus 'vie' would select everything in the buffer in visual mode. Likewise for 'Vie' (Visual line select) or 'cie' (change everything).

[1] https://github.com/kana/vim-textobj-entire

Or

    :%yz

Good call! But you'll need a space:

    :%y z

Also you don't need any visual mode if you don't need visual feedback. Yanking everything:

    gg"zyG

If I can recall the file name, :r <file name> might be a better choice than gg...y

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.