vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

"e" cursor movement command is better move the cursor to right before the end $ in $xxx$? #59

Open pengyu opened 12 years ago

pengyu commented 12 years ago

In a .tex file, "e" moves cursor to the last "x" in $xxx$. In pandoc file, "e" moves to the last $ instead, I think that this should be change to be consistent with what is in .tex file.

dsanson commented 11 years ago

I am not seeing the behavior you describe. For me, "e" moves the cursor to the last "x" in $xxx$, just as you describe, and "E" moves to the "$". I don't know what controls this behavior: presumably it has to do with what characters vim takes to be part of "words" and what characters it takes to be punctuation. Digging in the vim helpfiles suggests iskeyword might be responsible, but for me, set iskeyword? indicates that my settings are the default settings whether I am in latex or pandoc.

pengyu commented 11 years ago

I searched my vim files. I think that the intruding command is from vim-javascript. After I remove this vim plugin, then I see the behavior that you saw. So I guess this should be a bug of vim-javascript? But why vim-javascript is loaded, is it loaded in vim-pandoc?

git://github.com/pangloss/vim-javascript.git

bundle-available/vim-javascript/syntax/javascript.vim
28:setlocal iskeyword+=$