Loading ...
Sorry, an error occurred while loading the content.
 

vim cannot open a specific file and spits out garbage

Expand Messages
  • Federico Calboli
    Hi All, I am using vim on mac OS 10.8.5, vim --version returns: VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02) Compiled by root@apple.com
    Message 1 of 3 , Oct 14, 2013
      Hi All,

      I am using vim on mac OS 10.8.5, vim --version returns:

      VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02)
      Compiled by root@...
      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

      I am trying to use vim to edit a file (~/.Rprofile).

      The content of ~/.Rprofile is:

      Sys.setenv(PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin")

      (the file is also attached).

      If I type vim .Rprofile I get the following garbage:

      ".Rprofile" 1L, 107CTraceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 548, in <module>
      main()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 530, in main
      known_paths = addusersitepackages(known_paths)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages
      user_site = getusersitepackages()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages
      user_base = getuserbase() # this will also set USER_BASE
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 231, in getuserbase
      USER_BASE = get_config_var('userbase')
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 516, in get_config_var
      return get_config_vars().get(name)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 449, in get_config_vars
      import re
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 105, in <module>
      import sre_compile
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 14, in <module>
      import sre_parse
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py", line 17, in <module>
      from sre_constants import *
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_constants.py", line 18, in <module>
      from _sre import MAXREPEAT
      ImportError: cannot import name MAXREPEAT

      I am stumped to what might go on. I attach Rprofile, my vimrc, the Rprofile.swp generated (which looks odd and shows different things depending on what editor I use to open it). this behaviour seems to happen just with this file, but is 100% replicable.

      in case it helps this is my $PATH

      echo $PATH
      /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/julia:/usr/local/MacGPG2/bin:/usr/texbin

      Best wishes,

      F


      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Federico Calboli
      Incidentally, I had to upload a zip file because google complained that Rprofile (despite being a simple ASCII text file, with one lie, with the text I copied
      Message 2 of 3 , Oct 15, 2013
        Incidentally, I had to upload a zip file because google complained that Rprofile (despite being a simple ASCII text file, with one lie, with the text I copied in my original message) had some magical properties that made it scared. If I cat the file I have no problems though.

        BW

        F


        On Monday, 14 October 2013 11:46:35 UTC+1, Federico Calboli wrote:
        > Hi All,
        >
        > I am using vim on mac OS 10.8.5, vim --version returns:
        >
        > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02)
        > Compiled by root@...
        > 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
        >
        > I am trying to use vim to edit a file (~/.Rprofile).
        >
        > The content of ~/.Rprofile is:
        >
        > Sys.setenv(PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin")
        >
        > (the file is also attached).
        >
        > If I type vim .Rprofile I get the following garbage:
        >
        > ".Rprofile" 1L, 107CTraceback (most recent call last):
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 548, in <module>
        > main()
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 530, in main
        > known_paths = addusersitepackages(known_paths)
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages
        > user_site = getusersitepackages()
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages
        > user_base = getuserbase() # this will also set USER_BASE
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 231, in getuserbase
        > USER_BASE = get_config_var('userbase')
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 516, in get_config_var
        > return get_config_vars().get(name)
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 449, in get_config_vars
        > import re
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 105, in <module>
        > import sre_compile
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 14, in <module>
        > import sre_parse
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py", line 17, in <module>
        > from sre_constants import *
        > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_constants.py", line 18, in <module>
        > from _sre import MAXREPEAT
        > ImportError: cannot import name MAXREPEAT
        >
        > I am stumped to what might go on. I attach Rprofile, my vimrc, the Rprofile.swp generated (which looks odd and shows different things depending on what editor I use to open it). this behaviour seems to happen just with this file, but is 100% replicable.
        >
        > in case it helps this is my $PATH
        >
        > echo $PATH
        > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/julia:/usr/local/MacGPG2/bin:/usr/texbin
        >
        > Best wishes,
        >
        > F

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Ben Fritz
        ... This garbage is a an error in the python code in one of your plugins. Try disabling them one by one (or if you have a lot, half at a time) to find the
        Message 3 of 3 , Oct 15, 2013
          On Monday, October 14, 2013 5:46:35 AM UTC-5, Federico Calboli wrote:
          > Hi All,
          >
          > I am using vim on mac OS 10.8.5, vim --version returns:
          >
          > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02)
          > Compiled by root@...
          > 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
          >
          > I am trying to use vim to edit a file (~/.Rprofile).
          >
          > The content of ~/.Rprofile is:
          >
          > Sys.setenv(PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin")
          >
          > (the file is also attached).
          >
          > If I type vim .Rprofile I get the following garbage:
          >
          > ".Rprofile" 1L, 107CTraceback (most recent call last):
          > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 548, in <module>
          > main()
          > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 530, in main
          > known_paths = addusersitepackages(known_paths)
          > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages
          > user_site = getusersitepackages()
          > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages
          > user_base = getuserbase()

          This "garbage" is a an error in the python code in one of your plugins.

          Try disabling them one by one (or if you have a lot, half at a time) to find the culprit. Then contact the plugin maintainer.

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.