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

make f and T as an operator multiline and add t and T #4

Open
desmap opened this issue Jul 17, 2019 · 5 comments
Open

make f and T as an operator multiline and add t and T #4

desmap opened this issue Jul 17, 2019 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@desmap
Copy link

desmap commented Jul 17, 2019

example:

This is a 
text in two lines

imagine the cursor is on the T.
With clever-f for example dfo would delete till the two in the second line. Now nothing happens.

and it would be awesome to have also t and T
Edit: I meant as 'motion' not operator command

@chemzqm chemzqm added the help wanted Extra attention is needed label Jul 18, 2019
@chemzqm
Copy link
Member

chemzqm commented Jul 18, 2019

It's useful, but I don't have time for it right now, PR welcome.

@desmap
Copy link
Author

desmap commented Jul 18, 2019

Yes, tbh I started to like smartf, it's really neat and fast and it's JS!
IDK, I don't have time either and I don't have a clue how and where to start. I mean I just put a folder in coc/extensions, call it coc-smartf2, clone/fork your code, make npm install and write some node.js?! And how do I use LSP to talk to nvim, is there a good resource to get into that stuff?
Or is all I need { Neovim, ExtensionContext, workspace } from 'coc.nvim' and LSP is not used with smartf?

@chemzqm
Copy link
Member

chemzqm commented Jul 18, 2019

There's no LSP stuff with coc-smartf.

For develop coc extensions, it's recommended to use vim's rtp: https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions#use-vims-plugin-manager-for-coc-extension

It uses webpack to compile the code, so you need run webpack --watch in extension root when developing.

@desmap
Copy link
Author

desmap commented Jul 19, 2019

@chemzqm a quick update on this topic:

Getting in your code would be a nice endeavor but I guess, I am as busy as you are. Moreover, I would need much more time to get into your codebase and you are already familiar with it. I looked briefly at the sources and my first thought was that coc-smartf should actually work out of the box as a motion when you map it with omap or just map. So, I guess there must be some deeper architectural problem, otherwise creating a motion/text object should be straightforward.

However, I saw also that you fixed the easymotion bug in the coc.vim repo (btw, great idea to check for the 'Target' string). I just tried easymotion again and it feels good but tbh I now think that coc-smartf is way better! If it had the motion feature it would be by far the best solution on the market, it has the best usability. The last days, I exchanged the three plugins clever-f, easymotion, quick-scope with coc-smartf only. Just now, I had to reinstall them all again because I need this motion feature, I use it all the time with vim operators. It's crucial.

I think coc-smartf could be also a huge opportunity to bring even more people closer to the coc-ecosystem. Like content marketing, it could even create more interest for coc's universe. Because like everything with coc.vim, coc-smartf is quite thought through.

So if it's an easy fix and if I were you, I would add motion to coc-smartf.

@chemzqm
Copy link
Member

chemzqm commented Jul 19, 2019

You're free to use any vim plugin you want to, coc.nvim tried to work with them instead of replace them.

It's not hard, just not high priority for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants