开发者

how to double the content of a file

I've an ASCII file contains a two dimensional array of size 360X720, with all 1's & 0's. I want to double the 开发者_开发百科size of that array horizontally like 720X720. By repeating the same content. How can I do that from notepad or notepad++? Suggest me if there is any macro in the notepad++.


Rectangular selection FTW

  • rectangularly select your array (holding alt key)
  • copy
  • move caret at the end of first line
  • paste


Mmmm not sure you can.

In gvim (download):

you'd do:

ggC-q$GyP

  1. gg (go to first line)
  2. C-q -- start visual block select mode (assumes behave mswin; if you have behave xterm (default except on windows) use C-v instead)
  3. $ extend block selection to end of line
  4. G extend block selection to last line (if you have empty trailing lines, move cursor back up or do }k$ instead)
  5. y - yank selection into default register
  6. P - paste (put) yanked selection before cursor in blockwise mode

All done

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜