I have been using vim for a while now and this is the first time I have gotten this issue.
When I open vim it complains about there being CRLF endings in my vimrc file (Error: Not an editor command ^M) but when I open the file using vim I don't see the ^M anywhere. The fileformat
is set to unix
and ffs
is unix,dos
.
Here is a screenshot (sorry I just made my account so I cannot post screenshots): https://i.stack.imgur.com/3PjM8.png
When I use unix2dos on my vimrc and open vim I still have the CRLF errors but this time there are significantly fewer errors and I still don't see the ^M at the end of the lines. The fileformat
is set to dos
and ffs
is unix,dos
.
Here is a screenshot (sorry I just made my account so I cannot post screenshots): https://i.stack.imgur.com/c74RE.png
I have tried using dos2unix and unix2dos, setting the ff
and ffs
using vim, using gedit and Sublime Text 3, and even getting my old vimrc file from GitHub. I have also tried downgrading vim and reinstalling it after completely removing it from my system. I am using Vim 7.4.778 on Arch Linux (the i686 gvim package).
Currently all I have in my .vimrc is this:
"NeoBundle Scripts-----------------------------
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" Required:
call neobundle#begin(expand('~/.vim/bundle'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" Add or remove your Bundles here:
NeoBundle 'Shougo/neosnippet.vim'
NeoBundle 'Shougo/neosnippet-snippets'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'flazz/vim-colorschemes'
" You can specify revision/branch/tag.
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
" Required:
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"End NeoBundle Scripts-------------------------
Here is what od -c .vimrc
gives me:
0000000 " N e o B u n d l e S c r i p
0000020 t s - - - - - - - - - - - - - -
0000040 - - - - - - - - - - - - - - - \n
0000060 i f h a s ( ' v i m _ s t a r
0000100 t i n g ' ) \n i f & c o m
0000120 p a t i b l e \n s e t
0000140 n o c o m p a t i b l e
0000160 " B e
0000200 i M p r o v e d \n e n d i f
0000220 \n \n " R e q u i r e d : \n
0000240 s e t r u n t i m e p a t
0000260 h + = / h o m e / a d m n u n p
0000300 w n d / . v i m / b u n d l e /
0000320 n e o b u n d l e . v i m / \n e
0000340 n d i f \n \n " R e q u i r e d
0000360 : \n c a l l n e o b u n d l e
0000400 # b e g i n ( e x p a n d ( ' /
0000420 h o m e / a d m n u n p w n d /
0000440 . v i m / b u n d l e ' ) ) \n \n
0000460 " L e t N e o B u n d l e
0000500 m a n a g e N e o B u n d l e
0000520 \n " R e q u i r e d : \n N e o
0000540 B u n d l e F e t c h ' S h o
0000560 u g o / n e o b u n d l e . v i
0000600 m ' \n \n " A d d o r r e m
0000620 o v e y o u r B u n d l e s
0000640 h e r e : \n N e o B u n d l e
0000660 ' S h o u g o / n e o s n i p
0000700 p e t . v i m ' \n N e o B u n d
0000720 l e ' S h o u g o / n e o s n
0000740 i p p e t - s n i p p e t s ' \n
0000760 N e o B u n d l e ' t p o p e
0001000 / v i m - f u g i t i v e ' \n N
0001020 e o B u n d l e ' c t r l p v
0001040 i m / c t r l p . v i m ' \n N e
0001060 o B u n d l e ' f l a z z / v
0001100 i m - c o l o r s c h e m e s '
0001120 \n \n " Y o u c a n s p e c
0001140 i f y r e v i s i o n / b r a
0001160 n c h / t a g . \n N e o B u n d
0001200 l e ' S h o u g o / v i m s h
0001220 e l l ' , { ' r e v ' :
0001240 ' 3 7 8 7 e 5 ' } \n \n " R e
0001260 q u i r e d : \n c a l l n e o
0001300 b u n d l e # e n d ( ) \n \n "
0001320 R e q u i r e d : \n f i l e t y
0001340 p e p l u g i n i n d e n t
0001360 o n \n \n " I f t h e r e
0001400 a r e u n i n s t a l l e d
0001420 b u n d l e s f o u n d o n
0001440 s t a r t u p , \n " t h i s
0001460 w i l l c o n v e n i e n t
0001500 l y p r o m p t y o u t o
0001520 i n s t a l l t h e m . \n N
0001540 e o B u n d l e C h e c k \n " E
0001560 n d N e o B u n d l e S c r
0001600 i p t s - - - - - - - - - - - -
0001620 - - - - - - - - - - - - - \n \n
0001637
Here is what hexdump -C .vimrc
gives me:
00000000 22 4e 65 6f 42 75 6e 64 6c 65 20 53 63 72 69 70 |"NeoBundle Scrip|
00000010 74 73 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |ts--------------|
00000020 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a |---------------.|
00000030 69 66 20 68 61 73 28 27 76 69 6d 5f 73 74 61 72 |if has('vim_star|
00000040 74 69 6e 67 27 29 0a 20 20 69 66 20 26 63 6f 6d |ting'). if &com|
00000050 70 61 74 69 62 6c 65 0a 20 20 20 20 73 65 74 20 |patible. set |
00000060 6e 6f 63 6f 6d 70 61 74 69 62 6c 65 20 20 20 20 |nocompatible |
00000070 20 20 20 20 20 20 20 20 20 20 20 22 20 42 65 20 | " Be |
00000080 69 4d 70 72 6f 76 65 64 0a 20 20 65 6e 64 69 66 |iMproved. endif|
00000090 0a 0a 20 20 22 20 52 65 71 75 69 72 65 64 3a 0a |.. " Required:.|
000000a0 20 20 73 65 74 20 72 75 6e 74 69 6d 65 70 61 74 | set runtimepat|
000000b0 68 2b 3d 2f 68 6f 6d 65 2f 61 64 6d 6e 75 6e 70 |h+=~|
000000c0 77 6e 64 2f 2e 76 69 6d 2f 62 75 6e 64 6c 65 2f |wnd/.vim/bundle/|
000000d0 6e 65 6f 62 75 6e 64 6c 65 2e 76 69 6d 2f 0a 65 |neobundle.vim/.e|
000000e0 6e 64 69 66 0a 0a 22 20 52 65 71 75 69 72 65 64 |ndif.." Required|
000000f0 3a 0a 63 61 6c 6c 20 6e 65 6f 62 75 6e 64 6c 65 |:.call neobundle|
00000100 23 62 65 67 69 6e 28 65 78 70 61 6e 64 28 27 2f |#begin(expand('/|
00000110 68 6f 6d 65 2f 61 64 6d 6e 75 6e 70 77 6e 64 2f |~/|
00000120 2e 76 69 6d 2f 62 75 6e 64 6c 65 27 29 29 0a 0a |.vim/bundle'))..|
00000130 22 20 4c 65 74 20 4e 65 6f 42 75 6e 64 6c 65 20 |" Let NeoBundle |
00000140 6d 61 6e 61 67 65 20 4e 65 6f 42 75 6e 64 6c 65 |manage NeoBundle|
00000150 0a 22 20 52 65 71 75 69 72 65 64 3a 0a 4e 65 6f |." Required:.Neo|
00000160 42 75 6e 64 6c 65 46 65 74 63 68 20 27 53 68 6f |BundleFetch 'Sho|
00000170 75 67 6f 2f 6e 65 6f 62 75 6e 64 6c 65 2e 76 69 |ugo/neobundle.vi|
00000180 6d 27 0a 0a 22 20 41 64 64 20 6f 72 20 72 65 6d |m'.." Add or rem|
00000190 6f 76 65 20 79 6f 75 72 20 42 75 6e 64 6c 65 73 |ove your Bundles|
000001a0 20 68 65 72 65 3a 0a 4e 65 6f 42 75 6e 64 6c 65 | here:.NeoBundle|
000001b0 20 27 53 68 6f 75 67 6f 2f 6e 65 6f 73 6e 69 70 | 'Shougo/neosnip|
000001c0 70 65 74 2e 76 69 6d 27 0a 4e 65 6f 42 75 6e 64 |pet.vim'.NeoBund|
000001d0 6c 65 20 27 53 68 6f 75 67 6f 2f 6e 65 6f 73 6e |le 'Shougo/neosn|
000001e0 69 70 70 65 74 2d 73 6e 69 70 70 65 74 73 27 0a |ippet-snippets'.|
000001f0 4e 65 6f 42 75 6e 64 6c 65 20 27 74 70 6f 70 65 |NeoBundle 'tpope|
00000200 2f 76 69 6d 2d 66 75 67 69 74 69 76 65 27 0a 4e |/vim-fugitive'.N|
00000210 65 6f 42 75 6e 64 6c 65 20 27 63 74 72 6c 70 76 |eoBundle 'ctrlpv|
00000220 69 6d 2f 63 74 72 6c 70 2e 76 69 6d 27 0a 4e 65 |im/ctrlp.vim'.Ne|
00000230 6f 42 75 6e 64 6c 65 20 27 66 6c 61 7a 7a 2f 76 |oBundle 'flazz/v|
00000240 69 6d 2d 63 6f 6c 6f 72 73 63 68 65 6d 65 73 27 |im-colorschemes'|
00000250 0a 0a 22 20 59 6f 75 20 63 61 6e 20 73 70 65 63 |.." You can spec|
00000260 69 66 79 20 72 65 76 69 73 69 6f 6e 2f 62 72 61 |ify revision/bra|
00000270 6e 63 68 2f 74 61 67 2e 0a 4e 65 6f 42 75 6e 64 |nch/tag..NeoBund|
00000280 6c 65 20 27 53 68 6f 75 67 6f 2f 76 69 6d 73 68 |le 'Shougo/vimsh|
00000290 65 6c 6c 27 2c 20 7b 20 27 72 65 76 27 20 3a 20 |ell', { 'rev' : |
000002a0 27 33 37 38 37 65 35 27 20 7d 0a 0a 22 20 52 65 |'3787e5' }.." Re|
000002b0 71 75 69 72 65 64 3a 0a 63 61 6c 6c 20 6e 65 6f |quired:.call neo|
000002c0 62 75 6e 64 6c 65 23 65 6e 64 28 29 0a 0a 22 20 |bundle#end().." |
000002d0 52 65 71 75 69 72 65 64 3a 0a 66 69 6c 65 74 79 |Required:.filety|
000002e0 70 65 20 70 6c 75 67 69 6e 20 69 6e 64 65 6e 74 |pe plugin indent|
000002f0 20 6f 6e 0a 0a 22 20 49 66 20 74 68 65 72 65 20 | on.." If there |
00000300 61 72 65 20 75 6e 69 6e 73 74 61 6c 6c 65 64 20 |are uninstalled |
00000310 62 75 6e 64 6c 65 73 20 66 6f 75 6e 64 20 6f 6e |bundles found on|
00000320 20 73 74 61 72 74 75 70 2c 0a 22 20 74 68 69 73 | startup,." this|
00000330 20 77 69 6c 6c 20 63 6f 6e 76 65 6e 69 65 6e 74 | will convenient|
00000340 6c 79 20 70 72 6f 6d 70 74 20 79 6f 75 20 74 6f |ly prompt you to|
00000350 20 69 6e 73 74 61 6c 6c 20 74 68 65 6d 2e 0a 4e | install them..N|
00000360 65 6f 42 75 6e 64 6c 65 43 68 65 63 6b 0a 22 45 |eoBundleCheck."E|
00000370 6e 64 20 4e 65 6f 42 75 6e 64 6c 65 20 53 63 72 |nd NeoBundle Scr|
00000380 69 70 74 73 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |ipts------------|
00000390 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a |-------------..|
0000039f