danchoi / ri.vim

browse ri documentation from Vim
http://github.com/danchoi/ri.vim
MIT License
114 stars 15 forks source link

Problem opening the documentation window #21

Closed v-yadli closed 10 years ago

v-yadli commented 10 years ago

Every time when firing off r and search for an entry, the following errors will be displayed before the documentation window is opened:

Error detected while processing function RIVimStatusLine: line 1: E121: Undefined variable: g:mapleader Press ENTER or type command to continue Error detected while processing function RIVimStatusLine: line 1: E15: Invalid expression: g:mapleader Press ENTER or type command to continue Error detected while processing function RIVimStatusLine: line 2: E121: Undefined variable: a Press ENTER or type command to continue Error detected while processing function RIVimStatusLine: line 2: E15: Invalid expression: "%<%f\ | Press ".a."? for help "."%r%=%-14.(%l,%c%V%)\ %P" Press ENTER or type command to continue

v-yadli commented 10 years ago

Looks like an easy one. I didn't define a custom leader. Simply modify RIVimStatusLine to be:

function! RIVimStatusLine() let a = '\' if exists("g:mapleader") let a = g:mapleader endif return "%<%f\ | Press ".a."? for help "."%r%=%-14.(%l,%c%V%)\ %P" endfunction

will do the trick.

danchoi commented 10 years ago

I changed the status line code in the latest ri.vim