QCodeEditor
                                
                                 QCodeEditor copied to clipboard
                                
                                    QCodeEditor copied to clipboard
                            
                            
                            
                        Add Vim Cursor
Vim Cursor is a rectangle with the character inside of it. This commit adds a member function called setVimCursor() and vimCursor() that sets and retrieves the cursor type the QCodeEditor is presenting. This cursor is only visible when FakeVim is attached to the Editor. The Rectangle is visible when in Normal/Visual mode and a zero width line is visible when in insert mode.

Best reviewed: commit by commit
Optimal code review plan 
Do not paint cursor in insert mode
Add overwrite mode support on INS press
Vim cursor resets overwrite mode and sets cursor width to 0
Disable line highlighting in vim mode
Add highlight line option and fix update of cursor color on theme chan...
Powered by Pull Assistant. Last update f15e52f ... 71d64cf. Read the comment docs.
The cursor color on my machine is different from your screenshot:
CP Editor:

Vim:


The color of the cursor should be the color of the text.
And, why is it a "I" in insert mode? In my real vim, it is a block (the same as the normal mode) in the insert mode.
BTW, you can update the submodule without merging this into master. You can merge this when the FakeVim in CP Editor is finished.
You can work on FakeVim of CP Editor first. There are too many bugs/problems now, sometimes I can't tell whether it's a problem of the text cursor or a problem of FakeVim itself.
You can work on FakeVim of CP Editor first. There are too many bugs/problems now, sometimes I can't tell whether it's a problem of the text cursor or a problem of FakeVim itself.
It will be helpful if you could list them (maybe here, or by opening a PR from fakevim and in that thread).
As for bugs, I have found some highlighting issues when selecting block in visual mode. Save, Quit are not implemented correctly. I am thinking of how to behave for :w when untitled, :r, :q :q! other functions are not implemented correctly.
It will be helpful if you could list them (maybe here, or by opening a PR from fakevim and in that thread).
There are too many. Can't you find any? I can list them when you think everything is OK.
It will be helpful if you could list them (maybe here, or by opening a PR from fakevim and in that thread).
There are too many. Can't you find any? I can list them when you think everything is OK.
I have already mentioned some issues that I have found. I am just implementing things haven't tested much. But there are limitations of fakevim, it doesn't supports all vim commands. As for how I added support for fakevim, most of code comes from fakevim example.
And, why is it a "I" in insert mode? In my real vim, it is a block (the same as the normal mode) in the insert mode.
It is "I" in my neovim and all other vim emulation tools that I use, like IdeaVim, VSCode Vim Emulation, Visual Studio Vim Emulation. The block represents the "Replace" mode. So If you press "Ins" it toggles from Insert mode to Replace mode and vice versa. Just as expected, in Replace mode it becomes a block.
The color of the cursor should be the color of the text.
This is from Kate (KDE Notepad++ like an editor). It does not changes the cursor colour to text colour. Rather it generates contrast between the cursor and the text using a Difference Composition mode.

auto cp = /* cursor painter */;
cp.setPen(Qt::NoPen);
cp.setBrush(m_syntaxStyle->name() == "Default" ? Qt::white : cursorColor);
cp.setCompositionMode(QPainer::CompositionMode_Difference);
@ouuan could you please review this PR?