justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.18k stars 64 forks source link

CursorColumn should initialise at col 0 #185

Closed nomasprime closed 4 years ago

nomasprime commented 4 years ago
Screenshot 2020-07-19 at 11 14 32

Cursor's at col 0 (blinking) but CursorColumn's at col 54.

chiefjester commented 4 years ago

I don't think that's a bug, that's how vim's hybrid number works. The left side is the number when you turn on set number, it starts at 1, relative number starts at 0 because it is based on movement, and you don't need to move if you're at current position, hence 0 (zero).

If you want to see zero, the do a :set nonumber Which just leaves relativenumber on, and then you'll see it zero.

nomasprime commented 4 years ago

@thisguychris this issue's about CursorColumn not being drawn at the cursor's actual column.

justinmk commented 4 years ago

? not sure I understand the question. Dirvish does nothing with CursorColumn. Dirvish uses Vim conceal feature, to hide the front part of each path, and it's possible that CursorColumn might look different than expected. Nothing a plugin can do about that afaik.

nomasprime commented 3 years ago

Thanks @justinmk.

cursorcolumn isn't very useful there anyway. Don't know why I didn't think of this before:

autocmd FileType dirvish setlocal nocursorcolumn
chiefjester commented 3 years ago

@thisguychris this issue's about CursorColumn not being drawn at the cursor's actual column.

Whoopsie, I misunderstood. I don't use the feature but yes, that should be where the cursor is.

I believe it is caused by how vim-dirvish leverages the conceal feature just as @justinmk described. It just conceals the whole path, that's why the cursor column is on the far right.

I personally don't use it, but I guess your solution to turning it off on dirvish buffer works since it's not useful on a dirivish buffer like you mentioned.