Comments (12)
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.
- 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.
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.
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.
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.
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.
Mac's Ctrl + Arrow is virtual desktop switching unfortunately ^-^
from tofu.
(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.
Oh noes, what a shortcut hungry OS 😋 I guess going with your original recommendation of ctrl+cmd+arrow sounds the wisest then!
from tofu.
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.
Ah right, there's no Home/End keys on Mac keyboards
from tofu.
I think fn+arrow might be the same as cmd?
from tofu.
Related Issues (20)
- Transformative Copy and Paste like in Dion
- Prettier
- Unwrap and Buffer HOT 1
- multi-cursor for extend selection and unwrap
- Only advance cursor when typing a char that is both the next char and typing it would break syntax
- Wrong cursor when wrapping JSX
- Deletes too many chars for jsx tag name
- Can't navigate into generic
- binary op to ternary
- Move comments
- Missing export action for class, type and maybe more
- Ternary wrap jsx & type HOT 1
- unwrap generic
- move if-else cases
- cursor off when typing within collection
- spawn switch's case
- too eager var init delete
- cursorability
- TS type to interface
- delete within jsx name jumps too far
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tofu.