Giter VIP home page Giter VIP logo

peasymotion's People

Contributors

mivorobiev avatar msomeone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

peasymotion's Issues

Jump Forward/Backward to Start of Word from Caret Relative Position

Too many jump labels on the screen makes it hard to see things. Also, it adds alot of commotion to the screen by adding jump labels that basically get in the way of jumping to target. Consider:
image

Say we have the cursor at the first character of line 5:
image

In Vim/VsCodeVim you can jump backwards by word:
image

image

Or by character (searching for character "p" below):
image

image

Same can be done for jumping forward by word:
image

image

Or by character (searching for character "p" below):
image

image

Would it be worth it to implement any of those? A 2 character search could render any of these approaches useless. The main use case is for more targeted refined searching/jumping.

Visual Studio 2022 support

I wonder if the support of vs2022 is planned?!

This is an amazing extension and I will wait with the upgrade until this extension gets updated. If it is not planned then I have to find some replacement (not preferred) or to use an unofficial version (modify the source.extension.vsixmanifest file accordingly).

Add Jump Labels to Beginning of Each Line

Another EasyMotion feature to consider implementing: Adding jump labels to the beginning of each line.

Vim:
image

VsCodeVim:
image

There does appear to be a minor difference between the two. Vim EasyMotion adds a jump label to every line, regardless if it has text or not. VsCodeVim EasyMotion only adds jump labels to lines that have text. Don't have a strong preference either way.

Example text used in the screenshots:
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type specimen book.

I has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently
with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature
from 45 BC making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia,
looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of
the word in classical literature, discovered the undoubtable source.
Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil)
by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The
first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.

visual studio 2022 support notification

after opening a visual studio solution, on the first use of a peasymotion action, I get the following notification:
"PeasyMotion: 2022 - visual studio 2022 support is here! Link is in 'more info' section"
which can get annoying as I need to dismiss it each time.
could you make it so the notification only appears once, or add a way to suppress it?

Fake Jumps

Thanks for PeasyMotion. I think it is a fantastic extension.

It has one issue that is quite annoying. Make a selection, for example via Ctrl+W to select a word, and then invoke PeasyMotion -- the cursor will jump to the correct location; however, after immediately pressing an arrow function, the cursor will jump back to the previous location (where the selection was).

This happens to me, constantly. It's gotten to the point where I, subconsciously, don't invoke PeasyMotion jumps to avoid that fake jump.

Please, find it in your heart to fix that.

Thank you

Q: What is `gS` in VsVim sample mappings?

VsVim sample mappings include ones like this

nnoremap <Space> gS:vsc Tools.InvokePeasyMotion<CR>

As an intermediate Vimmer, I do not recognize the purpose of the gS portion of the mapped command. It's not documented, seems to behave only as S when executed in normal mode, and the mapping works the same without it AFAICT. What is gS for?

How to do one char jump?

(Sorry if it's duplicate)

Similar to Tools.InvokePeasyMotionTwoCharJump, how to do one char jump?

Etc, I want to search one char. Then jump

Thanks.

Tools.InvokePeasyMotionLineJumpToWordBegining continues to capture input after the "jump position letter" has been entered.

I have assigned Alt + J to Tools.InvokePeasyMotionLineJumpToWordBegining.
When go to a line and press the shortcut, several letters are presented. So far, so good.
When I enter the "jump position letter", the cursor jumps to the right position but PeasyMotion continues to capture all further input in the status bar:

image

I would like to write in the editor, however, at the position where we have jumped to. I think, this is also the way it is intended to be, right?

This happens in Microsoft Visual Studio Community 2019, Version 16.6.2

BUG: Press shorcut 'jump to document tab' twice in a row

If you perform the shortcut 'jump to document tab', and then do it again (without selecting a letter for the document), it will change to the jump-to-word mode, but it won't actually jump if you press the letters.

This is true for other shorcuts as well, such as jump-to-line.

Bugs with updated one char jump

Windows 10, MSVC 2022, v17.10 Preview 7

I don't use the one char jump (OCJ, Tools.InvokePeasyMotionOneCharJump) functionality, but gave it a try because of the new release (1.11). I found a couple of bugs with it.

A) OCJ doesn't seem to be working at all.

Reproduce:

  1. Press keyboard shortcut assign to the command
  2. Press key for character
  3. Once the labels come up, press the key for the label
  4. The labels disappears, but the cursor remains at the same location

B) OCJ locks up Visual Studio.

  1. Press keyboard shortcut assign to the OCJ command
  2. Again, Press keyboard shortcut assign to the command
  3. PeasyMotion seems to enter an infinity loop

Regards,

Merge all jump strategies into single one

InvokePeasyMotionTwoCharJump is awesome, yet doesn't work when the character is at the end of the line.
It would be awesome to also have a single character version of it.

It would work in the following way:

  • Ctrl+Enter are pressed
  • Normaly PeasyMotion is invoked, and the first character from the "selector" matches the one you are selecting.
  • If a key from the selector is pressed, it follows normal approach: substract chars from selector until last one, and then select.
  • If a different key is pressed, find that char in all viewport and label the results. Following keypressed are used to select the new selectors.

Note: if the selected char is at the end of the line, it puts the cursor at the end of the line instead.

This would keep peasymotion simple but with flexibility to fully select whatever you need.
Also labels would be somehow predictable which improves speed.

Jump Forward/Backward to End of Word Default & from Caret Relative Position

By default, when PeasyMotion is invoked, jump labels are assigned to the beginning of words:
image

It would be nice/useful to add functionality to assign jump labels to end of all words. Not sure how that is done in Vim but VsCodeVim, given this text:
image

It would look similar to:
image

Both Vim and VsCode Vim support jumping to the end of words forward from the current cursor position, below, the cursor is on the "p" character at the beginning of line 6:
VsCode Vim
image

Vim
image

As noted in #10 there is a small difference between Vim and VsCode Vim with blank lines.

Both Vim and VsCode Vim support jumping to the end of words backward from the current cursor position, below, the cursor is on the "p" character at the beginning of line 9:
VsCode Vim
image

Vim
image

Line Motions/Jumping

Use case: I am already on the line where I need to be, I need to navigate to a specific place within that line. This is a more targeted search. Say you have this text example below and that your cursor is at the beginning of the line:

This is some sample text for searching or finding in a sentence.

Let's say I wanted to get to the word "searching"
In Vim, you could do:
6w but counting words is not efficient.
f{s};;; also annoying because of the constant use of ;
/{wordToSearch} works but.....eh?

The result would be (letters in parentheses indicate jump point before or after word):

(a)This (b)is (c)some (d)sample (e)text (f)for (g)searching (h)or (i)finding (j)in (k)a (l)sentence.

This(a) is(b) some(c) sample(d) text(e) for(f) searching(g) or(h) finding(i) in(j) a(k) sentence(l).

Tested update 1.12

Visual Studio 2022, v17.10

Regarding closed issue #35

I tested the update 1.12 for one character jump (OCJ).

The first issue is fixed -- I can do one char jumps.

The second issue is still there. For me, reproducing this is extremely easy. It would be useful for the dev if another user could reproduce the issue.

Reproduce Steps:

  1. Press keyboard shortcut assign to the OCJ command
  2. Without doing anything else, press the same keyboard shortcut again.
  3. At this point, it's not possible to move with the keyword arrow keys. It seems the mode stays in PeasyMotion OCJ mode -- and it does not get back to regular mode. The only way to get out of that mode is to restart visual studio.

Add options to configure jump label visual style

For starters - background and foreground color selection.

  • Save default style
  • (A) Add option to manually override + color pickers
  • (B) Add option to pick colors from visual studio theme.

Not sure if default style should be preserved. Maybe it is better to set (B) as default behaviour. But for now unsure which colors from theme to select as BG\FG colors. Maybe jump labels should have same style as selected text has (inverted colors)?

2 Char Search

It would be nice to have the capability of 2 char search. The use case is to allow for a more targeted, precise search. Another benefit of this is fewer jump labels on the screen. The search would search the entire file. This is the (easymotion-s2) command.

Vim. Cursor is on line 5, first character. Invoke 2 char search for 'no':
image

VsCodeVim. Cursor is on line 5, first character. Invoke 2 char search for 'no':
image

Missing jumplabels

When there is a label at the end of previous line, PM may miss candidate label at the beginning of the next line (when there is word to jump to). This happens as candidate does not meet minimum label separation distance criteria. Reset separation distance after EOL occured.

Missing labels on "..", " " sequences. Annoys when coding lua or similar stuff with lots of printing\fornatting

BUG: PM changes document order in document tabs

Really great extension. I hope you find the time to work on it some more.

There's a bug that's kind of annoying:
I have my document tabs along the left side of the screen, vertically. This is changed in (Tools>Environment>Tabs and Windows). The documents are sorted alphabetically. When I perform a 'jump to document tab' shortcut, PM reorders the titles of the documents. I don't mean that the documents shift from left-to-right... I mean that the alphabetical order in which they are listed changes. So, if you were focusing on document A, it will change to some document X. The order will then go back when either switching to the document or canceling via Escape.

Thanks for this really nice extension.

Esc key not working

After installing PeasyMotion, I noticed that Esc key doesn't work anymore as an shortcut to unselect text.
This happens after cancelling one selection using Esc.

Can see the update in the gallery, but update doesn't stick.

Thank you for making the latest set of changes, which updates the extension to 1.9.*

Unfortunately, as mentioned in the release notes, I cannot update the extension to 1.9. I've tried all things I could, including disabling auto-updates, but problem is still there. I also uninstalled the extension, then tried to install from CI, but that one does not install, either. I get the following error:

image

The one thing that jumps out at me is "Extension is not signed."

2024-05-15 9:25:36 - Microsoft VSIX Installer
2024-05-15 9:25:36 - -------------------------------------------
2024-05-15 9:25:36 - vsixinstaller.exe version:
2024-05-15 9:25:36 - 17.10.2178+aee1612ae5
2024-05-15 9:25:36 - -------------------------------------------
2024-05-15 9:25:36 - Command line parameters:
2024-05-15 9:25:36 - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,T:\DOWNLOADS\PeasyMotion v1.9(2).vsix
2024-05-15 9:25:36 - -------------------------------------------
2024-05-15 9:25:36 - Microsoft VSIX Installer
2024-05-15 9:25:36 - -------------------------------------------
2024-05-15 9:25:36 - Initializing Install...
2024-05-15 9:25:36 - Searching for applicable products...
2024-05-15 9:25:38 - Found installed product - Visual Studio Community 2022
2024-05-15 9:25:38 - Found installed product - Visual Studio Community 2022 Preview
2024-05-15 9:25:38 - Found installed product - Global Location
2024-05-15 9:25:38 - Extension Details...
2024-05-15 9:25:38 - 	Identifier         : PeasyMotion.a87d2837-6b54-4518-b014-3b29b4dcd902
2024-05-15 9:25:38 - 	Name               : PeasyMotion
2024-05-15 9:25:38 - 	Author             : Maksim Vorobiev
2024-05-15 9:25:38 - 	Version            : 1.9
2024-05-15 9:25:38 - 	Description        : Implements several vim-easymotion motions (word,line,two-char search), fast tab / document switching, fast text region selection.
This extension differs from other motion/jump extensions as it assigns jump labels to all words in text viewport, without asking specific "jump" key.
Such a behaviour may lead to faster motion and navigation in certain scenarios.
Inspired by vim-easymotion.
        
2024-05-15 9:25:38 - 	Locale             : en-US
2024-05-15 9:25:38 - 	MoreInfoURL        : 
2024-05-15 9:25:38 - 	InstalledByMSI     : False
2024-05-15 9:25:38 - 	SupportedFrameworkVersionRange : [4.5,)
2024-05-15 9:25:38 - 	SignatureState     : Unsigned
2024-05-15 9:25:38 - 	Supported Products : 
2024-05-15 9:25:38 - 		Microsoft.VisualStudio.Community
2024-05-15 9:25:38 - 			Version : [16.0,17.0)
2024-05-15 9:25:38 - 			ProductArchitecture : x86
2024-05-15 9:25:38 - 	References         : 
2024-05-15 9:25:38 - 	Prerequisites      : 
2024-05-15 9:25:38 - 		-------------------------------------------------------
2024-05-15 9:25:38 - 		Identifier   : Microsoft.VisualStudio.Component.CoreEditor
2024-05-15 9:25:38 - 		Name         : Visual Studio core editor
2024-05-15 9:25:38 - 		Version      : [16.0,17.0)
2024-05-15 9:25:38 - Signature Details...
2024-05-15 9:25:38 - 	Extension is not signed.
2024-05-15 9:25:38 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   at VSIXInstaller.ExtensionService.GetInstallableDataImpl(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
   at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Document Tab - cutting first letter

I noticed that when I try use Document Tab future sometimes first couple of letters from name of file are missing. This is how tabs look like on beginning.
image

When I execute Document Tab functionality it starts look like this
image

As you can see TemperatureRepositry.cs is replaced by H|peratureRepository.cs and for TemperatureService.cs everything is working fine and I get A|TemperatureService.cs.

Sometimes the characters in the displayed box are cut off

First of all - I want thank you for this extensions. I'm using it every day and it is great.

And now bug. I noticed that some chars in box is little bit cut off. Below couple of examples. It looks like generated box is too small for fit all characters. Also i want suggest something that can be changed/upgraded. It will be nice if end user will have ability to change background and foreground colors of suggestion box. I'm using dark theme in VS.

image
image

Feature Request: Visual indicator for one char jump

If this request is acceptable, please consider it as a request to be done whenever. It's just a nice to have.

Today, as of version 1.12, for performing a one character jump, when pressing the shortcut to activate the PeasyMotion command, the only indicator that the command is active is on the status bar. That information is easy to miss.

Please consider adding a visual indicator to signify that one-char jump is actively waiting for a key. A possible way to do this could be putting a label near the location of the caret. Today's current message on the statusbar would remain as is.

Example:

OneCharJump

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.