aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-10-16 21:13:10 +0100
committerMatthew Lemon <y@yulqen.org>2024-10-16 21:13:10 +0100
commit33916145c91f6b728726285cafcf261b43cf9d1c (patch)
tree9bfb7705564329a5b6d60560fb5f6d41ecafbb1f
parentaa605705cd1872dd8319e6336440db485b66d9e4 (diff)
Adds a few more bits to minimum vim
-rw-r--r--vim/min-vim28
1 files changed, 25 insertions, 3 deletions
diff --git a/vim/min-vim b/vim/min-vim
index 28d6c7a..7f66d54 100644
--- a/vim/min-vim
+++ b/vim/min-vim
@@ -6,6 +6,7 @@ filetype plugin indent on
let maplocalleader = "\\"
let mapleader = ","
+syntax on
set autoread
set foldmethod=manual
set autowrite
@@ -21,17 +22,19 @@ set history=1000
set ignorecase
set incsearch
set infercase
+set lazyredraw
set laststatus=2
"set list
set listchars=nbsp:%,tab:▸\ ,trail:_,eol:¬,precedes:←,extends:→
set matchtime=8
set nobackup
set nocompatible
-set nohlsearch
+set hlsearch
set nojoinspaces
set nomodeline
set noshelltemp
set noswapfile
+set nocursorline
set noundofile
set nowritebackup
set path+=**
@@ -41,23 +44,43 @@ set scrolloff=5
set shell=bash
set shortmess+=c
set showcmd
+set showbreak=\
set showmatch
set showmode
+set laststatus=0
set signcolumn=number
set splitright
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab
set ttimeout
+set ttyfast
set ttimeoutlen=100
"set viminfo=
set wildmenu
set wildoptions=pum
-set wildmode=full
+set wildmode=longest:full,full
set wildignore=**/__pycache*/**
+set undodir=$HOME/.vimundo
+set undofile
+set undolevels=999
+set undoreload=10000
set wrap
packadd! matchit
+" highlight spaces at the end of line
+highlight WhiteSpaceEOL ctermbg=darkgreen
+match WhiteSpaceEOL /\s$/
+autocmd WinEnter * match WhiteSpaceEOL /\s$/
+
+" after you paste something, press gb to select it in visual mode
+" so that you could format it or do something else
+nnoremap <expr> gb '`[' . strpart(getregtype(), 0, 1) . '`]'
+
nnoremap <leader>ev <C-w>s<C-w>j<C-w>L:e $HOME/.vim/vimrc<cr>
+nnoremap <C-l> :nohl<CR><C-L>
+
+cnoreabbrev w!! w !sudo tee > /dev/null %| " write file with sudo
+
command! W w
if executable('rg')
@@ -71,4 +94,3 @@ augroup end
set background=dark
colorscheme koehler
-syntax on