Discussion:
top, middle and bottom
ale rimoldi
2012-06-07 08:02:30 UTC
Permalink
hi

one thing that i have been wishing to see in cmus are the three vim
keys:

H: put the cursor at the top of the screen
L: put the cursor at the bottom of the screen
M: put the cursor in the middle of the screen

and eventually

zt: put the current line at the top of the screen
zb: put the current line at the bottom of the screen

now:

H is free
L is used for live filter
M does switch between playing from playlist or library


if we want to use ctrl-h, ctrl-l and ctrl-m i discovered that ctrl-m
sends the return char (really useful?)...


does anybody also think that it would be handy to have those three
commands and shortcuts?

any other idea for the shortcuts to use?

ciao
a.l.e
Gregory Petrosyan
2012-06-07 18:29:48 UTC
Permalink
Post by ale rimoldi
one thing that i have been wishing to see in cmus are the three vim
H: put the cursor at the top of the screen
L: put the cursor at the bottom of the screen
M: put the cursor in the middle of the screen
and eventually
zt: put the current line at the top of the screen
zb: put the current line at the bottom of the screen
H is free
L is used for live filter
M does switch between playing from playlist or library
I use these keys in Vim too, but I don't think that we can change e.g. L and M
now — backward compatibility is a very important thing for a mature piece of
software like cmus.
Post by ale rimoldi
if we want to use ctrl-h, ctrl-l and ctrl-m i discovered that ctrl-m
sends the return char (really useful?)...
And ctrl-l redraws the terminal window by default; I am not sure that this
approach can work.
Post by ale rimoldi
does anybody also think that it would be handy to have those three
commands and shortcuts?
any other idea for the shortcuts to use?
I certainly think that cmus can benefit from being more vim-like, if this does
not violate backward compatibility. If anyone can propose a working solution —
that'd be great!

Gregory
Gregory Petrosyan
2012-06-12 11:20:48 UTC
Permalink
On Mon, Jun 11, 2012 at 11:41 AM, Paul Kramer
No, I mean add the functionality of jump to {bottom,top,middle}, but
have it not bound to any keys by default. The keys H, L and M stay as
they are.
I do not think it is a very good idea to add functionality that will
not be working «out of the box» — it does not look like a solution to
the problem of enhancing cmus' user interface to me.

       Gregory
gt
2012-06-12 11:56:26 UTC
Permalink
Post by Gregory Petrosyan
On Mon, Jun 11, 2012 at 11:41 AM, Paul Kramer
No, I mean add the functionality of jump to {bottom,top,middle}, but
have it not bound to any keys by default. The keys H, L and M stay as
they are.
I do not think it is a very good idea to add functionality that will
not be working «out of the box» — it does not look like a solution to
the problem of enhancing cmus' user interface to me.
H, L and M isn't too useful in case of cmus, at least in my opinion.
cmus is not a text editor that you need to navigate in this fashion very
fast and very frequently.

Also, while i love vim and use many programs with vim like keybindings,
i feel it would be regression for a software to change it's current
keybindings to achieve more vim likeliness. If applications want vim
type keys, it should be incorporated from the beginning.
a.l.e
2012-06-12 12:17:16 UTC
Permalink
hi
Post by gt
Post by Gregory Petrosyan
On Mon, Jun 11, 2012 at 11:41 AM, Paul Kramer
No, I mean add the functionality of jump to {bottom,top,middle}, but
have it not bound to any keys by default. The keys H, L and M stay as
they are.
I do not think it is a very good idea to add functionality that will
not be working «out of the box» — it does not look like a solution to
the problem of enhancing cmus' user interface to me.
H, L and M isn't too useful in case of cmus, at least in my opinion.
cmus is not a text editor that you need to navigate in this fashion very
fast and very frequently.
Also, while i love vim and use many programs with vim like keybindings,
i feel it would be regression for a software to change it's current
keybindings to achieve more vim likeliness. If applications want vim
type keys, it should be incorporated from the beginning.
hi, let me disagree with you :-)

the problem is that when i browse my collection i'm always at the last
line of the monitor, which is not very comfortable!
the same happens when i'm adding songs to the queue.

and this is all i do in cmus (when i'm actively in it and not simply
listening to some music...) so, in my understanding, it matches a
periodicty of "frequently" :-)

imo we need a way to get the cursor away from there and -- as a vim user
-- i consider the H and M the most natural keys to do it.

at least one of the movements (middle or top/bottom) should really be
implemented... and if it's done in a vim compatible way -- so that i
don't have to learn a new shortcut -- i would be more than happy!
(and you guess it: i never press L, M, or H in cmus!)

ciao
a.l.e

p.s.: before raising the issue i went through the man page looking for
this feature and didn't find it... but i'm not 100% if anything similar
is already implemented...
Johannes Weißl
2012-06-14 16:50:47 UTC
Permalink
Post by a.l.e
imo we need a way to get the cursor away from there and -- as a vim user
-- i consider the H and M the most natural keys to do it.
Hmm, I guess it would be not difficult to add something like
:win-page-top
:win-page-bottom
:win-page-middle

but, as Gregory said, it can be debated if too many commands without
default binding are useful. But maybe there is another solution: To me
it seems you are only needing these commands because you want to scroll
the window, but keep the cursor at the same vertical position. Maybe
something like this could be implemented, what do you think?


Johannes
Jason Woofenden
2012-06-15 01:10:06 UTC
Permalink
But maybe there is another solution: To me it seems you are only
needing these commands because you want to scroll the window, but
keep the cursor at the same vertical position. Maybe something
like this could be implemented, what do you think?
I love the idea of keeping the cursor away from the edges of the
window. I have my vim set to keep the cursor in the center:

set scrolloff=999

Reasons I like this:

+ When I bring up cmus, and the cursor is at the bottom or top,
I sometimes don't see it at first. and think that the status
line at the bottom is the cursor.

+ When I'm searching, it often helps to see some context around
my result. A few times I've searched view 2 for a track that
has the same name as the album, and it'd be quicker if I could
see more than just the first track of the album when I hit the
first search match.

+ I think it's relaxing, and takes less attention when the
cursor is always in the same place. (A mostly sub-conscious
thing.)

Many thanks to anybody who implements this :)

- Jason
yawfle
2012-06-15 03:26:59 UTC
Permalink
Post by Jason Woofenden
But maybe there is another solution: To me it seems you are only
needing these commands because you want to scroll the window, but
keep the cursor at the same vertical position. Maybe something
like this could be implemented, what do you think?
I love the idea of keeping the cursor away from the edges of the
set scrolloff=999
I enjoy this behavior in vim as well. Probably the only reason I haven't missed it too much in cmus is because I do more searching and filtering than scrolling. But I agree it would be a nice enhancement. :)
--
yawfle
Loading...