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

退出Dict窗口后只会回到左边窗口,而不是查询词汇的窗口 #10

Open
VimWei opened this issue Jan 14, 2019 · 6 comments

Comments

@VimWei
Copy link

VimWei commented Jan 14, 2019

目前的问题:
1、Vim分为左右两个窗口,在右边窗口中用<leader>w查询,会弹出Dict窗口,这一切正常
2、但是当按q退出Dict窗口,光标会跑到左边窗口,不会回到右边窗口

@iamcco
Copy link
Owner

iamcco commented Jan 14, 2019

插件没有记录光标位置的功能

@VimWei VimWei closed this as completed Jan 17, 2019
@VimWei
Copy link
Author

VimWei commented Feb 26, 2019

这个插件太好用了,忍不住再次提议增加恢复光标位置的功能。

可否采用如下内置函数恢复光标位置?

:let save_cursor = getcurpos()
" 移动光标干活
:call setpos('.', save_cursor)

@VimWei VimWei reopened this Feb 26, 2019
@VimWei
Copy link
Author

VimWei commented Feb 26, 2019

或者:
先win_getid() 获取指定标签页与窗口编号(可缺省默认当前)的窗口ID
后win_gotoid() 切换到指定窗口ID的窗口

@iamcco
Copy link
Owner

iamcco commented Feb 26, 2019

欢迎提pr,我不知道为啥用不了有道的api了,一直返回异常所以没法调

@VimWei
Copy link
Author

VimWei commented Feb 26, 2019

这对我来说太有难度了,说实话我连pr是什么都不知道,上述提议纯粹是学习vim看到相关主题而想到的,动手更改插件还是得等您可以访问有道api时再继续吧,感谢!

@iamcco
Copy link
Owner

iamcco commented Feb 27, 2019

pr就是pull request

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