Sublime Text 2: how to position cursor at begin/end of buffer?

倖福魔咒の 提交于 2019-12-02 23:25:27

These work for me (Sublime Text 2 v2.0.1 on OS X 10.7.5)

  • ⌘-↑: start of buffer
  • ⌘-↓: end of buffer

The CMD-up and -down combos are the default shortcut for moving to the start and end of text buffers on OS X. They work in Safari text areas, too, for example. As such, they are not listed in the keymap file.

Deepak Lamichhane

In windows you can use

Ctrl + Home -> to the beginning of the file
Ctrl + End -> to the end of the file

to customize short cut for "move to beginning of file" and "move to end of file"

{ "keys": ["ctrl+home"], "command": "move_to", "args": {"to": "bof"} },
{ "keys": ["ctrl+end"], "command": "move_to", "args": {"to": "eof"} },
{ "keys": ["ctrl+shift+end"], "command": "move_to", "args": {"to": "eof", "extend": true} },
{ "keys": ["ctrl+shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true } },

An "almost" solution: as per standard OSX keybindings, shift + home/end will move the cursor from the current position to home/end, and select the text in-between. A side effect of this is that the cursor is positioned at home/end.

I would still like to know how to do this without selecting the intermediate text.

Darwin abcmacbook.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:06 PDT 2015; root:xnu-2782.20.48~5/DEVELOPMENT_X86_64 x86_64

OSX Yosemite Version: 10.10.3 (14D136)

In Sublime Text Stable Channel build 3083:

Command + down arrow takes me to end of buffer

Command + up arrow takes me to beginning of buffer

See if this works

beginning » CMD + left arrow

end » CMD + Right arrow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!