4 ms·
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 te
by nbouscal 13y ago
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).
- eggoa 13y agoOr :%yz
- nbouscal 13y agoGood call! But you'll need a space: :%y z
- falcolas 13y agoIf I can recall the file name, :r <file name> might be a better choice than gg...y
- saidajigumi 13y agoBetter 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 https://github.com/kana/vim-textobj-entire
- kolme 13y agoAlso you don't need any visual mode if you don't need visual feedback. Yanking everything: gg"zyG