Ctrl-V Ctrl-M objects

5 views
Skip to first unread message

disappearedng

unread,
Nov 23, 2009, 10:51:06 AM11/23/09
to eclim-user
Somehow when I use :JavaCorrect, after applying a solution I will get
random ^M characters splashed across the screen. I have to manually
get rid of them via :%s/^M//g. Any idea what is causing this bug?

Eric Van Dewoestine

unread,
Nov 23, 2009, 11:10:55 AM11/23/09
to eclim...@googlegroups.com
Are the ^Ms random or are they at the end of every line, or perhaps
just on the newly changed lines? Having any ^Ms inserted probably
indicates that eclipse thinks the file is using Windows line endings,
but your vim instance is set to work with unix line endings. What is
the result of running the following in vim before and after using
:JavaCorrect to reproduce the issue?

:echo &ff

--
eric

disappearedng

unread,
Nov 24, 2009, 1:36:37 AM11/24/09
to eclim-user
Dear Eric,
Somehow it says "dos" (Both before and after).

How do I go about changing that?

Eric Van Dewoestine

unread,
Nov 24, 2009, 10:51:47 AM11/24/09
to eclim...@googlegroups.com
You may not necessarily want to change the file format. Are you
working from a version control system (cvs, subversion, git, etc.)
with other people? If so, then changing the file format from dos to
unix would result in every line of the file being edited (all the line
endings) and if another user ends up changing it back to dos then
every line is edited again. Those kind of full file edits could cause
some issues with the version control (i.e. annotate/blame could become
useless).

What I find odd is that the file format after the correction is still
dos, but at that point you start to see the ^Ms. What Os are you
running on? Could you perhaps send me a simple file which exhibits
this issue?

Also, could you try starting vim (or gvim if that's what you are
using) like so and run the correction again to see if the problem
still occurs:

$ vim -u NONE -U NONE --cmd "set nocp | sy on | filetype plugin on | ru plugin/eclim.vim"
or
$ gvim -u NONE -U NONE --cmd "set nocp | sy on | filetype plugin on | ru plugin/eclim.vim"

--
eric
Reply all
Reply to author
Forward
0 new messages