0

When I open Vim for the first time and go to search using ctrl+p fzf then start typing my search it gets prepended with the following text:

12;4$y

This means if I have typed searching it will become 12;4$ysearching. This only happens when I first open Vim and hit the key sequence to start the fzf finder before Vim has fully loaded. I'm wanting to track down where in the startup process this is happening.

How can I track this oddity down? My .vimrc dot_files

  • How much time does you vim need to startup? Test it with vim --startuptime vtime.log ? – dedowsdi Nov 20 '19 at 23:06
  • 2
  • @dedowsdi Last line is 405.889 000.001: --- VIM STARTED --- I take that to mean it took .405 seconds to start. Which means I have to trigger fzf in the first half-second to get this oddity to show up. – Shadoath Nov 21 '19 at 17:37
  • 1
    @Shadoath IMO 0.405 second is a bit slow, you might want to take a closer look at vtime.log and find out what's dragging you down. My point is that if you can reduce startup time to 0.2 second, your problem should vanish away most of time. If you really want to know why , you can follow above link to debug your vimrc. – dedowsdi Nov 21 '19 at 23:07
  • I would agree, a faster startup would be great. The line that takes the longest is 365.514 194.023: reading viminfo Is this for my .vimrc file? – Shadoath Nov 22 '19 at 0:28
1

Thanks to some very helpful comments by @dedowsdi I have discovered some more about the vast world that is Vim.

  1. You can test startup load time by running vim --startuptime vtime.log and inspecting the log file.
  2. The main problem was due to my viminfo file being 22k lines after the updates below it is only 2.5k.
  3. Updating my .vimrc options changed the load time of my viminfo to 008.324, more than 42x faster.

Current configuration inside my .vimrc file:

set history    =501
set viminfo    ='100,:100,@100,s10,\"100,h,n$v/files/info/viminfo

This took my load time from ~.4 a second to ~.2 second. The rest of this time is mostly plugins.

Extra notes:

Again thank you @dedowsdi for getting me going on tracking this all down. Edited for current config

| improve this answer | |
  • 1
    You are welcome. undolevels is not stored in viminfo, 501 might be too small if you work on a file for a whole day. < is the same as " . – dedowsdi Nov 23 '19 at 1:31
  • And I continue to learn. Thank you again! – Shadoath Nov 24 '19 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.