.vimrc
set nu
set hlsearch
set flash
set backspace=2
set autoindent
set smartindent
set ruler
set showmode
set showmatch
set history=400
set magic
set fileencodings=utf-8,gb2312,gbk,gb18030,big5,ucs-bom,cp936,tuf-16,euc-jp
set nocompatible
set wildmenu
set errorbells
set visualbell
set report=2
set bg=dark
syntax on
sy on
filetype on
"
VIM: File Chooser
"
This is a vim function which allows you to use ranger to select a
file for opening in your current vim session.
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()
set hlsearch
set flash
set backspace=2
set autoindent
set smartindent
set ruler
set showmode
set showmatch
set history=400
set magic
set fileencodings=utf-8,gb2312,gbk,gb18030,big5,ucs-bom,cp936,tuf-16,euc-jp
set nocompatible
set wildmenu
set errorbells
set visualbell
set report=2
set bg=dark
syntax on
sy on
filetype on
"
"
fun! RangerChooser()
endfun
map ,r :call RangerChooser()