cheatsheet do
    title 'Sublime Text 3'
    docset_file_name 'Sublime_Text_3'
    keyword 'sublime'
    source_url 'http://cheat.kapeli.com'

    category do
        id 'General'

        entry do
            name 'Command palette'
            command 'CMD+SHIFT+P'
        end

        entry do
            name 'Go to anything'
            command 'CMD+P'
        end

        entry do
            name 'Go to symbol'
            command 'CMD+R'
        end

        entry do
            name 'New file'
            command 'CMD+N'
        end

        entry do
            name 'Save file'
            command 'CMD+S'
        end

        entry do
            name 'Save file as'
            command 'CMD+SHIFT+S'
        end

        entry do
            name 'Save all'
            command 'CMD+OPTION+S'
        end

        entry do
            name 'Open file'
            command 'CMD+O'
        end

        entry do
            name 'Close file'
            command 'CMD+W'
        end

        entry do
            name 'Reopen closed file'
            command 'CMD+SHIFT+T'
        end

        entry do
            name 'New window'
            command 'CMD+SHIFT+N'
        end

        entry do
            name 'Close window'
            command 'CMD+SHIFT+W'
        end

        entry do
            name 'Show sidebar'
            command 'CMD+K, CMD+B'
        end

        entry do
            name 'Show console'
            command 'CTRL+`'
        end

        entry do
            name 'Focus sidebar'
            command 'CTRL+0'
        end

        entry do
            name 'Focus group/pane 1-9'
            command 'CTRL+1-9'
        end

        entry do
            name 'Enter full screen'
            command 'CMD+CTRL+F'
        end

        entry do
            name 'Enter distra­ction free mode'
            command 'CMD+CTRL+SHIFT+F'
        end
    end

    category do
        id 'Moving / Editing'

        entry do
            name 'Undo'
            command 'CMD+Z'
        end

        entry do
            name 'Redo'
            command 'CMD+SHIFT+Z'
        end

        entry do
            name 'Repeat'
            command 'CMD+Y'
        end

        entry do
            name 'Copy'
            command 'CMD+C'
        end

        entry do
            name 'Yank'
            command 'CTRL+Y'
            notes 'Inserts the text that’s on top of the kill ring'
        end

        entry do
            name 'Cut'
            command 'CMD+X'
        end

        entry do
            name 'Paste'
            command 'CMD+V'
        end

        entry do
            name 'Paste and indent'
            command 'CMD+SHIFT+V'
        end

        entry do
            name 'Indent'
            command 'CMD+]'
        end

        entry do
            name 'Unindent'
            command 'CMD+['
        end

        entry do
            name 'Swap line up'
            command 'CMD+CTRL+Arrow Up'
        end

        entry do
            name 'Swap line down'
            command 'CMD+CTRL+Arrow Down'
        end

        entry do
            name 'Duplicate line'
            command 'CMD+SHIFT+D'
        end

        entry do
            name 'Delete line'
            command 'CTRL+SHIFT+K'
        end

        entry do
            name 'Join lines'
            command 'CMD+J'
        end

        entry do
            name 'Toggle comment'
            command 'CMD+/'
        end

        entry do
            name 'Toggle block comment'
            command 'CMD+OPTION+/'
        end

        entry do
            name 'Insert line before'
            command 'CMD+SHIFT+Return'
        end

        entry do
            name 'Insert line after'
            command 'CMD+Return'
        end

        entry do
            name 'Delete to beginning of line'
            command 'CMD+Backspace'
        end

        entry do
            name 'Delete to end of line'
            command 'CTRL+K'
        end

        entry do
            name 'Move to beginning of line'
            command 'CTRL+A'
        end

        entry do
            name 'Move to end of line'
            command 'CTRL+E'
        end

        entry do
            name 'Move up'
            command 'CTRL+P'
        end

        entry do
            name 'Move down'
            command 'CTRL+N'
        end

        entry do
            name 'Move left'
            command 'CTRL+B'
        end

        entry do
            name 'Move right'
            command 'CTRL+F'
        end

        entry do
            name 'Transpose'
            command 'CTRL+T'
            notes 'Swap two characters or words'
        end

        entry do
            name 'Close tag'
            command 'CMD+OPTION+.'
        end

        entry do
            name 'Wrap selection with tag'
            command 'CTRL+SHIFT+W'
        end

        entry do
            name 'Convert selected text to uppercase'
            command 'CMD+K, CMD+U'
        end

        entry do
            name 'Convert selected text to lowercase'
            command 'CMD+K, CMD+L'
        end

        entry do
            name 'Wrap paragraph at ruler'
            command 'CMD+OPTION+Q'
        end

        entry do
            name 'Sort lines'
            command 'F5'
        end

        entry do
            name 'Sort lines (case sensitive)'
            command 'CTRL+F5'
        end

        entry do
            name 'Go to line'
            command 'CTRL+G'
        end

        entry do
            name 'Jump to matching brackets'
            command 'CTRL+M'
        end

        entry do
            name 'Scroll to selection'
            command 'CTRL+L'
        end

        entry do
            name 'Scroll line up'
            command 'CTRL+OPTION+Arrow Up'
        end

        entry do
            name 'Scroll line down'
            command 'CTRL+OPTION+Arrow Down'
        end

        entry do
            name 'Record macro'
            command 'CTRL+Q'
        end

        entry do
            name 'Playback macro'
            command 'CTRL+SHIFT+Q'
        end
    end

    category do
        id 'Selection'

        entry do
            name 'Undo selection'
            command 'CMD+U'
        end

        entry do
            name 'Redo selection'
            command 'CMD+SHIFT+U'
        end

        entry do
            name 'Split selection into lines'
            command 'CMD+SHIFT+L'
        end

        entry do
            name 'Add next line'
            command 'CTRL+SHIFT+Arrow Down'
        end

        entry do
            name 'Add previo­us line'
            command 'CTRL+SHIFT+Arrow Up'
        end

        entry do
            name 'Single selection'
            command 'Esc'
            notes 'Cancel multiple selections'
        end

        entry do
            name 'Select all'
            command 'CMD+A'
        end

        entry do
            name 'Expand selection to word'
            command 'CMD+D'
        end

        entry do
            name 'Expand selection to line'
            command 'CMD+L'
        end

        entry do
            name 'Expand selection to tag (HTML/XML)'
            command 'CMD+SHIFT+A'
        end

        entry do
            name 'Expand selection to scope'
            command 'CMD+SHIFT+Space'
        end

        entry do
            name 'Expand selection to brackets'
            command 'CTRL+SHIFT+M'
        end

        entry do
            name 'Expand selection to indent­ation'
            command 'CMD+SHIFT+J'
        end
    end

    category do
        id 'Search / Replace'

        entry do
            name 'Find'
            command 'CMD+F'
        end

        entry do
            name 'Find next'
            command 'CMD+G'
        end

        entry do
            name 'Find previous'
            command 'CMD+SHIFT+G'
        end

        entry do
            name 'Increm­ental find'
            command 'CMD+I'
        end

        entry do
            name 'Replace'
            command 'CMD+OPTION+F'
        end

        entry do
            name 'Replace next'
            command 'CMD+OPTION+E'
        end

        entry do
            name 'Quick find'
            command 'CMD+OPTION+G'
            notes 'Searches for the word under the cursor'
        end

        entry do
            name 'Quick find all'
            command 'CMD+CTRL+G'
            notes 'Selects all occurences of the word under the cursor'
        end

        entry do
            name 'Use selection for find'
            command 'CMD+E'
        end

        entry do
            name 'Use selection for replace'
            command 'CMD+SHIFT+E'
        end

        entry do
            name 'Find in all open files'
            command 'CMD+SHIFT+F'
        end

        entry do
            name 'Next result in file search results'
            command 'F4'
        end

        entry do
            name 'Previous result in file search results'
            command 'SHIFT+F4'
        end
    end

    category do
        id 'Folding'

        entry do
            name 'Fold selec­tion'
            command 'CMD+OPTION+['
        end

        entry do
            name 'Unfold'
            command 'CMD+OPTION+]'
        end

        entry do
            name 'Unfold all'
            command 'CMD+K, CMD+J'
        end

        entry do
            name 'Fold all'
            command 'CMD+K, CMD+1'
        end

        entry do
            name 'Fold level 2-9'
            command 'CMD+K, CMD+2-9'
        end

        entry do
            name 'Fold tag attributes (HTML/XML)'
            command 'CMD+K, CMD+T'
        end
    end

    category do
        id 'Bookmarking'

        entry do
            name 'Set mark'
            command 'CMD+K, CMD+Space'
        end

        entry do
            name 'Select to mark'
            command 'CMD+K, CMD+A'
        end

        entry do
            name 'Delete to mark'
            command 'CMD+K, CMD+W'
        end

        entry do
            name 'Swap with mark'
            command 'CMD+K, CMD+X'
        end

        entry do
            name 'Clear to mark'
            command 'CMD+K, CMD+G'
        end

        entry do
            name 'Toggle bookmark'
            command 'CMD+F2'
        end

        entry do
            name 'Next bookmark'
            command 'F2'
        end

        entry do
            name 'Previous bookmark'
            command 'SHIFT+F2'
        end

        entry do
            name 'Clear bookmarks'
            command 'CMD+SHIFT+F2'
        end
    end

    category do
        id 'Layout'

        entry do
            name 'Single'
            command 'CMD+OPTION+1'
        end

        entry do
            name 'Columns: 2'
            command 'CMD+OPTION+2'
        end

        entry do
            name 'Columns: 3'
            command 'CMD+OPTION+3'
        end

        entry do
            name 'Columns: 4'
            command 'CMD+OPTION+4'
        end

        entry do
            name 'Rows: 2'
            command 'CMD+SHIFT+OPTION+2'
        end

        entry do
            name 'Rows: 3'
            command 'CMD+SHIFT+OPTION+3'
        end

        entry do
            name 'Grid: 3'
            command 'CMD+OPTION+5'
        end

        entry do
            name 'Jump to specified group'
            command 'CTRL+[NUM]'
        end

        entry do
            name 'Move file to specified group'
            command 'CTRL+SHIFT+[NUM]'
        end
    end

    category do
        id 'Miscellaneous'

        entry do
            name 'Toggle spell check'
            command 'F6'
        end

        entry do
            name 'Next misspe­lling'
            command 'CTRL+F6'
        end

        entry do
            name 'Previous misspe­lling'
            command 'CTRL+SHIFT+F6'
        end

        entry do
            name 'Build'
            command 'CMD+B'
        end

        entry do
            name 'Show comple­tions'
            command 'CTRL+Space'
        end

        entry do
            name 'Special characters'
            command 'CMD+OPTION+T'
        end
    end

  notes <<-'END'
    * Based on the cheat sheet from [Cheatography](http://www.cheatography.com/martinprins/cheat-sheets/sublime-text-3-osx/).
    * Converted and extended by [Rob Simpson](https://github.com/pertrai1).
  END
end
