rhysd / clever-f.vim

Extended f, F, t and T key mappings for Vim.
https://rhysd.github.io/clever-f.vim
1.01k stars 45 forks source link

Cursor jump to command line with g:clever_f_mark_cursor = 0 #9

Closed Konfekt closed 10 years ago

Konfekt commented 10 years ago

The cursor, after hitting f and waiting for a character, jumps for a short time to the end of the command line and returns. Can this be toggled off ?

rhysd commented 10 years ago

@EPNGH

Hi.

The cursor, after hitting f and waiting for a character, jumps for a short time to the end of the command line and returns.

This is because a character is input with getchar() function and it requires a cursor place at command line. However, there may be a workaround by put a highlight of a cursor out. Some investigation is needed.

Konfekt commented 10 years ago

Ok, I think the following plugin does not suffer from this defect:

https://github.com/chrisbra/improvedft

Perhaps it might be worth taking a look how it handles the character input after hitting f/t. (It has other drawback though such as unintended search highlighting)

Other than that your plugin puts a great idea into practice. Should be Vim default.

rhysd commented 10 years ago

Thank you, @EPNGH .

I'll check the plugin.

BTW, I've found that below code can hide the cursor.

set guicursor=n:block-NONE
set t_ve=
rhysd commented 10 years ago

I implemented hiding a cursor at 64ce4d504ca5f28dc4f5f628e1546d79672047f1.

Please try it and check the behavior is the one you intended. (The feature is enabled as default.)

Konfekt commented 10 years ago

Well done. Works perfectly.

Thank you!

rhysd commented 10 years ago

OK, thank you for your checking.

I'll write document and some simple tests, then I'll merge it to master branch.

rhysd commented 10 years ago

I merged this feature on commit 85b4494c79c871a856f5b1d788df76e3d36d43f3.