workspace/arch-user/config/vim/vimrc
2025-04-08 22:26:13 +00:00

76 lines
1.5 KiB
VimL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

" don't try to be vi compatible
set nocompatible
" Show matching brackets when text indicator is over them
set showmatch
" Turn on syntax highlighting
syntax on
" Highlight search results
set hlsearch
" Search while typing
set incsearch
" Show line numbers
set number
" Show file stats
set ruler
" W - Save file as superuser
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
"####### remap - colemak-dh #######
" n -> h
noremap n h
noremap N H
noremap! <C-n> <C-h>
" e -> k
noremap e k
noremap e K
noremap! <C-e> <C-k>
" i -> j
noremap i j
noremap I J
noremap! <C-i> <C-j>
" o -> l
noremap o l
noremap O L
noremap! <C-o> <C-l>
" k -> n
noremap k n
noremap K N
noremap! <C-k> <C-n>
" j -> e
noremap j e
noremap J E
noremap! <C-j> <C-e>
" l -> i
noremap l i
noremap L I
noremap! <C-l> <C-i>
" h -> o
noremap h o
noremap H O
noremap! <C-h> <C-o>
"#################################
set langmap=йЙцЦуУкКеЕнНгГшШщЩзЗхХъЪфФыЫвВаАпПрРоОлЛдДжЖэЭяЯчЧсСмМиИтТьЬбБюЮ.\\,;qQwWfFpPbBjJlLuUyY;:[{]}aArRsStTgGmMnNeEiIoO'\"xXcCdDvVzZkKhH\\,<.>/?
noremap о ь
noremap л т
noremap д н
noremap ж г
noremap т о
noremap г д
noremap ь ж
noremap н л
" hacks
set clipboard=unnamedplus
xnoremap "+y y:call system("wl-copy", @")<cr>
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p