Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Update README section "How can I move the cursor by each display line with word wrapping?"

Open ghost opened this issue 4 years ago • 4 comments

As of vscode 1.52.1, vscodevim 1.18.5 this section is incorrect and leads to errors in config if copied directly.

Firstly, it seems that the format and keywords have changed, which leads to errors.

So instead of what there is, much simpler version with keywords from remap examples above this one works:

    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": [
                "up"
            ],
            "commands": [
                "cursorUp"
            ]
        },
        {
            "before": [
                "down"
            ],
            "commands": [
                "cursorDown"
            ]
        },
        {
            "before": [
                "k"
            ],
            "commands": [
                "cursorUp"
            ]
        },
        {
            "before": [
                "j"
            ],
            "commands": [
                "cursorDown"
            ]
        }
    ]

Secondly, it says that binds such as 10j won't work, but they work correctly (at least now). Each wrapped line counts as real line during this jump.

I am not an experienced vscode or vscodevim user, so please update the documentation the way you think is right.

CC: @karlhorky #2924

ghost avatar Jan 19 '21 15:01 ghost

Thanks! Silly question, but if I already have the following in my settings, how can I preserve them while adding your contribution above?

// Users/$USER/Library/Application Support/Code/User/settings.json
{
    "workbench.colorTheme": "Default High Contrast",
    "files.autoSave": "onFocusChange",
    "editor.tabSize": 2,
    "editor.wordWrap": "on",
    "workbench.activityBar.visible": false,
    "explorer.confirmDelete": false,
    "workbench.startupEditor": "newUntitledFile",
    "editor.minimap.enabled": false
},

horak avatar Mar 29 '21 04:03 horak

But, this make my VSCode so laggy navigating using arrow keys.

yasirroni avatar Sep 06 '22 03:09 yasirroni

Thanks! Silly question, but if I already have the following in my settings, how can I preserve them while adding your contribution above?

// Users/$USER/Library/Application Support/Code/User/settings.json
{
    "workbench.colorTheme": "Default High Contrast",
    "files.autoSave": "onFocusChange",
    "editor.tabSize": 2,
    "editor.wordWrap": "on",
    "workbench.activityBar.visible": false,
    "explorer.confirmDelete": false,
    "workbench.startupEditor": "newUntitledFile",
    "editor.minimap.enabled": false
},
// Users/$USER/Library/Application Support/Code/User/settings.json
{
    "workbench.colorTheme": "Default High Contrast",
    "files.autoSave": "onFocusChange",
    "editor.tabSize": 2,
    "editor.wordWrap": "on",
    "workbench.activityBar.visible": false,
    "explorer.confirmDelete": false,
    "workbench.startupEditor": "newUntitledFile",
    "editor.minimap.enabled": false,
    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": [
                "up"
            ],
            "commands": [
                "cursorUp"
            ]
        },
        {
            "before": [
                "down"
            ],
            "commands": [
                "cursorDown"
            ]
        },
        {
            "before": [
                "k"
            ],
            "commands": [
                "cursorUp"
            ]
        },
        {
            "before": [
                "j"
            ],
            "commands": [
                "cursorDown"
            ]
        }
    ]
},

yasirroni avatar Sep 06 '22 03:09 yasirroni

Here is the better solutions in my opinion and experience (only several minutes though): https://github.com/VSCodeVim/Vim/issues/2924#issuecomment-1238252236

yasirroni avatar Sep 06 '22 14:09 yasirroni