Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin does not work without plugin manager. #33

Closed
real-bird-kun opened this issue Nov 15, 2022 · 4 comments
Closed

The plugin does not work without plugin manager. #33

real-bird-kun opened this issue Nov 15, 2022 · 4 comments

Comments

@real-bird-kun
Copy link

Hi, recently I found this useful plugin and try to use it.
Thank you for this amazing work.

But I had a little problem.
When I installed the plugin with plugin manager, it works normally.
But when I try to install and use this plugin with my .vimrc as follows, the plugin does not work and report error.
I have already moved the "cursorword.vim" to the plugin folder manually.

source ~/.vim/plugin/cursorword.vim
let g:cursorword = 1 
let g:cursorword_highlight = 0 
let g:cursorword_delay = 0 
hi CursorWord0 ctermbg=lightgrey guibg=lightgrey term=none cterm=none gui=none
hi CursorWord1 ctermbg=lightgrey guibg=lightgrey term=none cterm=none gui=none

The error info is:

Error detected while processing CursorMoved Autocommands for "*":                                                                                    
E117: Unknown function: cursorword#cursormoved

Would you please help me out?
Thank you ;)

@itchyny
Copy link
Owner

itchyny commented Nov 15, 2022

The autoload/cursorword.vim file is also required.

@real-bird-kun
Copy link
Author

Hi, thank you for your reply.

I already have moved the autoload/cursorword.vim file to the corresponding folder and add source ~/.vim/autoload/cursorword.vim to my .vimrc.

And the plugin can work as expected.
However, when I edit files with vim, there is error info as follows:

error detect while processing autoload/cursorword.vim:
line 66: E121: undefined variable: s:save_cpo
E15: invalid expression:s:save_cpo
Press Enter or type command to continue

@itchyny
Copy link
Owner

itchyny commented Nov 17, 2022

Do not source the plugin files. The files under ~/.vim/ are loaded automatically. Please learn the runtime path (:h runtimepath)

@real-bird-kun
Copy link
Author

Thanks a lot. Everything works normally right now ; )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants