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

Find word under cursor uses smartcase settings #1800

Closed
Valve opened this issue Jun 2, 2017 · 5 comments
Closed

Find word under cursor uses smartcase settings #1800

Valve opened this issue Jun 2, 2017 · 5 comments
Assignees
Labels

Comments

@Valve
Copy link

Valve commented Jun 2, 2017

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Environment:

  • VSCode Version: 1.12.2
  • VsCodeVim Version: 0.8.4
  • OS: MacOS 10.12.5

What happened:
When pressing * (Shift + 8 on my keyboard), I expect it to loop over words under cursor.
When there is a word in different cases, looping stops.

What did you expect to happen:
Shift + 8 should loop through all occurrences of the word of the same case in a document

How to reproduce it:

Create a document with:

test
TEST
test

position your cursor on line 1 column 1, then press *. The cursor should jump to line 3. Pressing it again should make the cursor jump to line 1.

This plugin makes the cursor jump to line 2 and then it stops working.

@Chillee
Copy link
Member

Chillee commented Jun 2, 2017

The reason behind this is that we use your smartcase/ignorecase settings for * as well. Thus, when you press * the first time, it'll ignore the case and jump to TEST. However, when you press * again, it's now on a word with capital letters, and smartcase causes it to not ignore the case.

I would suggest using n to loop through words regardless, but this is a bug.

@Valve
Copy link
Author

Valve commented Jun 2, 2017

Thanks!
Although n looping works, it is not very convenient. With * I can start the search and loop with the same key, with n, I need to start the search with * and then press n.

@Chillee Chillee changed the title Find word under cursor is buggy Find word under cursor uses smartcase settings Jun 2, 2017
@pattersongp
Copy link

Please fix this. Not only is it unauthentic for / and * to be case insensitive, asking the user to have another setting for this default setting hurts the usability of the plugin and makes it less attractive to new users coming from Vim.

@J-Fields
Copy link
Member

@pattersongp / definitely works correctly for me. What are ignorecase and smartcase set to for you?

@pattersongp
Copy link

@J-Fields I unselected smartcase and ignorecase and / * # seem to be working for me. Thanks

@J-Fields J-Fields self-assigned this Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants