Skip to content

Instantly share code, notes, and snippets.

@pav67
Last active December 19, 2023 14:05
Show Gist options
  • Save pav67/6620530 to your computer and use it in GitHub Desktop.
Save pav67/6620530 to your computer and use it in GitHub Desktop.
vimrc
set history=700
set ruler
set magic
set lazyredraw
" Search stuff
set incsearch
set hlsearch
set ignorecase
set smartcase
" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500
syntax enable
set nobackup
set nowb
set noswapfile
"Auto indent
set ai
"Smart indent
set si
"Wrap lines
set wrap
" Treat long lines as break lines (useful when moving around in them)
map j gj
map k gk
" Return to last edit position when opening files (You want this!)
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" Always show the status line
set laststatus=2
" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
" Returns true if paste mode is enabled
function! HasPaste()
if &paste
return 'PASTE MODE '
en
return ''
endfunction
set nu
" Spécifiques Windows (?)
set backspace =indent,eol,start "Make backspace work as you would expect
set hidden " Switch between buffers without having to save first
set wrapscan " search wrap around end-of-file
set report =0 " Always report changed lines
set clipboard=unnamed " Permet de copier/coller depuis Windows. Pour Copier depuis un autre programme et coller dans Vim, faire Ctrl+C puis dans Vim faire p à l'endroit voulu.
" Pour copier de Vim vers une autre app, sélectionner dans Vim puis tapper y. Ensuite Ctrl+v là où on veut
packadd! matchit " naviguer jusqu'au prochain } ou balise html en appuyant sur %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment