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

$HOME/.vim/ftplugin not working anymore #2124

Closed
stefanos82 opened this issue Jan 11, 2019 · 3 comments
Closed

$HOME/.vim/ftplugin not working anymore #2124

stefanos82 opened this issue Jan 11, 2019 · 3 comments

Comments

@stefanos82
Copy link

I don't know what you did, but I have updated vim-go today and now I cannot use my mapped keys.

gocomplete.vim consists of

setlocal omnifunc=gocomplete#Complete

and gomappedkeys.vim consists of

inoremap <buffer> <C-k> <C-x><C-o>
autocmd FileType go nmap <F5> <Plug>(go-run)
autocmd FileType go nmap <C-i> <Plug>(go-imports)
autocmd FileType go nmap <C-l> <Plug>(go-info)

The full path for files is $HOME/.vim/ftplugin/go/

@bhcleek
Copy link
Collaborator

bhcleek commented Jan 12, 2019

It was probably #2109 #2108. I'll take a deeper look this weekend.

@stefanos82
Copy link
Author

@bhcleek OK, I think I may have resolve my issue.

Since 1ed9b52, with this major refactoring it made it unnecessary for me to be explicit for filetypes with regards to my mapped keys.

First, I moved my aforementioned files to $HOME/.vim/after/ftplugin/ because I placed them in the wrong directory and after a bit of investigation, I read a couple of articles that suggested to use the after path which gets parsed last.

I did so and I removed the autocmd FileType go part from my mapped keys and now works as expected.

Therefore consider it fixed, but! if you think my solution is not the proper one, then please by all means correct me where I'm wrong and let me know so I can apply yours if you have a better suggestion that is.

Else, feel free to close it.

@bhcleek
Copy link
Collaborator

bhcleek commented Jan 12, 2019

I think your solution is the right one. Thank you for the quick turnaround.

@bhcleek bhcleek closed this as completed Jan 12, 2019
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