Docs / Editors / Vim

How to Track Time in Vim

Vim

Let's set up Vim to count how much time you spend coding!

Step 1: Make a Hackatime Account

Go to Hackatime and make an account. Then log in.

Step 2: Get Your Settings Ready

Click this link to the setup page. It will set up your account so it works with Vim.

Step 3: Add the Plugin to Vim

Easy Way (with vim-plug)

  1. Add this line to your .vimrc file:
   Plug 'wakatime/vim-wakatime'
  1. Save the file and restart Vim
  2. Type :PlugInstall in Vim and press Enter

Simple Way (copy and paste)

Copy and paste this into your terminal:

echo "Plugin 'wakatime/vim-wakatime'" >> ~/.vimrc && vim +PluginInstall

That's it! The plugin will use your settings from Step 2.

If Something Goes Wrong

Can't see your time? Go back to the setup page and try again.

Plugin not working? Close Vim and open it again.

Don't know how to edit .vimrc? Type :e ~/.vimrc in Vim to open it.

Still having trouble? Ask for help in Hack Club Slack - look for the #hackatime-dev channel.

What Happens Next

Start coding! Your time will show up on your Hackatime page in a few minutes.

Found an issue with this page? Edit it on GitHub - we'd love your help making the docs better!

85 people currently hacking