[942099 views]

[]

[toggle ads]

Odi's astoundingly incomplete notes

New entries | Code

slow pasting in vim

I often copy text files via SSH by just opening the target file in vim and then pasting the text into the terminal.
If the file is quite large, this is very slow and if the target machine is close enough you can hear its hard drive going mad.

So what's going on here? vim is writing to its swap file. Character by character. Dutifully flushing each character out of the buffers. Very good in case you lose power, except that it really slows us down here...

Simple solution: disable vim's swap file with the -n option.

vim -n targetfile


posted on 2013-11-12 21:23 CET in Code | 0 comments | permalink