guixconfig/data/vimrc

48 lines
875 B
VimL

set nocompatible
filetype off
syntax on
filetype plugin indent on
set encoding=utf-8
let mapleader = " "
" hard tabs
set tabstop=2
" backspace delete like normal
set backspace=2
" reduce extraneous files
set nobackup
set nowritebackup
set noswapfile
set history=50
set ruler " always cursor position
set showcmd " incremental search
set laststatus=2 " always status line
set autowrite " :write before commands
set modelines=0 " modelines are insecure
set nomodeline
set textwidth=80
set colorcolumn=+1
set formatoptions-=t
set number
set numberwidth=5
set splitbelow
set splitright
" ctrl-w movement
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
" use ripgrep if available
if executable('rg')
set grepprg=rg\ --color=never
let $FZF_DEFAULT_COMMAND = 'rg --files-with-matches --color=never ""'
nnoremap \ :Ag<SPACE>
endif