Mark current Line, and navigate through marked lines

In Visual Studio, we can use:
CTRL+kk to place a marker on the current line
and
CTRL+kn to navigate through marked lines.

My question is: is there a way to do this with Sublime Text2?

Thanks

Upvotes: 103

Views: 57775

Answers (3)

George Mastro
George Mastro

Reputation: 307

The bookmarks system is pretty OK, but I would suggest you to try the plug-in "SublimeBookmarks" which extends the capabilities of the built-in mechanism.

Check it out here: https://github.com/bollu/sublimeBookmark

Preview: http://i.imgur.com/gtjChPG.gif enter image description here

Upvotes: 17

juanchod
juanchod

Reputation: 681

Actually, you can. Here's the menu screenshot from a mac. I hope this helps.

Sublime text2

Upvotes: 55

fraxel
fraxel

Reputation: 35269

Yep! Go on the menus to Preferences>Key Bindings - Default this is a file with all the default key bindings. Read the whole thing! (lots of goodies) Here is a cut and paste of the bookmarks info (linux), which should be self explanatory.

{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" },

Upvotes: 203

Related Questions