[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Options dans Vim



Bonjour,

Autre jour, autre question...

Je n'arrive pas à obtenir la coupure automatique des lignes
dans Vim (Debian) alors que ça fonctionne sous SuSE 
(option textwidth).

Où mais dans SuSE, je n'arrive pas à obtenir un historique
des commandes (option history).

Keskikloche ?

Merci,
Yann

Voici les fichiers de config :

SuSE :
=============================
set textwidth=79
set history=50
set ruler
set showmatch
set showmode
set nocompatible
if &term =~ "xterm"
    let myterm = "xterm"
else
    let myterm =  &term
endif
let myterm = substitute(myterm, "cons[0-9][0-9].*$",  "linux", "")
let myterm = substitute(myterm, "vt1[0-9][0-9].*$",   "vt100", "")
let myterm = substitute(myterm, "vt2[0-9][0-9].*$",   "vt220", "")
let myterm = substitute(myterm, "\\([^-]*\\)[_-].*$", "\\1",   "")
if myterm == "xterm" || myterm == "kvt" || myterm == "gnome"
    map! <ESC>Oo  :
    map! <ESC>Oj  *
    map! <ESC>Om  -
    map! <ESC>Ok  +
    map! <ESC>Ol  +
    map! <ESC>OM  

    map! <ESC>Ow  7
    map! <ESC>Ox  8
    map! <ESC>Oy  9
    map! <ESC>Ot  4
    map! <ESC>Ou  5
    map! <ESC>Ov  6
    map! <ESC>Oq  1
    map! <ESC>Or  2
    map! <ESC>Os  3
    map! <ESC>Op  0
    if $LANG =~ "^de"
        map! <ESC>On  ,
    else
        map! <ESC>On  .
    endif
    map <ESC>Oo  :
    map <ESC>Oj  *
    map <ESC>Om  -
    map <ESC>Ok  +
    map <ESC>Ol  +
    map <ESC>OM  

    map <ESC>Ow  7
    map <ESC>Ox  8
    map <ESC>Oy  9
    map <ESC>Ot  4
    map <ESC>Ou  5
    map <ESC>Ov  6
    map <ESC>Oq  1
    map <ESC>Or  2
    map <ESC>Os  3
    map <ESC>Op  0
    if $LANG =~ "^de"
        map <ESC>On  ,
    else
        map <ESC>On  .
    endif
endif
if myterm == "xterm" || myterm == "kvt" || myterm == "gnome"
    map! <Esc>[H  <Home>
    map! <Esc>[F  <End>
    map! <Esc>[1~ <Home>
    map! <Esc>[4~ <End>
    map! <Esc>[A  <Up>
    map! <Esc>[B  <Down>
    map! <Esc>[C  <Right>
    map! <Esc>[D  <Left>
    map! <Esc>[E  <Insert>
    map <ESC>[5~ <PageUp>
    map <ESC>[6~ <PageDown>
    map <ESC>[H  0
    map <ESC>[F  $
    map <ESC>[1~ 0
    map <ESC>[4~ $
    map <ESC>[A  k
    map <ESC>[B  j
    map <ESC>[C  l
    map <ESC>[D  h
    map <ESC>[E  i
    map <ESC>[5~ 
    map <ESC>[6~ 
endif
if myterm == "xterm" || myterm == "kvt" || myterm == "gnome"
    map! <Esc>OH <Home>
    map! <Esc>OF <End>
    map! <Esc>OE <Insert>
    map <ESC>OH  0
    map <ESC>OF  $
    map <ESC>OE  i
endif
if myterm == "linux"
    map! <Esc>[G  <Insert>
    map <ESC>[G  i
endif
map! <Esc>[3~ <Delete>
map  <ESC>[3~    x
=============================

Debian:
=============================
set textwidth=79
set nocompatible
set backspace=2
set autoindent
set nobackup
set viminfo='20,\"50
set history=50
set ruler
set
suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
if &term =~ "xterm-debian" || &term =~ "xterm-xfree86"
  set t_Co=16
  set t_Sf=[3%dm
  set t_Sb=[4%dm
endif
set helpfile=$VIMRUNTIME/doc/help.txt.gz
if has("autocmd")
augroup cprog
  au!
  autocmd BufRead *       set formatoptions=tcql nocindent comments&
  autocmd BufRead *.c,*.h set formatoptions=croql cindent
comments=sr:/*,mb:*,el:*/,://
augroup END
augroup gzip
  au!
  autocmd BufReadPre,FileReadPre        *.gz set bin
  autocmd BufReadPre,FileReadPre        *.gz let ch_save = &ch|set ch=2
  autocmd BufReadPost,FileReadPost      *.gz '[,']!gunzip
  autocmd BufReadPost,FileReadPost      *.gz set nobin
  autocmd BufReadPost,FileReadPost      *.gz let &ch = ch_save|unlet
ch_save
  autocmd BufReadPost,FileReadPost      *.gz execute ":doautocmd
BufReadPost " .
expand("%:r")
  autocmd BufWritePost,FileWritePost    *.gz !mv <afile> <afile>:r
  autocmd BufWritePost,FileWritePost    *.gz !gzip <afile>:r
  autocmd FileAppendPre                 *.gz !gunzip <afile>
  autocmd FileAppendPre                 *.gz !mv <afile>:r <afile>
  autocmd FileAppendPost                *.gz !mv <afile> <afile>:r
  autocmd FileAppendPost                *.gz !gzip <afile>:r
augroup END
augroup bzip2
  au!
  autocmd BufReadPre,FileReadPre        *.bz2 set bin
  autocmd BufReadPre,FileReadPre        *.bz2 let ch_save = &ch|set ch=2
  autocmd BufReadPost,FileReadPost      *.bz2 |'[,']!bunzip2
  autocmd BufReadPost,FileReadPost      *.bz2 let &ch = ch_save|unlet
ch_save
  autocmd BufReadPost,FileReadPost      *.bz2 execute ":doautocmd
BufReadPost " .
expand("%:r")
  autocmd BufWritePost,FileWritePost    *.bz2 !mv <afile> <afile>:r
  autocmd BufWritePost,FileWritePost    *.bz2 !bzip2 <afile>:r
  autocmd FileAppendPre                 *.bz2 !bunzip2 <afile>
  autocmd FileAppendPre                 *.bz2 !mv <afile>:r <afile>
  autocmd FileAppendPost                *.bz2 !mv <afile> <afile>:r
  autocmd FileAppendPost                *.bz2 !bzip2 -9
--repetitive-best <afile>:r
augroup END
endif " has ("autocmd")


-- 
System administrator, http://www.ynternet.org
Non profit organization serving young social entrepreneurs
Portal & cybercenters for developing countries
Tel.: +41-21-3113047



Reply to: