I'm using a Mac for development, but 15 years of Windows experience before that means certain keystrokes are hard-wired (like Home for beginning of line, etc).

Is there a simple way to get Sublime Text 2 on my Mac to behave more like a Windows editor? I am used to Visual Studio.net on Windows.

有帮助吗?

解决方案

I see two possible methods to solve your problem. The first is to find an OS X keybinding that does what you want. Then in the ST console enter sublime.log_commands(True). Then execute the command. This will give you the command so you can create a custom key binding. The second is to search for a key binding where you know the proper behavior exists in the Windows key map file (in your case home). In either case, the goal is to get a command and any necessary arguments.

You can now create a custom key binding. Go to Preferences -> Key Bindings - User. Insert the key binding you desire here. For your particular case, you would want something like the following.

[
    { "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} }
]

Of course remove the square braces if you already have an entry. Additionally, you can change the keys to something else if you need to, but since you said you wanted to rebind home, I assume that is what you want.

其他提示

I had a hard time getting used to Mac after I switched from Windows. Took me quite a while but you know, you have to get used to a few frequently used shortcuts.

Here are a few shortcuts.

Command + left arrow - beginning of the line, right arrow - end of the line, up arrow - beginning of the document, down arrow - end of the document.

Alt or Option + left arrow - beginning of the word, right arrow - end of the word.

Hope this helps.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top