Giter Club home page Giter Club logo

Comments (12)

ohAitch avatar ohAitch commented on July 16, 2024 1

Relevant part from the link:

Moving the cursor: move the cursor by character, word, line, etc.

Entity Direction Emacs OS X
char left C-b ⌃B
  right C-f ⌃F
word left M-b ⌃⌥B ⌥←
  right M-f ⌃⌥F ⌥→
line begin C-a ⌃A ⌘←
  end C-e ⌃E ⌘→
  up C-p ⌃P
  down C-n ⌃N
doc begin M-<   ⌘↑
  end M->   ⌘↓

from tofu.

ohAitch avatar ohAitch commented on July 16, 2024
  • Maybe it's a macOS thing? Here's an overview of some arrows that will work in NotepadTextEdit Chrome Atom etc, there's also alt+up/alt+down for moving by paragraph.
  • ctrl-shift-up and ctrl-cmd-up seem like the common ones; I don't think I've seen a unified "move word" and "move line"(though sublime "move line" does do "move selection" if applicable)

from tofu.

Gregoor avatar Gregoor commented on July 16, 2024

That links doesn't seem to work unfortunately.

Another criteria in addition to current defaults is which shortcuts are used most often. I think an editor should handle its shortcuts like Dvorak handles keyboard layout, minimize finger motion for common actions.
The question then also becomes is moving the editor or moving nodes used more. And maybe another idea: Should there be different modes like in VIM (e.g. Reading vs Writing)?

I guess I'm going a little wide on this topic, plenty to explore here 🙈

from tofu.

ohAitch avatar ohAitch commented on July 16, 2024

My apologies, link should be fixed now.

It is definitely my experience that I read and navigate code more frequently than I modify it :P

from tofu.

Gregoor avatar Gregoor commented on July 16, 2024

Thanks! Yes I think I'd agree that reading is the more common activity, I value perspectives that are different from mine on this, as I'm mostly reading code using a touchpad (and IntelliJ's "go to definition"), which is the most natural way to do it for me, but I realize that most people are probably using their keyboard for it.

from tofu.

Gregoor avatar Gregoor commented on July 16, 2024

Oh I just realized that on Mac's Cmd + Arrow is used for word navigation, whereas on Windows Ctrl + Arrow is used. And that's despite Mac's having a ctrl key? I guess tofu needs different layouts by OS then, so how about Ctrl + Arrow on Mac?

from tofu.

ohAitch avatar ohAitch commented on July 16, 2024

Mac's Ctrl + Arrow is virtual desktop switching unfortunately ^-^

from tofu.

ohAitch avatar ohAitch commented on July 16, 2024

(like it is generally an oversimplification but not completely inaccurate to say that, for graphical applications, on Mac cmd means ctrl and ctrl means win)

from tofu.

Gregoor avatar Gregoor commented on July 16, 2024

Oh noes, what a shortcut hungry OS 😋 I guess going with your original recommendation of ctrl+cmd+arrow sounds the wisest then!

from tofu.

ohAitch avatar ohAitch commented on July 16, 2024

Or hm I don't think "Mac's Cmd + Arrow is used for word navigation" is exactly right, cmd arrow is beginning/end of line/document looks like?

from tofu.

Gregoor avatar Gregoor commented on July 16, 2024

Ah right, there's no Home/End keys on Mac keyboards

from tofu.

ohAitch avatar ohAitch commented on July 16, 2024

I think fn+arrow might be the same as cmd?

from tofu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.