Comments (13)
I think the problem you found doesn't come from the "keyboard" module, but from the "formatting" one. You use the default soft wrapping mode, don't you? That maps j and k to use the virtual position instead of the default, so cursor movement is more natural. Can you confirm if the problem is fixed by commenting lines 103-106 in autoload/pantondoc/formatting.vim
? I can wrap it into an option, so you can opt out of it.
BTW, why jr
instead of the standard ce
and cE
? Just curious.
from vim-pandoc.
It might not be a bad idea to move this functionality into the keyboard module, so all mappings are handled in one place.
from vim-pandoc.
I've tried to reproduce this by placing
map jr ce
in my vimrc, and I've found vim-pantondoc's mappings don't affect it (except that when pressing j, it takes a bit to react, because it waits a bit for r
). So, maybe there's something wrong in your jr
mapping? Can you provide the definition for it, and also the output of :verbose map j
?
from vim-pandoc.
When pantondoc is loaded, i get two extra lines in response to :verbose map j
:
v j *@gj
Last set from ~/.vim/bundle/vim-pantondoc-master/autoload/pantondoc/formatting.vim
n j *@gj
Last set from ~/.vim/bundle/vim-pantondoc-master/autoload/pantondoc/formatting.vim
They do not appear if i set let g:pantondoc_disabled_modules = ['formatting']
in .vimrc. Calling :let g:pantondoc_disabled_modules = ['formatting']
later has no effect on mappings.
The malfunction of my jr
in Markdown files seems to be related to these two lines (it happens when these lines are present).
from vim-pandoc.
My autoload/pantondoc/formatting.vim
which i got from today's master
only has 86 lines.
from vim-pandoc.
Calling :let g:pantondoc_disabled_modules = ['formatting'] later has no effect on mappings.
Yes, we don't currently have the ability to unload modules without reloading the buffer.
My autoload/pantondoc/formatting.vim which i got from today's master only has 86 lines.
Sorry, I was testing this over todays master.
Ok, then. I'll make this optional. Please note I've just merged into master some changes that change all configuration variables. When implemented, this will be handled by the g:pandoc#keyboard#display_motion
variable. I still wonder what is causing this, as I mentioned above, I couldn't reproduce this issue.
from vim-pandoc.
Commenting out lines
nnoremap <buffer> j gj
nnoremap <buffer> k gk
vnoremap <buffer> j gj
vnoremap <buffer> k gk
fixes the problem.
from vim-pandoc.
That's what I meant ;)
from vim-pandoc.
I still wonder what is causing this, as I mentioned above, I couldn't reproduce this issue.
I can try to make a minimal example to reproduce it, but i see nothing strange in that some mappings interfere with others. My mappings are a bit complex.
About why i am using jr
instead of ce
. After struggling with making Vim usable in Canadian-French and Russian layouts, and reading various recommendations how to remap keys to make common operations easier to access, i gave up and remapped everything, including the <Esc>
, mapped keys to operations based on the key position in Qwerty and not on the character, and added a procedure to automatically adapt the mapping to new keyboard layouts, so that the operations stay assigned to the same keyboard keys. The result is not ready to be called a plugin and is almost undocumented, but it works for me for now.
from vim-pandoc.
!!! That's super neat (and indeed crazy), so kudos for you.
You'll grant it is a bit of a corner case, though. Under normal assumptions there should not be a conflict, because our mapping for j
should not propagate into jr
, unless you are also mapping j
as an operator and r
as a text object (which you might). Anyways, I just pushed a fix for this. Please put
let g:pandoc#keyboard#display_motions = 0
in your vimrc.
from vim-pandoc.
BTW, do the other mappings in the keyboard module work for you?
from vim-pandoc.
I haven't run into any other conflicts, i suppose because i do not have maplocalleader
set. It was just strange that i could not eliminate conflicting mappings by disabling 'keyboard' module. Thanks for fixing.
from vim-pandoc.
No problem. All keyboard mappings are now handled by the "keyboard" module, so it should be clearer where to look in case something else shows up. Thanks for reporting this issue.
from vim-pandoc.
Related Issues (20)
- Hide "[WARNING] Could not deduce format from file extension .pdc, default to markdown"
- Could not fetch resource imgs/image_name.png: replacing image with description HOT 2
- PDF or HTML file location
- Align environment inentation with & characters.
- Image location bug. HOT 2
- How to correctly enable folding? HOT 2
- Loading order in Neowim has changed, breaking vim-pandoc
- Docs: MyPandocOpen custom_open - use existing viewer instance
- Internal links (headers) HOT 2
- Broken code in reference.vim
- Feature Request: go to reference definition in references.vim work with implicit header references
- :Pandoc command does nothing in nvim HOT 5
- `gf` and `gx` not working as expected
- Neovim 0.9.0 bibliography completion only works with yaml source HOT 1
- :Pandoc fails with ValueError (--trace is not in list) HOT 1
- Vim-pandoc not found in the python interpreter ?
- Is it possible to use the pandoc folding module with markdown files ? HOT 2
- Neovim unreliable file type handling HOT 2
- pandoc#biblio#sources and data dir HOT 1
- vim-pandoc-templates parsing fails because pandoc --list-extensions missing leading space per line
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 vim-pandoc.