Vim-config

From wikipost
Jump to navigation Jump to search


useful entries in ~/.vimrc


" --- disable syntax highlighting

syntax off

 

" --- open file at last edit position

 autocmd BufReadPost *
      \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
      \ |   exe "normal! g`\""
      \ | endif
 

" --- disable bell and screen flickering on escape ---
set visualbell
set t_vb=


" -- allow mouse copy and paste --
set mouse=r

 

" --- set tabstops to 4 spaces and set shiftwidth (ident amount) as 4 spaces to match tabstops ---
set ts=4 sw=4

" --- redefine tab as spaces ---
set expandtab