takac / vim-hardtime

Plugin to help you stop repeating the basic movement keys
MIT License
829 stars 30 forks source link

Enable hardtime in buffers without a name #54

Closed PeterMader closed 2 years ago

PeterMader commented 6 years ago

When g:hardtime_default_on is set, hardtime is supposed to be enabled in every buffer. This is what the README says.

The following line [link to source] does this:

autocmd BufRead,BufNewFile * call s:HardTime()

However, when creating a new buffer that does not yet have a name (e.g. using :tabnew), the BufNewFile event will not fire, and hardtime will not be run. The same is true for buffers that are opened by a plugin: opening a netrw window (:Ex) doesn't enable hardtime, which means that the user can freely use the hjkl and arrow keys.

Is this behavior intended? If not, this commit could possibly help.