Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by
edited by

Hello, when i run a mapped key which has very long map string than my screen width, the cmdline always blinks, even adding "silent" parameter after nnoremap, it also doesn't work, and I really don't like it.

I wonder if there is any way to stop this blinking for such case?

It's really appreciated to look forward to your answer, thanks.

the below key map is for your reference, its map string is longer than my screen width.

nnoremap <silent> gT  :<c-u>
          \| if v:count == 0
          \|   exec 'normal gT'
          \| elseif v:count > tabpagenr('$')
          \|   tabmove
          \| elseif v:count >= tabpagenr()
          \|   exec 'tabmove' v:count
          \| elseif v:count < tabpagenr()
          \|   exec 'tabmove' v:count - 1
          \| endif
          \| <cr>

1 Answer

0 votes
by
 
Best answer

Hi,

Even without <silent> I can't notice the effect in xterm or st, but it's barely visible in vte sometimes (it's a sample terminal). What's your terminal and Vifm version? Terminal shouldn't make a difference here, but won't hurt to know it.

even adding "silent" parameter after nnoremap, it also doesn't work

Are you sure you're not defining the mapping more than once? You can try commenting out the part of vifmrc you're editing to see whether the mapping is still available (e.g., :nmap gT).

Defining a helper :command could be a workaround:

nnoremap gT :gT<cr>
command gT : if v:count == 0
          \|     execute 'normal gT'
          \| elseif v:count > tabpagenr('$')
          \|     tabmove
          \| elseif v:count >= tabpagenr()
          \|     execute 'tabmove' v:count
          \| elseif v:count < tabpagenr()
          \|     execute 'tabmove' v:count - 1
          \| endif
by

Hi,
I'm using the st terminal.

Anyway it works perfectly by following your workaround.
Thanks a lot.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...