Skip to content

add support for visual selected text#3

Open
HandOfGod94 wants to merge 1 commit into
gnfisher:mainfrom
HandOfGod94:main
Open

add support for visual selected text#3
HandOfGod94 wants to merge 1 commit into
gnfisher:mainfrom
HandOfGod94:main

Conversation

@HandOfGod94

@HandOfGod94 HandOfGod94 commented Aug 5, 2023

Copy link
Copy Markdown

I wanted the tag search to also work with visually selected text instead of just <cword>.
This is specifically helpful for languages like ruby where method names at times are also represented as symbols.

For .e.g.

def foo
   ....
end 

in DSL libs are often represented as

event :xyz, before: :foo do
 ...
end

This often leads to visually selecting foo and then do a tag search.
This is working for me, and hope will be helpful for others as well.

1 thing to note though, I'm using this snippet to get visually selected text. This modifies a registers. Although it works out for me, I'm not sure if it's ideal for others.

@gnfisher

gnfisher commented Aug 9, 2023

Copy link
Copy Markdown
Owner

👋 Thanks for opening the PR @HandOfGod94. I'm going to try to find some time this weekend.

I'm not sure about using the a register? I'd like to do a little reading before merging and I'll get back to you asap. Thanks for thinking of handling the case and taking the time to contribute the code!

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

Successfully merging this pull request may close these issues.

2 participants