aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundle/copy/autoload/copy.vim4
-rw-r--r--bundle/copy/plugin/copy.vim5
2 files changed, 9 insertions, 0 deletions
diff --git a/bundle/copy/autoload/copy.vim b/bundle/copy/autoload/copy.vim
new file mode 100644
index 0000000..c71c6d6
--- /dev/null
+++ b/bundle/copy/autoload/copy.vim
@@ -0,0 +1,4 @@
+function! copy#Copy(start_line, end_line)
+ silent execute a:start_line . ',' . a:end_line . 'y'
+ silent call system('pbcopy', getreg('@'))
+endfunction
diff --git a/bundle/copy/plugin/copy.vim b/bundle/copy/plugin/copy.vim
new file mode 100644
index 0000000..1383eca
--- /dev/null
+++ b/bundle/copy/plugin/copy.vim
@@ -0,0 +1,5 @@
+" Copy
+"
+" Takes a range and copies the lines specified to the system clipboard.
+
+command! -range Copy call copy#Copy(<line1>, <line2>)