jshint.vim icon indicating copy to clipboard operation
jshint.vim copied to clipboard

Random jk characters at the end of line

Open gsavovski opened this issue 11 years ago • 10 comments

Vim 7.3 on Ubuntu 12.10

When escaping from insert mode and quickly press next command usually j or k, they are left at the end of the line. The character usually replaces the last character of the line like quote with the character pressed. Sometimes it just quickly flashes and sometimes it stays.

Example:

var App = { Models: {}, Collections: {}, Views: {j <---- ESC insert mode end quickly press j }

gsavovski avatar Dec 14 '13 22:12 gsavovski

I got the same sort of things, commands appears were the cursor is. By disabling jshint.vim I don't get the issue.

krampstudio avatar Jan 31 '14 08:01 krampstudio

The problem for me was the this event jshint.vim#L28 which seems to interfere with other plugins. For me, the "solution" was to only to run JSHint on save and read.

vstene avatar Feb 26 '14 11:02 vstene

There has got to be a way to fix this issue without changing autodetect off. Can you exit insert mode before running jshint so that it does not wait for jshint before exiting insert mode

collinalexbell avatar Mar 14 '14 15:03 collinalexbell

Also experiencing this. I tend to pathologically save (':w') after making changes, and I'm getting 'w' inserted all over the place.

arowla avatar Mar 21 '14 21:03 arowla

:+1:

Getting the stray w from pathologically :w-ing

devgeeks avatar Nov 21 '14 03:11 devgeeks

I used to press CTRL-L to refresh the screen.

BTW, I cannot find this repository thru searching in github with the keyword, 'jshint.vim'. Why does it happen?

jaeseok-park avatar Dec 09 '14 06:12 jaeseok-park

For me it was the cursorhold/move event hooks that was causing the problems. commenting out: jshint.vim#L39-L44 fixed it for me.

jimmec avatar Apr 29 '15 17:04 jimmec

@jimmec's suggestion seems to work. It also seems to fix another issue I have where jshint gets run on buffers that I open, regardless of setting let g:JSHintUpdateWriteOnly=1. Is this repo maintained anymore? I would hate to have to comment out that line every time download the plugin on a new machine.

naddeoa avatar Jun 10 '15 16:06 naddeoa

This issue is occurring for me as well, even after @jimmec's suggestion. It's happening less, but still happening

mcquackers avatar Oct 05 '15 13:10 mcquackers

My solution involved only invoking JSHint on save, which is the behavior I want anyway.

To do that I added this line to my .vimrc:

" Only invoke vim-jshint on save
let g:JSHintUpdateWriteOnly = 1

And I removed these lines from jshint.vim/ftplugin/javascript/jshint.vim

noremap <buffer><silent> dd dd:JSHintUpdate<CR>
noremap <buffer><silent> dw dw:JSHintUpdate<CR>
noremap <buffer><silent> u u:JSHintUpdate<CR>
noremap <buffer><silent> <C-R> <C-R>:JSHintUpdate<CR>

NSkelsey avatar Mar 24 '16 19:03 NSkelsey