Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

garbled output if run within Vim #64

Closed
mcollina opened this issue Mar 13, 2015 · 14 comments
Closed

garbled output if run within Vim #64

mcollina opened this issue Mar 13, 2015 · 14 comments

Comments

@mcollina
Copy link

Running within vim completely destroy the Vim window. You can run it by issuing (:! standard) in vim.
schermata 2015-03-13 alle 21 28 30

@Flet
Copy link
Member

Flet commented Mar 13, 2015

Not sure on this, but have you tried using the syntastic plugin for vim? It includes a standard syntax checker.

@feross
Copy link
Member

feross commented Mar 13, 2015

Can you paste the code that was originally in the buffer before it got mangled?

@mcollina
Copy link
Author

Here is another one (I definitely lost the previous one)

schermata 2015-03-13 alle 22 14 22

This is the file content:

function callMe() {
  console.log('this is wrong')
}

callMe()

This is standard output:


Error: Use JavaScript Standard Style (https://github.com/feross/standard)
  err.js:1:0: Multiple blank lines not allowed.
  err.js:2:15: Missing space before function parentheses.

@feross
Copy link
Member

feross commented Mar 13, 2015

Which version of standard? standard --version

@feross
Copy link
Member

feross commented Mar 13, 2015

Seems to work for me. I can't reproduce this. Can you try disabling all your vim plugins in case one of them is interfering?

@mcollina
Copy link
Author

 λ standard --version
2.11.0

Exactly the same behavior without vim plugins, with either the stock VIM or the one from Homebrew.

This is the VIM from homebrew:

 λ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct  1 2014 17:33:12)
MacOS X (unix) version
Included patches: 1-430
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       -python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -DMACOS_X_UNIX  -Os -w -pipe -march=native -mmacosx-version-min=10.9 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang   -L. -L/usr/local/lib -L/usr/local/lib -Wl,-headerpad_max_install_names -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -o vim        -lm  -lncurses -liconv -framework Cocoa   -fstack-protector -L/usr/local/lib  -L/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE -lperl    -lruby.2.0.0 -lobjc

And this the stock vim:

 λ /usr/bin/vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Nov  6 2014 14:32:04)
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype
+path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn
-python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
 -xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe
Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses

@mcollina
Copy link
Author

Can you please try running standard on node v0.10.36? In iojs and v0.12 the problem is not there.

@feross
Copy link
Member

feross commented Mar 13, 2015

Just tried with node 0.10.36 and still couldn't reproduce it.

Can you see if using standard@3.0.0-beta3 solves the problem for you?

@mcollina
Copy link
Author

Exact same behavior, it all works fine with node v0.12 and iojs and fails in v0.10. This gets more and more weird.

Any idea what it can be? I would love to try stuff, but I have no idea.

@feross
Copy link
Member

feross commented Mar 13, 2015

I think we may have dropped 0.10 support here: #36

@feross
Copy link
Member

feross commented Mar 13, 2015

We're planning to get rid of the npm run approach of discovering the path to eslint for performance reasons (#43) and maybe this will give us 0.10 support back too.

@feross
Copy link
Member

feross commented Mar 19, 2015

Hey @mcollina, can you try again with v3.2.0? I removed automatic detection of stdin, which is error-prone and may have been confusing vim.

@mcollina
Copy link
Author

Solved, thank you! ;).

@feross
Copy link
Member

feross commented Mar 19, 2015

Wohoo!

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants