Skip to content

Commit

Permalink
Fix platform detection for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
rlue committed Mar 7, 2019
1 parent 3e4dc91 commit e3c29ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/barbaric.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
" Check dependencies
if system('uname -s') == 'Darwin' && executable('xkbswitch')
if has('mac') && executable('xkbswitch')
let g:barbaric_ime = 'macos'
elseif executable('fcitx-remote') && system('fcitx-remote') > 0
let g:barbaric_ime = 'fcitx'
Expand Down

6 comments on commit e3c29ed

@nicknameGrape
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a 2010 mac mini
has('mac') returns 0 for me
I read about it here.

Thanks for your great work, now that I have this plugin working I'm really happy.

@rlue
Copy link
Owner Author

@rlue rlue commented on e3c29ed Jun 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads up, @nicknameGrape! A patch has been applied in 250be70.

Unfortunately, I don't have a mac to test this on, so it would be a great help if you could update your install of vim-barbaric and let me know if this breaks anything.

@nicknameGrape
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick patch!

I tested it on my mac and automatic input switching is working with xkbswitch-macosx binary.
I tested the barbaric_timeout variable and that is working, too.
Switching between U.S. and Japanese input, I do not get the switching windows bug.

I don't use a plugin manager, so I installed the .vim files and the .txt doc file manually.
I am getting a warning message when I use the command :help barbaric:

Error detected while processing BufWinEnter Auto commands for "*":
E32: No file name

but I can still read the help file.

@nicknameGrape
Copy link

@nicknameGrape nicknameGrape commented on e3c29ed Jun 9, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rlue
Copy link
Owner Author

@rlue rlue commented on e3c29ed Jun 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your kind words!

FWIW, it looks like others have run into similar problems (#9 & #15), and found solutions via the 'timeoutlen' and 'ttimeoutlen' options. I will look into this when I have a little more time, and maybe add a comment in the README & help file.


Error detected while processing BufWinEnter Auto commands for "*":
E32: No file name

This plugin doesn't set any BufWinEnter autocmds. Do you have any defined in your .vimrc? Does this error only occur when opening the helpdoc for barbaric?

@nicknameGrape
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello again.

I'm happy to say vim-barbaric is working perfectly now!
Installing it in the standard recommended path (~/.vim/pack/.../start/vim-barbaric/...) stopped "ghost" characters from appearing on startup.
As for the lag when switching inputs, set ttimeoutlen=0 in my .vimrc was what I needed to do.
I didn't know that "closed" issues were hidden by default, so I missed the solution my first time around.
Thank you for adding the troubleshooting section to the readme, I never would have found it otherwise.

And you were right about the BufWinEnter auto commands, it was in my .vimrc for saving folds.
The solution, by the way, was here.

Thanks again for your great work.

Please sign in to comment.