News for hackers. Stuff that matters.
Re:vinegar.vim – NerdTree replacement by datashaman on Wednesday December 25, 2013 @12:46AM (#6962333)
Using ranger as a frontend for vim works really well for me.
Re:vinegar.vim – NerdTree replacement by 97-109-107 on Wednesday December 25, 2013 @07:15PM (#6964785)
I use ranger on a daily basis; can you elaborate more on how you connected the two?
Re:vinegar.vim – NerdTree replacement by gokce on Thursday December 26, 2013 @08:19AM (#6966161)
I got this in `/usr/local/share/doc/ranger/examples/vim_file_chooser.vim`.

    " 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>