justinmk / vim-dirvish

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

gh mapping described in the help disables conceal #124

Closed lifepillar closed 6 years ago

lifepillar commented 6 years ago

When I use gh to hide dot-prefixed files, full paths become visible. For example:

foobar.txt
.gitignore

becomes:

/home/me/project/foobar.txt

Pressing R restores the normal situation. This might be intended behaviour, as the help also says that conceal is disabled when the buffer is modified, but this seems like a corner case. Also, I am pretty sure that in the past the behaviour was different, and gh did not unhide paths. Anyway, that can be easily fixed by appending :set cole=3<cr> to the mapping, but maybe there's a better way.

justinmk commented 6 years ago

This might be intended behaviour, as the help also says that conceal is disabled when the buffer is modified,

Yes, exactly.

in the past the behaviour was different, and gh did not unhide paths

That's true. Later I changed the behavior to better support "ad-hoc editing", e.g.:

:'<,'>!xargs du -hs

If conceal is enabled then editing the buffer is difficult.

that can be easily fixed by appending :set cole=3<cr> to the mapping, but maybe there's a better way.

g:dirvish_mode is recommended for most cases. The mapping is still mentioned for reference, but I guess it should also be updated as you note.

lifepillar commented 6 years ago

Thanks for the clarification. Feel free to close this, then.