Topic: https://brettterpstra.com/2012/04/22/new-text-navigation-keybindings/
hide preview

What's next? verify your email address for reply notifications!

Ian Kirkland 12y, 311d ago

AWESOME!

I hadn't thought about actually digging into the keybindings. Genius. I'm a Keyboard Maestro + LaunchBar junkie with all kinds of navs, scripts, and RegEx text filters attached to my standard keys "dynamically" based on conditionals and other "activation modifiers", but many of the 2-or-so thousand (!) macros/scripts use ugly workarounds. This article opened up a whole new world I look forward to exploring. Thanks!

hide preview

What's next? verify your email address for reply notifications!

tjg6 12y, 330d ago

Do you think it possible to build keybindings :
a) to go to the end of a sentence, ditto Vim's )
b) to split a paragraph into its sentences (ditto Phraseology app) ?
It might be useful
Thanks for your work (btw, nvALT & iPad ?... )

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 12y, 330d ago

End of a sentence as opposed to end of a paragraph? No, keybindings offer no text processing capabilities and aren't able to determine anything other than the edge of word or text block.

hide preview

What's next? verify your email address for reply notifications!

JGC 12y, 331d ago

I've not had any user KeyBindings before, but I believe I've installed the files correctly. So far, though, I can't find an editing app where even a simple command -- eg, ^w for select word -- works. In some apps the cursor changes when I press ctrl to show a small icon to the right of the cursor, which I guess is trying to be a contextual menu. But I can't find anything in my system preferences where non-standard behaviour with the control key is selected. I've turned off TextExpanded and BetterTouchTool, and this doesn't help either. I'm running latest version of OS X.

Does anyone know what this icon means, and whether it should cause the DefaultKeyBinding.dict file to fail?

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 12y, 331d ago

I don't know what the icon would be, but it shouldn't have anything to do with the keybindings. Just so it's clear, ^w is a system-wide default command for deleting a word backwards. In my bindings, Opt-W is the shortcut for select word.

Apps have to be restarted after the ~/Library/KeyBindings/DefaultKeyBinding.dict is saved. No changes show up until you restart any app. If you launched the apps after saving the file, then something else is wrong. If a reboot doesn't fix it, feel free to contact me and I'll try and help you troubleshoot.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

JGC 12y, 331d ago

Thanks, Brett. I'm really wanting these to work, as I've been after something like these for quite a while. I'm running 10.7.3 on a MBP, and my keys are labelled fn/ctrl/alt/cmd ... I'd assumed the ^ meant ctrl, but if it means opt, then I assume that maps to alt for me. Anyway, with alt-w I do seem to get the right effect in this comment box in Chrome, but not in TextWrangler (where it types ∑) which is my main text editor. So, with your tip, it is at least working, and I'll now dig into why TextWrangler isn't compatible. (Unless you know of a reason already why it can't ...?)

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Brett 12y, 331d ago

TextWrangler appears to override DefaultKeyBinging.dict. TextMate does the same. I basically use these to emulate the convenience of working in TextMate/Sublime Text when I'm stuck in web text fields and TextEdit, etc. They work where I need them to, but advanced editors often have their own defaults.

remark link parent

load more (1 remarks)
hide preview

What's next? verify your email address for reply notifications!

JGC 12y, 331d ago

Thanks -- having heard you on Mac Power Users recently, I'm just beginning to try Sublime Text. It sounds like this is another reason to favour it. If I can get the relevant permissions, I'll add some notes to the Github page based on the info in these comments.

hide preview

What's next? verify your email address for reply notifications!