Files
miaou-bash/etc/vim/vimrc.core
T
2026-08-23 01:35:51 +04:00

42 lines
1.2 KiB
Core

" Smart Defaults
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set shiftwidth=2
set tabstop=2
set expandtab
set number
set relativenumber
set splitbelow
filetype plugin indent on
" Show Status
set laststatus=2
highlight StatusLine ctermfg=DarkGrey
" Wild Menu
set wildmenu
set wildmode=list:longest
set wildignore=*.jpg,*.png,*.gif,*.pdf
" Show Cursor
set cursorline
highlight clear CursorLine
highlight link CursorLine CursorColumn
highlight CursorLineNR cterm=italic
" Toggle line/relative numbers
nnoremap <F2> :set number!<CR>
nnoremap <F3> :set relativenumber!<CR>
highlight LineNr ctermfg=DarkGrey
" Sudo Write
command! W silent execute 'write !sudo tee ' . shellescape(@%, 1) . ' >/dev/null'
" Jump to Last Position
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif