Key Binding

I love Scrivener and I use it daily. The only thing I could wish for is custom key bindings.

I’ve used Vim in the past and I really like the hjkl navigation. It would be awesome to have that in Scrivener. I’m sure Emacs users would feel the same way. If we could customize our key bindings, we could write and edit even faster as we wouldn’t have to take our hands off the keys.

Thanks!

Do you mean something like the ability to create custom keyboard shortcuts for menu items in Mac OS X, like this: scrivener.tenderapp.com/help/kb/ … er-for-mac ?

The Windows version has to implement something like this itself, since Windows doesn’t provide that service OS-wide.

Or were you talking about something else?

That isn’t quite what I meant.

In Vim, you can navigate the document without using the arrow keys or mouse. It is usually done with a keyboard combination. This enables the programmer (or in this case writer) to navigate the current document without lifting their hands off the keyboard. With practice, this enables the writer to write even faster.

Here is a list of commonly used commands for movement and editing. http://www.keyxl.com/aaa8263/290/VIM-keyboard-shortcuts.htm Emacs does something similar, but they navigation is a different layout.

For example, I use Composer in full screen to avoid distractions. As I am writing I may want to go up a few lines to either correct what I have written or add another idea. I can either take my hands away from their natural position, or I could just hit Command+K to go up, and Command+H to move to the left and add some information. It would be nice to be able to navigate to a line, highlight the whole line, and delete it without touching the mouse, etc.

I know it doesn’t sound like much, but with practice it can really speed up your typing.

This should help:

hcs.harvard.edu/~jrus/Site/C … ystem.html

While you’re probably comfortable editing xml documents (probably in vi :slight_smile: ), if you want something pretty or a little more convenient, there’s a program designed to help you change keybindings as well: pqrs.org/macosx/keyremap4macbook/

I haven’t tried it yet myself, but the pesky way Home and End work (I rarely, if ever, need to zoom to the top of a document), might spur me to give it a go.

A question… Is the upshot of all this that Scrivener does not allow keyboard commands to be customized? I’ve been looking around the site trying to find an answer, and I’m coming to the conclusion that this vital capability is not present. I also see nothing about macros, or a programming language, equally vital in any piece of professional software.

I hope I’m mistaken. I love the look of what Scrivener is doing, but I’ve created numerous macros and custom key bindings in Word (2003) that give me a huge boost to productivity. I can’t see giving up these capabilities. (I make similarly extensive use of macros and custom keys in Adobe Creative Suite. Hard to live without.)

I hope someone can give me more info on this.

From what I can see on the Mac, you can add key bindings to certain functions that are already built into Scrivener.

File, Save As (Shift + Command + S) or File, Compile (Option + Command + E). These already have key bindings and you can alter them if you want different key combinations.

What I am referring to goes beyond this. I would like to add a key binding for Command + H that would move the cursor left, Command + J that would move the cursor up, Command + K that would move the cursor down, and Command L to move the cursor right. It was be awesome if I could do this within Scrivener so while I am in Composer, I can navigate the document easily without moving my hands.

It would be nice if I could import the vim or emacs keyboard layout/bindings into Scrivener as there are more functions that would make writing and editing much faster. (Delete a line, cut and paste a line, etc.)

The windows version has custom keyboard shortcuts built in since Windows doesn’t come with that feature at the OS level. Take a look at Tools->Options->Keyboard to customize your shortcuts.

Neither has any kind of scripting. Keith has been considering Applescript features on the Mac for a while now, but I think translations are taking precedence for now. Lots of professionals get along fine without scripting Scrivener (see the testimonials page), so while I’m sure it’s vital to you, I’d be cautious about asserting that it’s vital to more than a handful of people.

MyBrainHurts: You need to scroll further down in the link Keith provided. Keyboard bindings/shortcuts are indeed focused on the menu, but if you look at what they’re saying under “The format of DefaultKeyBinding.dict” you’ll see that you can even change what the ‘a’ key does, regardless of the menu of a given application. So you could quite easily change the behavior of Home & End that way or which key combo moves the cursor back and forth by word, line, or paragraph.

I would not recommend playing with that too close to a deadline though… :open_mouth: :laughing: