Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
build-*/
dist/
.idea
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ configure_file(

add_library(VSCodeKeymapNpp SHARED
src/VSCodeKeymapPlugin.cpp
src/handlers/ActionHandlers.cpp
src/handlers/CommentHandlers.cpp
src/handlers/CursorHandlers.cpp
src/handlers/FoldHandlers.cpp
src/handlers/LineHandlers.cpp
src/handlers/ScrollHandlers.cpp
src/GeneratedBindings.inc
${CMAKE_CURRENT_BINARY_DIR}/VSCodeKeymapNpp.rc
)

target_include_directories(VSCodeKeymapNpp PRIVATE include)
target_include_directories(VSCodeKeymapNpp PRIVATE include src)
target_compile_features(VSCodeKeymapNpp PRIVATE cxx_std_20)
target_compile_definitions(VSCodeKeymapNpp PRIVATE UNICODE _UNICODE WIN32_LEAN_AND_MEAN NOMINMAX)
target_link_libraries(VSCodeKeymapNpp PRIVATE comctl32)

set_target_properties(VSCodeKeymapNpp PROPERTIES
OUTPUT_NAME "VSCodeKeymapNpp"
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ notepad++.exe -noPlugin -multiInst -nosession -settingsDir=<temp-dir>

These files are generated and should stay in sync:

1. `data/vscode-default-keybindings.windows.json`
2. `docs/VSCodeKeybindingCoverage.MD`
3. `src/GeneratedBindings.inc`
1. `docs/VSCodeKeybindingCoverage.MD`
2. `src/GeneratedBindings.inc`

If you change `data/keybinding-mappings.json` or the generator script, regenerate
those files in the same change.
Expand Down
23 changes: 13 additions & 10 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ documented as intentionally unported.
- Runtime bindings come from generated tables in `src/GeneratedBindings.inc`
- Release flow now supports `x86`, `x64`, and `arm64`

The plugin still registers two menu commands:
The plugin currently registers two menu commands:

- `Plugins > VSCode Keymap NPP > Toggle VSCode Strict Keymap`
- `Plugins > VSCode Keymap NPP > Show VSCode Coverage Summary`
- `Plugins > VSCode Keymap NPP > Config/Reference`
- `Plugins > VSCode Keymap NPP > About`

## Coverage model

Expand All @@ -31,16 +31,15 @@ Bindings land in one of three states:
- `documented-unported`: listed, but intentionally not emulated

Current generated totals live in the coverage report and are also shown in the
plugin summary dialog.
plugin About dialog.

## Repository layout

- `src/VSCodeKeymapPlugin.cpp`: plugin runtime and custom editor actions
- `src/GeneratedBindings.inc`: generated runtime binding tables
- `data/keybinding-mappings.json`: mapping manifest for portable shortcuts
- `data/vscode-default-keybindings.windows.json`: generated normalized source snapshot
- `docs/VSCodeKeybindingCoverage.MD`: generated coverage report
- `scripts/sync-vscode-keybindings.ps1`: refresh source snapshot, report, and runtime tables
- `scripts/sync-vscode-keybindings.ps1`: refresh the source scrape, report, and embedded runtime/reference tables
- `scripts/package-release.ps1`: build and package release zips

## Refresh generated shortcut data
Expand All @@ -55,9 +54,8 @@ powershell -ExecutionPolicy Bypass -File .\scripts\sync-vscode-keybindings.ps1
That script will:

- fetch the current VS Code default keybindings page
- regenerate the normalized Windows shortcut snapshot
- validate manifest coverage and runtime collisions
- regenerate the runtime include file
- regenerate the embedded runtime/reference include file
- regenerate the Markdown coverage report

## Build
Expand Down Expand Up @@ -117,8 +115,9 @@ Artifacts:
Each zip is Plugin Admin-friendly:

- `VSCodeKeymapNpp.dll` at archive root
- `doc/README.MD`
- `doc/VSCodeKeybindingCoverage.MD`

The DLL carries the reference data used by the config dialog, so deployment no
longer requires shipping the generated docs beside it.

## Install

Expand All @@ -138,6 +137,10 @@ Or under a machine-wide Notepad++ install:
Use the DLL whose architecture matches the installed Notepad++ build exactly.
Restart Notepad++ after copying the plugin.

Inside `Plugins > VSCode Keymap NPP > Config/Reference`, checked rows are the
shortcuts currently handled by the plugin. Clearing a row passes that shortcut
back through to Notepad++.

## Feedback and contributions

If a shortcut still behaves differently from VS Code, opens the wrong
Expand Down
36 changes: 28 additions & 8 deletions data/keybinding-mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@
{
"command": "editor.action.copyLinesDownAction",
"winKey": "Shift+Alt+Down",
"handler": "nppCommand",
"target": "IDM_EDIT_DUP_LINE",
"notes": "Duplicate line downward."
"handler": "custom",
"target": "DuplicateLineDown",
"notes": "Duplicate line downward and place the caret in the duplicate."
},
{
"command": "editor.action.copyLinesUpAction",
"winKey": "Shift+Alt+Up",
"handler": "custom",
"target": "DuplicateLineUp",
"notes": "Duplicate line, then move duplicate upward."
"notes": "Duplicate line upward and place the caret in the duplicate."
},
{
"command": "undo",
Expand Down Expand Up @@ -132,14 +132,34 @@
{
"command": "editor.action.insertCursorBelow",
"winKey": "Ctrl+Alt+Down",
"handler": "reservedNoOp",
"notes": "Reserved so Notepad++ defaults do not hijack VS Code multi-cursor shortcut."
"handler": "custom",
"target": "InsertCursorBelow",
"notes": "Move with the shared vertical-cursor rules; add/select one caret below. Virtual-space alignment is configurable."
},
{
"command": "editor.action.insertCursorAbove",
"winKey": "Ctrl+Alt+Up",
"handler": "reservedNoOp",
"notes": "Reserved so Notepad++ defaults do not hijack VS Code multi-cursor shortcut."
"handler": "custom",
"target": "InsertCursorAbove",
"notes": "Move with the shared vertical-cursor rules; add/select one caret above."
},
{
"command": "editor.action.cursorColumnSelectDown",
"winKey": "Ctrl+Alt+Shift+Down",
"section": "Basic Editing",
"label": "Column Select Down",
"handler": "custom",
"target": "CursorColumnSelectDown",
"notes": "Move with the shared vertical-cursor rules; rebuild the anchored column-selection range downward. Undocumented on the VS Code default keybindings page, but available in the VS Code Keyboard Shortcuts editor."
},
{
"command": "editor.action.cursorColumnSelectUp",
"winKey": "Ctrl+Alt+Shift+Up",
"section": "Basic Editing",
"label": "Column Select Up",
"handler": "custom",
"target": "CursorColumnSelectUp",
"notes": "Move with the shared vertical-cursor rules; rebuild the anchored column-selection range upward. Undocumented on the VS Code default keybindings page, but available in the VS Code Keyboard Shortcuts editor."
},
{
"command": "cursorTop",
Expand Down
Loading