Comments (10)
The was webapp that I test CM to see if it is replicated there or not, but I could not find that for test.
You probably mean https://replit.com/@util/codemirror-vim
But https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html is better as it is directly the version from github master
Does Obsidian map j to gj?
Vim help says that gj
should be not linewise, but when wrap
is off, gj
in vim behaves like j
gj or *gj* *g<Down>*
g<Down> [count] display lines downward. |exclusive| motion.
Differs from 'j' when lines wrap, and when used with
an operator, because it's not linewise.
from codemirror-vim.
Hi, where do you see this behavior, and is there some additional config applied to codemirror-vim ?
On https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html dj deletes two lines as expected, so more information to track down the issue would be greatly appreciated.
from codemirror-vim.
Hi, where do you see this behavior, and is there some additional config applied to codemirror-vim ?
On https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html dj deletes two lines as expected, so more information to track down the issue would be greatly appreciated.
I am using Obsidian and since they use code mirror I thought it being a upstream bug like usual. If it work on CM then it should be an Obsidian bug. The was webapp that I test CM to see if it is replicated there or not, but I could not find that for test.
from codemirror-vim.
The was webapp that I test CM to see if it is replicated there or not, but I could not find that for test.
You probably mean https://replit.com/@util/codemirror-vim
But https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html is better as it is directly the version from github masterDoes Obsidian map j to gj? Vim help says that
gj
should be not linewise, but whenwrap
is off,gj
in vim behaves likej
gj or *gj* *g<Down>* g<Down> [count] display lines downward. |exclusive| motion. Differs from 'j' when lines wrap, and when used with an operator, because it's not linewise.
Thank you. It is the exact problem. It is not the issue of obsidian per se, It is my config I use from my obsidian.vimrc file which I mapped j to gj.
from codemirror-vim.
I think adding onoremap j j
to disable gj mapping in operator pending mode should accomplish the behavior you want.
But please let me know if you see a way in which codemirror-vim could be improved. As far as i can tell now we behave exactly in the same way as neovim.
from codemirror-vim.
I think adding
onoremap j j
to disable gj mapping in operator pending mode should accomplish the behavior you want.
But please let me know if you see a way in which codemirror-vim could be improved. As far as i can tell now we behave exactly in the same way as neovim.
I will give it a try when get home.
Yes I can see great improvement over time (I remember when it was not like this) Now there is even possible to run macros inside it which is awesome.
Thank you very much for your efforts
from codemirror-vim.
Closing the issue, but please tell us if you think that the way codemirror-vim handles gj is incorrect, or if you see any way to improve it.
As far as i understand, changing linewise behavior of gj only when wrap is set, does not match the behavior described in vim help, so it is a bug, and what neovim does is better, but maybe i am wrong?
from codemirror-vim.
Closing the issue, but please tell us if you think that the way codemirror-vim handles gj is incorrect, or if you see any way to improve it.
As far as i understand, changing linewise behavior of gj only when wrap is set, does not match the behavior described in vim help, so it is a bug, and what neovim does is better, but maybe i am wrong?
No you are totally right about this, it is just an issue with my setting and I am OK with it.
I like to see more vim ex commands as there are very few implemented right now. Fir example it like to see my vim marks with :marks
. But I suppose it is a subject for another FR.
Thanks
from codemirror-vim.
@Archie-2021 added marks in https://raw.githack.com/replit/codemirror-vim/ex-marks/dev/web-demo.html, not sure if it is worth to make them clickable or change the style in some way.
from codemirror-vim.
@Archie-2021 added marks in https://raw.githack.com/replit/codemirror-vim/ex-marks/dev/web-demo.html, not sure if it is worth to make them clickable or change the style in some way.
Thanks
from codemirror-vim.
Related Issues (20)
- New release? HOT 1
- nnoremap i :nohl<CR>i doesn't work
- Insert mode maps don't support character insertion HOT 3
- Vim keybindings don't work with Japanese keyboard HOT 3
- [Question] Alter an operator HOT 4
- [BUG]: error A document must have at least one line HOT 11
- readonly not work on vim mode
- Dead key input treated as insertion in normal mode HOT 1
- Feature: Replacement Preview HOT 2
- WS-2472: Find-backwards <Space> ignored HOT 6
- gk skips a line if cursor is at column 0 position (Obsidian) HOT 4
- CM default indent/dedent of Cmd + Square Brackets is not suppressed when vim is the chosen flavor HOT 3
- Pressing up and down arrow keys at the start of a line behaves strangely shortly after entering insert mode HOT 1
- `j` in visual mode renders offset to actual line when there is empty lines
- Increment zero-padded decimal HOT 3
- The /g flag on :s in Vim mode doesn't work as it should - it only replaces the first occurrence HOT 3
- Implement relative line numbers HOT 2
- Replaying a macro while it is being recorded hangs the page HOT 3
- [Bug] Random input in normal mode with IME HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codemirror-vim.