Closed xautjzd closed 10 years ago
Hi,
does your Vim have :AirlineRefresh
command? Does it work?
If there's no such command, it is possible that you're running an old version of vim-airline.
Try :BundleUpdate
to update airline and see if it works.
@junegunn Thanks for your answer. There is really not :AirlineRresh
command, when I updated my plugins, It works .Thanks again
@junegunn There is another problem:
when I redefine goyo_before
and goyo_after
function and make it local to script, it will display such errors:
Error detected while processing function <SNR>56_goyo..<SNR>56_goyo_on:
line 99:
E117: Unknown function: s:goyo_before
and quit Goyo
, it will display the errors as follows:
Error detected while processing function <SNR>56_blank..<SNR>56_goyo_off:
line 67:
E117: Unknown function: s:goyo_after
but when I make them global like this:
function! g:goyo_before()
silent !tmux set status off
endfunction
function! g:goyo_after()
silent !tmux set status on
endfunction
let g:goyo_callbacks = [function('g:goyo_before'), function('g:goyo_after')]
it will be OK.
Thanks. Actually I'm aware of the problem. And It depends on the version of Vim. I've noticed that function(s:something)
doesn't work on some old versions of Vim. Maybe I should just update the example not to confuse the users who don't run the recent version.
@junegunn my Vim version is 7.3.682
. What version do you use? version 7.4?
I'm confused about silent! AirlineRefresh
and silent !tmux set status on
. Does the key word silent
mean showing no message when executing method, no matter it's Ok or wrong? why is the former !
nearer to silent and the latter !
nearer to tmux? Are they different?
my Vim version is 7.3.682. What version do you use? version 7.4?
I'm running 7.4.27 and have no problem with script-local funcrefs, but I can confirm that it doesn't work on 7.3.429 which I have on another machine. I'm not sure which is the first version that officially supported the feature.
why is the former ! nearer to silent and the latter ! nearer to tmux? Are they different?
silent
suppresses normal messages. The bang version, silent!
even ignores error messages. For more information, you can refer to :help silent
. I've added silent!
to AirlineRefresh to ignore error even when the user is running an old airline without the command.
First, thanks for goyo.Today, I installed goyo using vundle plugin.and have configured vimrc as follows:
but when I exit Goyo,get the error messages:
after I type any command, my status bar looks like this:![workspace 1_025](https://f.cloud.github.com/assets/2144697/1931447/081e651a-7ebf-11e3-826c-4f7a934f8e76.jpg)
before adding Goyo,it looks like as follows:![workspace 1_026](https://f.cloud.github.com/assets/2144697/1931476/8e57ecaa-7ebf-11e3-9661-658b5d12b0cf.jpg)