homelab/roles/remote_env/files/home/.vimrc

100 lines
2.1 KiB
VimL

set background=dark
colorscheme habamax
syntax on
filetype on
filetype plugin on
filetype indent on
set nocompatible " don't bother with vi compatibility
set autoread " reload files when changed on disk, i.e. via `git checkout`
set shortmess=atI
set magic " For regular expressions turn magic on
set title " change the terminal's title
set nobackup " do not keep a backup file
set novisualbell " turn off visual bell
set noerrorbells " don't beep
set visualbell t_vb= " turn off error beep/flash
set t_vb=
set tm=500
set selection=inclusive
set selectmode=mouse,key
set backspace=indent,eol,start
set statusline=%<%f\ %h%m%r%=%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ %-14.(%l,%c%V%)\ %P
set laststatus=2 " Always show the status line - use 2 lines for the status bar
"" -------
let mapleader=" "
let g:mapleader=" "
let maplocalleader=" "
set history=2000
set diffopt=vertical,closeoff,filler
set completeopt=noselect,menu,menuone,noinsert,popup
set breakindent
set autowrite
set conceallevel=2
set confirm
set cursorline
set expandtab
set formatoptions=jcroqlnt
set grepformat=%f:%l:%c:%m
set ignorecase
set laststatus=0
set mouse=a
set number
set ruler
set showmode
set nrformats="unsigned,bin,hex
set relativenumber
set scrolloff=15
set sessionoptions=buffers,curdir,tabpages,winsize
set shiftround
set shiftwidth=2
set sidescrolloff=8
set signcolumn=yes
set smartcase
set smartindent
set spelllang=en
set splitbelow
set splitright
set tabstop=2
set termguicolors
set undofile
set undolevels=10000
set updatetime=200
set wildmode=longest,list:full
set winminwidth=5
set nowrap
"" -------
autocmd BufRead,BufNew *.md,*.mkd,*.markdown set filetype=markdown
"" -------
" map <C-j> <C-W>j
" map <C-k> <C-W>k
" map <C-h> <C-W>h
" map <C-l> <C-W>l
nnoremap \| :vs<CR>
nnoremap \° :sp<CR>
vnoremap p "_dP
nnoremap <Leader>uh <CMD>nohl<CR>
nnoremap <leader>bc <Cmd>bd<CR>
nnoremap <leader>bh <Cmd>bp<CR>
nnoremap <leader>bl <Cmd>bn<CR>
nnoremap <leader>bA <Cmd>bufdo bd<CR>
nnoremap J mzJ`z
nnoremap Q" <nop>