Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Jan 19, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 19, 2021

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

@horak
Copy link

horak commented Mar 29, 2021

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
},

@yasirroni
Copy link

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

@yasirroni
Copy link

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
Copy link

yasirroni commented Sep 6, 2022

Here is the better solutions in my opinion and experience (only several minutes though): #2924 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants