[RESOLU]Vim: ^M

Vim: ^M [RESOLU] - Logiciels - Linux et OS Alternatifs

Marsh Posté le 28-11-2005 à 15:21:50    

Salut, voila un ptit probleme que je rencontre actuellement avec Vim:
 
je cree un fichier
j'enregistre
et j'affiche:

Code :
  1. [asmodaiii@pink-chan] [15:18:11] ~ $ cat -e test
  2. ceci^M$
  3. est^M$
  4. un^M$
  5. test^M$
  6. ^M$


Lorsque je fais la meme chose sous nano ou emacs il n'y a pas de '^M' qui apparaissent a chaque fin de ligne, ma question est donc: Comment degager ces '^M'.
Merci!!
svp evitez de repondre: vim puxor, eMAcs rulez pwned!!


Message édité par asmodaiii le 29-11-2005 à 00:15:48

---------------
v(^o^)v
Reply

Marsh Posté le 28-11-2005 à 15:21:50   

Reply

Marsh Posté le 28-11-2005 à 15:28:59    

il doit te manquer un  
 
set fileformat=unix
 
quelque part...

Reply

Marsh Posté le 28-11-2005 à 15:53:46    

Merci beaucoup, en fait c'est une autre option de mon .vimrc qui posait probleme (set ffs, j'ai du changer l'ordre)
Pour ceux que ca interesse, voila mon ~/.vimrc:

Code :
  1. set nobackup "
  2. "set nocompatible "
  3. filetype on "
  4. set history=1000 "
  5. set cf "
  6. set clipboard+=unnamed " turns out I do like is sharing windows clipboard
  7. set ffs=unix,dos,mac " support all three, in this order
  8. filetype plugin on " load filetype plugins
  9. set viminfo+=! " make sure it can save viminfo
  10. set isk+=_,$,@,%,#,- " none of these should be word dividers, so make them not be
  11. set background=dark " we are using a dark backgroundsyntax
  12. syntax on " syntax highlighting on
  13. colorscheme default " my theme
  14. set lsp=0 " space it out a little more (easier to read)
  15. set wildmenu " turn on wild menu
  16. set ruler " Always show current positions along the bottom
  17. set cmdheight=1 " the command bar is 2 high
  18. set number " turn on line numbers
  19. set lz " do not redraw while running macros (much faster) (LazyRedraw)
  20. set hid " you can change buffer without saving
  21. set backspace=2 " make backspace work normal
  22. set whichwrap+=<,>,h,l  " backspace and cursor keys wrap to
  23. set mouse=a " use mouse everywhere
  24. set shortmess=atI " shortens messages to avoid 'press a key' prompt
  25. set report=0 " tell us when anything is changed via :...
  26. set noerrorbells " don't make noise
  27. " make the splitters between windows be blank
  28. set showmatch " show matching brackets
  29. set mat=5 " how many tenths of a second to blink matching brackets for
  30. set nohlsearch " do not highlight searched for phrases
  31. set incsearch " BUT do highlight as you type you search phrase
  32. set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$ " what to show when I hit :set list
  33. set so=10 " Keep 10 lines (top/bottom) for scope
  34. set novisualbell " don't blink
  35. set noerrorbells " no noises
  36. set fo=tcrqn " See Help (complex)
  37. set ai " autoindent
  38. set si " smartindent
  39. set cindent " do c-style indenting
  40. set tabstop=2 " tab spacing (settings below are just to unify it)
  41. set softtabstop=2 " unify
  42. set shiftwidth=2 " unify
  43. set noexpandtab " real tabs please!
  44. set nowrap " do not wrap lines 
  45. set smarttab " use tabs at the start of a line, spaces elsewhere
  46. set foldenable " Turn on folding
  47. set foldmethod=indent " Make folding indent sensitive
  48. set foldlevel=100 " Don't autofold anything (but I can still fold manually)
  49. set foldopen-=search " don't open folds when you search into them
  50. set foldopen-=undo " don't open folds when you undo stuff
  51. let perl_extended_vars=1 " highlight advanced perl vars inside strings

ca peut toujours servir...


Message édité par asmodaiii le 28-11-2005 à 15:55:10

---------------
v(^o^)v
Reply

Marsh Posté le 28-11-2005 à 15:57:00    

ptain, balèze le vimrc ! :D

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed