{"action":"created","issue":{"url":"https://api.github.com/repos/square/maximum-awesome/issues/220","repository_url":"https://api.github.com/repos/square/maximum-awesome","labels_url":"https://api.github.com/repos/square/maximum-awesome/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/square/maximum-awesome/issues/220/comments","events_url":"https://api.github.com/repos/square/maximum-awesome/issues/220/events","html_url":"https://github.com/square/maximum-awesome/issues/220","id":145806005,"number":220,"title":"Vim Javascript File Refresh Rendering Issue","user":{"login":"Sonblind","id":2101499,"avatar_url":"https://avatars.githubusercontent.com/u/2101499?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonblind","html_url":"https://github.com/Sonblind","followers_url":"https://api.github.com/users/Sonblind/followers","following_url":"https://api.github.com/users/Sonblind/following{/other_user}","gists_url":"https://api.github.com/users/Sonblind/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonblind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonblind/subscriptions","organizations_url":"https://api.github.com/users/Sonblind/orgs","repos_url":"https://api.github.com/users/Sonblind/repos","events_url":"https://api.github.com/users/Sonblind/events{/privacy}","received_events_url":"https://api.github.com/users/Sonblind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-04T21:10:06Z","updated_at":"2016-04-11T18:52:44Z","closed_at":null,"body":"Problem\r\n===\r\nAfter toggling between insert and command mode in Vim (via iTerm, not MacVim. MacVim does not have this problem) for any `*.js` file, I get weird refreshing errors. The keys that I hit in command mode are drawn to the screen. This is only a `*.js` file problem. See image below:\r\n\r\n<img width=\"595\" alt=\"vim_refresh_error_for_js_files\" src=\"https://cloud.githubusercontent.com/assets/2101499/14263109/d84367dc-fa86-11e5-8d35-5f69613a2800.png\">\r\n\r\nThose characters are not actually inserted into the file, but only rendered that way. After pushing vim to the background using `ctrl+z`, then bringing it back to the foreground using `fg` on the terminal, vim refreshes the page and those letters are gone. \r\n\r\nIs there something in my config that is causing the rendering issue, or is this caused by a config in MaximumAwesome?\r\n\r\n## Vimrc\r\n```\r\n\" don't bother with vi compatibility\r\nset nocompatible\r\n\r\n\" enable syntax highlighting\r\nsyntax enable\r\n\r\n\" configure Vundle\r\nfiletype on \" without this vim emits a zero exit status, later, because of :ft off\r\nfiletype off\r\nset rtp+=~/.vim/bundle/Vundle.vim\r\ncall vundle#begin()\r\n\r\n\" install Vundle bundles\r\nif filereadable(expand(\"~/.vimrc.bundles\"))\r\n  source ~/.vimrc.bundles\r\n  source ~/.vimrc.bundles.local\r\nendif\r\n\r\ncall vundle#end()\r\n\r\n\" ensure ftdetect et al work by including this after the Vundle stuff\r\nfiletype plugin indent on\r\n\r\nset autoindent\r\nset autoread                                                 \" reload files when changed on disk, i.e. via `git checkout`\r\nset backspace=2                                              \" Fix broken backspace in some setups\r\nset backupcopy=yes                                           \" see :help crontab\r\nset clipboard=unnamed                                        \" yank and paste with the system clipboard\r\nset directory-=.                                             \" don't store swapfiles in the current directory\r\nset encoding=utf-8\r\nset expandtab                                                \" expand tabs to spaces\r\nset ignorecase                                               \" case-insensitive search\r\nset incsearch                                                \" search as you type\r\nset laststatus=2                                             \" always show statusline\r\nset list                                                     \" show trailing whitespace\r\nset listchars=tab:▸\\ ,trail:▫\r\nset number                                                   \" show line numbers\r\nset ruler                                                    \" show where you are\r\nset scrolloff=3                                              \" show context above/below cursorline\r\nset shiftwidth=2                                             \" normal mode indentation commands use 2 spaces\r\nset showcmd\r\nset smartcase                                                \" case-sensitive search if any caps\r\nset softtabstop=2                                            \" insert mode tab and backspace use 2 spaces\r\nset tabstop=8                                                \" actual tabs occupy 8 characters\r\nset wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc\r\nset wildmenu                                                 \" show a navigable menu for tab completion\r\nset wildmode=longest,list,full\r\n\r\n\" Enable basic mouse behavior such as resizing buffers.\r\nset mouse=a\r\nif exists('$TMUX')  \" Support resizing in tmux\r\n  set ttymouse=xterm2\r\nendif\r\n\r\n\" keyboard shortcuts\r\nlet mapleader = ','\r\nnoremap <C-h> <C-w>h\r\nnoremap <C-j> <C-w>j\r\nnoremap <C-k> <C-w>k\r\nnoremap <C-l> <C-w>l\r\nnoremap <leader>l :Align\r\nnnoremap <leader>a :Ag<space>\r\nnnoremap <leader>b :CtrlPBuffer<CR>\r\nnnoremap <leader>d :NERDTreeToggle<CR>\r\nnnoremap <leader>f :NERDTreeFind<CR>\r\nnnoremap <leader>t :CtrlP<CR>\r\nnnoremap <leader>T :CtrlPClearCache<CR>:CtrlP<CR>\r\nnnoremap <leader>] :TagbarToggle<CR>\r\nnnoremap <leader><space> :call whitespace#strip_trailing()<CR>\r\nnnoremap <leader>g :GitGutterToggle<CR>\r\nnoremap <silent> <leader>V :source ~/.vimrc<CR>:filetype detect<CR>:exe \":echo 'vimrc reloaded'\"<CR>\r\n\r\n\" in case you forgot to sudo\r\ncnoremap w!! %!sudo tee > /dev/null %\r\n\r\n\" plugin settings\r\nlet g:ctrlp_match_window = 'order:ttb,max:20'\r\nlet g:NERDSpaceDelims=1\r\nlet g:gitgutter_enabled = 0\r\n\r\n\" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher\r\nif executable('ag')\r\n  \" Use Ag over Grep\r\n  set grepprg=ag\\ --nogroup\\ --nocolor\r\n\r\n  \" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore\r\n  let g:ctrlp_user_command = 'ag %s -l --nocolor -g \"\"'\r\nendif\r\n\r\n\" fdoc is yaml\r\nautocmd BufRead,BufNewFile *.fdoc set filetype=yaml\r\n\" md is markdown\r\nautocmd BufRead,BufNewFile *.md set filetype=markdown\r\nautocmd BufRead,BufNewFile *.md set spell\r\n\" extra rails.vim help\r\nautocmd User Rails silent! Rnavcommand decorator      app/decorators            -glob=**/* -suffix=_decorator.rb\r\nautocmd User Rails silent! Rnavcommand observer       app/observers             -glob=**/* -suffix=_observer.rb\r\nautocmd User Rails silent! Rnavcommand feature        features                  -glob=**/* -suffix=.feature\r\nautocmd User Rails silent! Rnavcommand job            app/jobs                  -glob=**/* -suffix=_job.rb\r\nautocmd User Rails silent! Rnavcommand mediator       app/mediators             -glob=**/* -suffix=_mediator.rb\r\nautocmd User Rails silent! Rnavcommand stepdefinition features/step_definitions -glob=**/* -suffix=_steps.rb\r\n\" automatically rebalance windows on vim resize\r\nautocmd VimResized * :wincmd =\r\n\r\n\" Fix Cursor in TMUX\r\nif exists('$TMUX')\r\n  let &t_SI = \"\\<Esc>Ptmux;\\<Esc>\\<Esc>]50;CursorShape=1\\x7\\<Esc>\\\\\"\r\n  let &t_EI = \"\\<Esc>Ptmux;\\<Esc>\\<Esc>]50;CursorShape=0\\x7\\<Esc>\\\\\"\r\nelse\r\n  let &t_SI = \"\\<Esc>]50;CursorShape=1\\x7\"\r\n  let &t_EI = \"\\<Esc>]50;CursorShape=0\\x7\"\r\nendif\r\n\r\n\" Don't copy the contents of an overwritten selection.\r\nvnoremap p \"_dP\r\n\r\n\" Go crazy!\r\nif filereadable(expand(\"~/.vimrc.local\"))\r\n  \" In your .vimrc.local, you might like:\r\n  \"\r\n  \" set autowrite\r\n  \" set nocursorline\r\n  \" set nowritebackup\r\n  \" set whichwrap+=<,>,h,l,[,] \" Wrap arrow keys between lines\r\n  \"\r\n  \" autocmd! bufwritepost .vimrc source ~/.vimrc\r\n  \" noremap! jj <ESC>\r\n  source ~/.vimrc.local\r\nendif\r\n```\r\n\r\n## Vimrc.local\r\n```\r\nset autowrite\r\n\r\n\" gui settings\r\nif (&t_Co == 256 || has('gui_running'))\r\n  if ($TERM_PROGRAM == 'iTerm.app')\r\n    colorscheme lucius\r\n  else\r\n    colorscheme desert\r\n    colorscheme lucius\r\n\r\n    \" Turn off annoying bell sound\r\n    set noerrorbells\r\n    set novisualbell\r\n    autocmd! GUIEnter * set vb t_vb=\r\n  endif\r\nendif\r\n\r\n\" show line numbers\r\nset number\r\nset numberwidth=3\r\n\r\n\" Syntastic\r\nlet g:syntastic_cpp_compiler = 'clang++'\r\nlet g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++'\r\nlet g:syntastic_enable_elixir_checker=1\r\n\r\n\" Mustache Handlebars convenient abreviations\r\nlet g:mustache_abbreviations = 1\r\n\r\n\" Get C++ syntax from Clang\r\nlet g:clang_library_path = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/'\r\n\r\n\" Make it obvious where 80 characters is\r\nset textwidth=80\r\nset colorcolumn=+1\r\nhighlight OverLength ctermbg=red ctermfg=white guibg=#592929\r\nmatch OverLength /\\%81v.\\+/\r\n\r\n\" vim-rspec mappings\r\nnnoremap <Leader>t :call RunCurrentSpecFile()<CR>\r\nnnoremap <Leader>s :call RunNearestSpec()<CR>\r\nnnoremap <Leader>l :call RunLastSpec()<CR>\r\n\r\n\" Key mappings\r\nmap               <F8> :BufExplorer<cr>\r\nmap               \\  :NERDTreeToggle<CR>\r\nmap               \\| :NERDTreeFind<CR>\r\nnmap              <silent> <F6> :TagbarToggle<CR>\r\nnnoremap          ; :\r\n\r\n\" Quicker window movement\r\nnnoremap <C-j> <C-w>j\r\nnnoremap <C-k> <C-w>k\r\nnnoremap <C-h> <C-w>h\r\nnnoremap <C-l> <C-w>l\r\n\r\n\" vim-jsx config: allow jsx in .js files\r\nlet g:jsx_ext_required = 0\r\n\"\r\n\" The Silver Searcher\r\nif executable('ag')\r\n  \" Use ag over grep\r\n  set grepprg=ag\\ --nogroup\\ --nocolor\r\n\r\n  \" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore\r\n  let g:ctrlp_user_command = 'ag %s -l --nocolor -g \"\"'\r\n\r\n  \" ag is fast enough that CtrlP doesn't need to cache\r\n  let g:ctrlp_use_caching = 0\r\nendif\r\n\r\naugroup general\r\n  autocmd!\r\n  au BufLeave,FocusLost * silent! wall \" Save if focus lost\r\n  au BufWritePre * silent! :EraseBadWhitespace\r\n  au BufwinEnter bash* set nocursorline\r\n\r\n  \"Enable spellchecking for Markdown\r\n  autocmd FileType markdown setlocal spell\r\n\r\n  \"Wrap at 80 characters\r\n  autocmd BufRead, BufNewFile *.md setlocal textwidth=80\r\n\r\n  \" Automatically wrap at 72 characters and spell check git commit messages\r\n  autocmd FileType gitcommit setlocal textwidth=72\r\n  autocmd FileType gitcommit setlocal spell\r\n\r\n  \"Allow autocomplete for hyphenated words\r\n  autocmd FileType css,scss,sass setlocal iskeyword+=-\r\n\r\n  \" Restore cursor position\r\n  au BufReadPost *   if line(\"'\\\"\") > 1 && line(\"'\\\"\") <= line(\"$\") |\r\n        \\ exe \"normal! g`\\\"\" |\r\n        \\ endif\r\naugroup END\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/square/maximum-awesome/issues/comments/208497386","html_url":"https://github.com/square/maximum-awesome/issues/220#issuecomment-208497386","issue_url":"https://api.github.com/repos/square/maximum-awesome/issues/220","id":208497386,"user":{"login":"Sonblind","id":2101499,"avatar_url":"https://avatars.githubusercontent.com/u/2101499?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonblind","html_url":"https://github.com/Sonblind","followers_url":"https://api.github.com/users/Sonblind/followers","following_url":"https://api.github.com/users/Sonblind/following{/other_user}","gists_url":"https://api.github.com/users/Sonblind/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonblind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonblind/subscriptions","organizations_url":"https://api.github.com/users/Sonblind/orgs","repos_url":"https://api.github.com/users/Sonblind/repos","events_url":"https://api.github.com/users/Sonblind/events{/privacy}","received_events_url":"https://api.github.com/users/Sonblind/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T18:52:44Z","updated_at":"2016-04-11T18:52:44Z","body":"I just discovered that this problem goes away when I remove the jshint plugin for Vim. I am stumped on this one. Any ideas?"}}