summary refs log tree commit diff stats
path: root/examples/vim_file_chooser.vim
diff options
context:
space:
mode:
Diffstat (limited to 'examples/vim_file_chooser.vim')
-rw-r--r--examples/vim_file_chooser.vim17
1 files changed, 0 insertions, 17 deletions
diff --git a/examples/vim_file_chooser.vim b/examples/vim_file_chooser.vim
deleted file mode 100644
index 4f5fa3f2..00000000
--- a/examples/vim_file_chooser.vim
+++ /dev/null
@@ -1,17 +0,0 @@
-" Compatible with ranger 1.4.2 through 1.6.*
-"
-" Add ranger as a file chooser in vim
-"
-" If you add this function and the key binding to the .vimrc, ranger can be
-" started using the keybinding ",r".  Once you select a file by pressing
-" enter, ranger will quit again and vim will open the selected file.
-
-fun! RangerChooser()
-    exec "silent !ranger --choosefile=/tmp/chosenfile " . expand("%:p:h")
-    if filereadable('/tmp/chosenfile')
-        exec 'edit ' . system('cat /tmp/chosenfile')
-        call system('rm /tmp/chosenfile')
-    endif
-    redraw!
-endfun
-map ,r :call RangerChooser()<CR>