How to move cursor using vim in vscode without forgetting previous column?
See original GitHub issueMore like an question than a feature request. If it is fundamental, I apology but I just failed find the way.
Here is current status: (where ---^---
denotes the cursor)
#include <iostream>
int main() {
std::cout << "Hello world\n";
//------------------^-------------------
std::cout << "hello world\n";
}
after press jj
in normal mode:
#include <iostream>
int main() {
std::cout << "Hello world\n";
std::cout << "hello world\n";
^--------------------------------
}
What I want:
#include <iostream>
int main() {
std::cout << "Hello world\n";
//------------------^-------------------
std::cout << "hello world\n";
}
after press jj
:
#include <iostream>
int main() {
std::cout << "Hello world\n";
std::cout << "hello world\n";
//------------------^-------------------
}
How can I achieve this?
Here is my vim settings
// vim settings
"vim.easymotion": true,
"vim.useSystemClipboard": true,
"vim.normalModeKeyBindings": [
{
"before": ["u"],
"after": [],
"commands": [
{
"command": "undo",
"args": [],
}
]
},
{
"before": ["<C-r>"],
"after": [],
"commands": [
{
"command": "redo",
"args": []
}
]
},
{
"before": ["j"],
"after": ["g","j"],
},
{
"before": ["k"],
"after": ["g","k"],
},
],
"vim.statusBarColors.commandlineinprogress": "",
"vim.leader": "<space>",
// "vim.useCtrlKeys": true,
"vim.handleKeys": {
"<C-a>": false,
"<C-f>": true,
"<C-r>": true,
"<C-y>": false,
"<C-d>": true,
},
"vim.overrideCopy": true,
"vim.smartRelativeLine": true,
"editor.lineNumbers":"relative",
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to move cursor using vim in vscode without forgetting ...
Recently I install vscodevim extension on vscode. Everthing works fine except moving the cursor across line bothers me.
Read more >Visual Studio Code Tips and Tricks
You can quickly open a file or image or create a new file by moving the cursor to the file link and using...
Read more >Introduce a move command for moving cursor in the editor
Introduce a move command for moving cursor at a logical view position in the ... the cursor (no selection) editor.selections = [new vscode....
Read more >Multiple Cursors - Barbarian Meets Coding
Move the cursor on top of a word in your code. Type <CMD-D> ( CTRL-D on Windows/Linux) or gb to add another cursor....
Read more >What is the equivalent of VS Code's "Ctrl+Shift+L" in Vim?
In VS Code, when you select a text and hit Ctrl+Shift+L, all occurrences of the selected text are also selected. For example, in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you remove this binding then it should work like what you want.
I think C-d and C-u has the same issue (forgetting previous column). It’s so strange for vim user. 😭