User Tools

Site Tools


vimrc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vimrc [2025/07/26 17:09] – - Imported by DokuWiki Advanced Plugin wikiadmvimrc [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-Fonte: 
-[[https://www.debreuil.fr/blog/vim-outil-indispensable]] 
  
-<code bash .vimrc> 
-# vim ~/.vimrc 
-set nocompatible 
-syntax on 
-au! BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent 
-autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab indentkeys-=0# indentkeys-=<:> foldmethod=indent nofoldenable 
-colors torte 
-hi TrailingSpace ctermbg=1 
-noremap <f11> :bprev!<CR> 
-noremap <f12> :bnext!<CR> 
-filetype plugin on 
-filetype indent on 
-set encoding=utf8 
-"set mouse=a 
-set autoindent 
-set smartindent 
-set smarttab 
-set softtabstop=2 
-set tabstop=2 
-set expandtab 
-set showmatch                                     " vérification présence ([ ou { à la frappe de )] ou } 
-set shiftwidth=2                                  " nombre de tabulation pour l'indentation 
-set showcmd                                       " affiche la commande en cours 
-set backspace=indent,eol,start                    " autorisation du retour arrière 
-set backspace=2 " make backspace work like most other apps 
-set cindent 
-set ignorecase                                    " ne pas prendre en compte la casse pour les recherches 
-set nolist                                        " on n'affiche pas les caractères non imprimables 
-set nowrap       "Don't wrap lines 
-set linebreak    "Wrap lines at convenient points 
-set foldmethod=indent   "fold based on indent 
-set foldnestmax=3       "deepest fold is 3 levels 
-set nofoldenable        "dont fold by default 
-set scrolloff=8         "Start scrolling when we're 8 lines away from margins 
-set sidescrolloff=15 
-set sidescroll=1 
-set number                      "Line numbers are good 
-set history=1000                "Store lots of :cmdline history 
-set showcmd                     "Show incomplete cmds down the bottom 
-set showmode                    "Show current mode down the bottom 
-set gcr=a:blinkon0              "Disable cursor blink 
-set novisualbell "pas d'alerte 
-set autoread                    "Reload files changed outside vim 
-set hidden 
-set noswapfile 
-set nobackup 
-"set cursorline cursorcolumn 
-"set laststatus=2 
- 
-"set statusline=%t%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [FENC=%{&fileencoding}]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v]\ [%p%%]\ [LEN=%L]\ 
- 
-set hlsearch 
-set incsearch 
-set background=dark 
-set fileformats=unix,mac,dos                      " gestion des retours chariot en fonction du type de fichier 
-set listchars=eol:¶,tab:..,trail:               " paramétrage des caractères non imprimables 
-set viminfo='10,\"100,:20,%,n~/.viminfo 
-set pastetoggle=<F6> " use F6 to toggle paste mode 
- 
-"au WinLeave * set nocursorline nocursorcolumn " Set horizontal and Vertical Line 
-"au WinEnter * set cursorline cursorcolumn " Set horizontal and Vertical Line 
- 
-nnoremap <silent> <C-N> :noh<CR>                  "Mapping pour désactiver le surlignage des résultats d'une recherche 
-nnoremap p p=`]<C-o> " Auto indent pasted text 
-nnoremap P P=`]<C-o> " Auto indent pasted text 
- 
-"silent !mkdir ~/.vim/backups > /dev/null 2>&1 
-"if has('persistent_undo') 
-   silent !mkdir ~/.vim/backups > /dev/null 2>&1 
-   set undodir=~/.vim/backups 
-   set undofile 
-"endif 
- 
-" Última possição do cursor 
-autocmd BufReadPost * 
-\ if line("'\"") > 0 && line ("'\"") <= line("$") | 
-\   exe "normal! g'\"" | 
-\ endif 
-</code> 
vimrc.1753560545.txt.gz · Last modified: by wikiadm