roam-unofficial / roam-toolkit

Roam force multiplier
MIT License
476 stars 43 forks source link

Document all existing shortcuts/vim mappings #123

Open Stvad opened 4 years ago

Stvad commented 4 years ago

They have descriptions in settings. But discoverability is so-so. This is especially true for vim mappings as they are context dependent and it may not be clear on what the given mapping does from the brief description.

Stvad commented 4 years ago

85 related

butterywombat commented 4 years ago

i think deleting a block isn't documented also, but works (dd)

santiyounger commented 3 years ago

Is there a list of the default shortcuts anywhere? If not this would be awesome. Specially for vim I want to make sure I learn all the specific shortcuts and going to the settings everytime is a bit tedious when all I need is to see them in a list.

Thanks for the amazing plugin, I'm literally considering moving to Roam only for the fact that you created this tooklit, specially for vim mode, Keep it up

Stvad commented 3 years ago

No list in the docs, but here is the copy of the state of the settings in case it's helpful:

{
    "incDec": {
        "active": true,
        "incShortcut": "Ctrl+Alt+ArrowUp",
        "decShortcut": "Ctrl+Alt+ArrowDown",
        "incWeekShortcut": "Ctrl+Alt+PageUp",
        "decWeekShortcut": "Ctrl+Alt+PageDown"
    },
    "srs": {
        "active": true,
        "srs_AGAIN": "ctrl+shift+1",
        "srs_HARD": "ctrl+shift+2",
        "srs_GOOD": "ctrl+shift+3",
        "srs_EASY": "ctrl+shift+4"
    },
    "block_manipulation": {
        "active": true,
        "duplicateBlockOrSelection": "Meta+shift+d",
        "deleteBlock": "Alt+k",
        "copyBlockRef": "ctrl+shift+c",
        "copyBlockEmbed": "ctrl+meta+c"
    },
    "block_navigation_mode": {
        "active": false,
        "blockNavigationMode_Exit to Normal Mode": "Escape",
        "blockNavigationMode_Toggle Fold Block": "z",
        "blockNavigationMode_Select Block Up": "k",
        "blockNavigationMode_Select Block Down": "j",
        "blockNavigationMode_Select First Visible Block": "shift+h",
        "blockNavigationMode_Select Last Visible Block": "shift+l",
        "blockNavigationMode_Select First Block": "g g",
        "blockNavigationMode_Select Last Block": "shift+g",
        "blockNavigationMode_Select Many Blocks Up": "ctrl+u",
        "blockNavigationMode_Select Many Blocks Down": "ctrl+d",
        "blockNavigationMode_Scroll Up": "ctrl+y",
        "blockNavigationMode_Scroll Down": "ctrl+e",
        "blockNavigationMode_Expand Last Reference Breadcrumb": "alt+z",
        "blockNavigationMode_Collapse the view for the page in references (or query) section": "shift+z",
        "blockNavigationMode_Open parent page": "1",
        "blockNavigationMode_Open parent page in sidebar": "shift+1",
        "blockNavigationMode_Open mentions": "2",
        "blockNavigationMode_Open mentions in sidebar": "shift+2",
        "blockNavigationMode_Select Panel Left": "h",
        "blockNavigationMode_Select Panel Right": "l",
        "blockNavigationMode_Close Page in Side Bar": "ctrl+w",
        "blockNavigationMode_Click Selection": "i",
        "blockNavigationMode_Click Selection and Go-to End of Line": "a",
        "blockNavigationMode_Insert Block Before": "shift+o",
        "blockNavigationMode_Insert Block After": "o",
        "blockNavigationMode_Undo": "u",
        "blockNavigationMode_Redo": "ctrl+r",
        "blockNavigationMode_Paste": "p",
        "blockNavigationMode_Paste Before": "shift+p",
        "blockNavigationMode_Copy": "y",
        "blockNavigationMode_Copy Block Reference": "alt+y",
        "blockNavigationMode_Copy Block Embed": "shift+y",
        "blockNavigationMode_Enter Visual Mode / Cut in Visual Mode": "d",
        "blockNavigationMode_Enter Visual Mode": "v",
        "blockNavigationMode_Grow Selection Up": "shift+k",
        "blockNavigationMode_Grow Selection Down": "shift+j",
        "blockNavigationMode_Move Block Up": "command+shift+k",
        "blockNavigationMode_Move Block Down": "command+shift+j",
        "blockNavigationMode_Click Hint 0": "q",
        "blockNavigationMode_Shift Click Hint 0": "shift+q",
        "blockNavigationMode_Ctrl Shift Click Hint 0": "ctrl+shift+q",
        "blockNavigationMode_Click Hint 1": "w",
        "blockNavigationMode_Shift Click Hint 1": "shift+w",
        "blockNavigationMode_Ctrl Shift Click Hint 1": "ctrl+shift+w",
        "blockNavigationMode_Click Hint 2": "e",
        "blockNavigationMode_Shift Click Hint 2": "shift+e",
        "blockNavigationMode_Ctrl Shift Click Hint 2": "ctrl+shift+e",
        "blockNavigationMode_Click Hint 3": "r",
        "blockNavigationMode_Shift Click Hint 3": "shift+r",
        "blockNavigationMode_Ctrl Shift Click Hint 3": "ctrl+shift+r",
        "blockNavigationMode_Click Hint 4": "t",
        "blockNavigationMode_Shift Click Hint 4": "shift+t",
        "blockNavigationMode_Ctrl Shift Click Hint 4": "ctrl+shift+t",
        "blockNavigationMode_Click Hint 5": "f",
        "blockNavigationMode_Shift Click Hint 5": "shift+f",
        "blockNavigationMode_Ctrl Shift Click Hint 5": "ctrl+shift+f",
        "blockNavigationMode_Click Hint 6": "b",
        "blockNavigationMode_Shift Click Hint 6": "shift+b",
        "blockNavigationMode_Ctrl Shift Click Hint 6": "ctrl+shift+b"
    },
    "spatial_mode": {
        "active": false,
        "spatialMode_Width": "600px",
        "spatialMode_Min Height": "200px",
        "spatialMode_Max Height": "90%",
        "spatialMode_Node Color": "#999",
        "spatialMode_Selection Color": "#1667d3",
        "spatialMode_Keyboard Pan Speed": "20",
        "spatialMode_Keyboard Drag Speed": "100",
        "spatialMode_Node Spacing": "50",
        "spatialMode_Follow nodes on open (off/pan/panZoom)": "pan",
        "spatialMode_Pan Animation Duration (ms) or 0": "100",
        "spatialMode_Max Layout Duration (ms) or 0 to disable": "1000",
        "spatialMode_Layout Threshold (0-1, small is orderly)": "0.03",
        "spatialMode_Zoom in": "Ctrl+=",
        "spatialMode_Zoom out": "Ctrl+-",
        "spatialMode_Zoom in completely": "Ctrl+0",
        "spatialMode_Zoom out completely": "Ctrl+9",
        "spatialMode_Pan left": "Ctrl+Command+ArrowLeft",
        "spatialMode_Pan down": "Ctrl+Command+ArrowDown",
        "spatialMode_Pan up": "Ctrl+Command+ArrowUp",
        "spatialMode_Pan right": "Ctrl+Command+ArrowRight",
        "spatialMode_Move node left": "Ctrl+Shift+h",
        "spatialMode_Move node down": "Ctrl+Shift+j",
        "spatialMode_Move node up": "Ctrl+Shift+k",
        "spatialMode_Move node right": "Ctrl+Shift+l",
        "spatialMode_Select left of current selection": "Ctrl+h",
        "spatialMode_Select down of current selection": "Ctrl+j",
        "spatialMode_Select up of current selection": "Ctrl+k",
        "spatialMode_Select right of current selection": "Ctrl+l",
        "spatialMode_Save workspace to clipboard": "Ctrl+Shift+s",
        "spatialMode_Restore workspace from page": "Ctrl+Shift+o"
    },
    "calculate-estimate": {
        "active": true,
        "calculate-estimate": "ctrl+m",
        "estimate_property": "estimate"
    },
    "navigation": {
        "active": true,
        "goToTodayPage": "ctrl+shift+`",
        "goToNextDayPage": "ctrl+shift+ArrowUp",
        "goToPreviousDayPage": "ctrl+shift+ArrowDown"
    },
    "day-title": {
        "active": true
    },
    "fuzzy-date": {
        "active": true,
        "guard": ";"
    },
    "live_preview": {
        "active": false
    },
    "random-page": {
        "active": true,
        "insert-random-page": "ctrl+shift+/",
        "open-random-page-in-sidebar": "ctrl+command+shift+/",
        "random-page-exclude": ", 20\\d\\d$|\\[\\[interval|\\[\\[factor"
    },
    "settings": {
        "theme": "light",
        "featureId": ""
    }
}
santiyounger commented 3 years ago

that's super useful, thanks for that!

andreasg7 commented 3 years ago

Just started using the native/wrapper Roam Research app and realized I can't do without VIM. Managed to enable the .js version (:)) but it would be great if somehow, based on the above "block_navigation_mode" mapping, we could customize the hot keys (even without settings). Is there any way the above could be part of the .js? Happy to be able to customize through the roam/js page and not a proper settings screen.. many thanks!

Stvad commented 3 years ago

right now the settings are "short-circuted" in the JS version (see https://github.com/roam-unofficial/roam-toolkit/tree/roam-js branch). It should be possible to read the settings from the object set on "window", I'd be happy to accept contributions for that. Not sure if I'd have capacity to look into it myself soon