Live data from Hacker News

A Cursory Look at Cursors

eno-writer.com

11–20 of 23 posts

Re: A Cursory Look at Cursors

#11

What do people on HN use, and why? Box, underline, vertical bar? Flashing or not?

Box if you are overwriting the next char, vertical bar if you are inserting. Dunno whenever you would use underline (I guess if it doesn't work with box for some reason)?

Thats the standard, anyway, so if you don't follow that, you are confusing your users.

Re: A Cursory Look at Cursors

#12
I particularly like how in Acme, when selection is zero-width ("empty"), it is the cursor. Conversely selection can be extended from cursor in any direction.

As a side effect, this greatly simplifies the API for manipulating both.

Re: A Cursory Look at Cursors

#13
post #12

I particularly like how in Acme, when selection is zero-width ("empty"), it is the cursor. Conversely selection can be extended from cursor in any direction. As a side effect, this greatly simplifies the API for manipulating both.

I actually used this pattern as well and I really like it. I store another property called `mark_idx`. When `cursor_idx` and `mark_idx` are the same then it's just a cursor. When they differ, the range between them is the selection.

Re: A Cursory Look at Cursors

#14

What do people on HN use, and why? Box, underline, vertical bar? Flashing or not?

I'd really like my cursor to kind of glow but my graphics programming skills are not at that level yet.

For editing, a block has more potential than a vertical bar because you always have context of a selected character to perform operations on (e.g. `x` to delete current char in vim). You can also do operations before and after that character (e.g. `i` vs `a` in vim).

Re: A Cursory Look at Cursors

#15
post #11

What do people on HN use, and why? Box, underline, vertical bar? Flashing or not?

Box if you are overwriting the next char, vertical bar if you are inserting. Dunno whenever you would use underline (I guess if it doesn't work with box for some reason)? Thats the standard, anyway, so if you don't follow that, you are confusing your users.

The standard in modal-land is box in normal mode and bar in insert mode. R for overwrite is an underline.

Re: A Cursory Look at Cursors

#17

What do people on HN use, and why? Box, underline, vertical bar? Flashing or not?

I used a bar until getting into vim, whose semantics are more box-like (with the cursed exception of the cursor moving one position back upon exiting insert mode, as if it were a bar)

Nowadays I like a box because it stands out on any color combination.

Re: A Cursory Look at Cursors

#18
post #12

I particularly like how in Acme, when selection is zero-width ("empty"), it is the cursor. Conversely selection can be extended from cursor in any direction. As a side effect, this greatly simplifies the API for manipulating both.

What is Acme in this context? Id like to get an idea of what you mean.

Re: A Cursory Look at Cursors

#19
post #8

What do people on HN use, and why? Box, underline, vertical bar? Flashing or not?

I use a solid box in a terminal and for coding, and a vertical bar for writing in emacs org-mode. But I recently tried out a one-third box[1] in emacs and I am really loving it! It's partway between a box and an underline. Some software has a half-box option but I don't think MacOS Terminal or iTerm2 have that. [Edit: I was wrong — iTerm2 has an advanced setting for "underline cursor width"] I used to use flashing bu…

As a fellow Emacs and iTerm user, thank you for sharing, both of those look good to me :)

Re: A Cursory Look at Cursors

#20
post #18
post #12

I particularly like how in Acme, when selection is zero-width ("empty"), it is the cursor. Conversely selection can be extended from cursor in any direction. As a side effect, this greatly simplifies the API for manipulating both.

What is Acme in this context? Id like to get an idea of what you mean.

the acme text editor, originally from plan9

http://acme.cat-v.org/ https://www.youtube.com/watch?v=dP1xVpMPn8M

Post reply on HN