mhinz / vim-startify

:link: The fancy start screen for Vim.
MIT License
5.31k stars 186 forks source link

Navigation on the lists can't go past wrapped text if using ":map j gj" #156

Closed viccuad closed 9 years ago

viccuad commented 9 years ago

Well, I think the says it all.

To reproduce:

  1. Issue an :map j gj
  2. I have the following relevant options:
set wrap
set linebreak       
set breakindent
set formatoptions=tcrql 

resize your vim terminal window to something thin enough so wrapping happens,

[0]  ~/.vimrc
[1]  ~/.vimlog
[2]  ~/.dotfiles/
vim/.vimrc
[3]  ~/install.sh

And you will notice that pressing "j" you can't go from [2] to [3].

mhinz commented 9 years ago

First off, thanks for reporting.

gj tries to go one display line down, but Startify has some autocmds in effect so that the [x] can never be left. The cursor actually goes down but jumps back immediately. Vim is just clever enough not to redraw the screen in between, so one can't see it.

The easiest solution would be to just force some new and local mappings in the Startify buffer, e.g.:

if !empty(mapcheck('j', 'n'))
  nnoremap <buffer> j j
endif
mhinz commented 9 years ago

It should be fixed now.

viccuad commented 9 years ago

Awesome! many thanks!

mhinz commented 9 years ago

:shipit: