You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/.vimrc

29 lines
902 B
VimL

" Vim settings
set tabstop =4 " The amount of spaces per tab
set shiftwidth =4 " The amount of spaces when shifting >> <<
syntax on " Syntax highlighting
set number " Line numbers
set relativenumber " Relative lines numbers (also)
set cursorline " Shows a line on the cursor's line
" Stop automatic comments on carriage
"set formatoptions-=cro
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" Search settings
set incsearch " Search as characters are entered
set hlsearch " Highlight all matches
" Changes colorcolumn per line that hits 81 characters
call matchadd('ColorColumn', '\%81v', 100)
" Fuzzy finder
set path+=** " Search down subdirectories
set wildmenu " Display all the matching files when tab completing
" File Management
set hidden " Allow switching between buffers without saving
" No sudo, no problem
cmap w!! w !sudo tee >/dev/null %