reupload
This commit is contained in:
142
arch-user/config/vim/vimrc
Normal file
142
arch-user/config/vim/vimrc
Normal file
@@ -0,0 +1,142 @@
|
||||
"########## system ###########
|
||||
set nocompatible
|
||||
set ttyfast
|
||||
set encoding=utf-8
|
||||
set mouse=a
|
||||
set autoread
|
||||
au FocusGained,BufEnter * silent! checktime
|
||||
"#############################
|
||||
|
||||
"######### generic ###########
|
||||
|
||||
" status line
|
||||
set showmode
|
||||
set showcmd
|
||||
set ruler
|
||||
|
||||
" syntax hl
|
||||
syntax enable
|
||||
filetype on
|
||||
filetype plugin on
|
||||
|
||||
" lines
|
||||
set number
|
||||
set relativenumber
|
||||
set numberwidth=3
|
||||
set wrap
|
||||
set showmatch " brackets
|
||||
|
||||
" search
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" tabs
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
set softtabstop=0
|
||||
set noexpandtab
|
||||
|
||||
" scroll
|
||||
set scrolloff=5
|
||||
|
||||
" commands
|
||||
set wildmenu
|
||||
set wildmode=list:longest,full
|
||||
set gdefault
|
||||
|
||||
"###########################################
|
||||
|
||||
"############## file-specific ###############
|
||||
autocmd FileType markdown setlocal spell
|
||||
autocmd FileType gitcommit setlocal spell
|
||||
autocmd FileType markdown setlocal complete+=kspell
|
||||
autocmd FileType gitcommit setlocal complete+=kspell
|
||||
"############################################
|
||||
|
||||
"####### 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>
|
||||
|
||||
"#################################
|
||||
|
||||
"####### custom commands #########
|
||||
" W - Save file as superuser
|
||||
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
|
||||
"#################################
|
||||
|
||||
"######### localization ##########
|
||||
set langmap=ьЬыЫфФпПбБжЖлЛуУяЯаАрРсСтТгГмМнНеЕиИоОчЧцЦдДвВзЗкКхХ;qQwWfFpPbBjJlLuUyYaArRsStTgGmMnNeEiIoOxXcCdDvVzZkKhH
|
||||
" n -> h
|
||||
noremap н х
|
||||
noremap Н Х
|
||||
noremap! <C-н> <C-х>
|
||||
" e -> k
|
||||
noremap е к
|
||||
noremap Е К
|
||||
noremap! <C-е> <C-к>
|
||||
" i -> j
|
||||
noremap и ж
|
||||
noremap И Ж
|
||||
noremap! <C-и> <C-ж>
|
||||
" o -> l
|
||||
noremap о л
|
||||
noremap О Л
|
||||
noremap! <C-о> <C-л>
|
||||
" k -> n
|
||||
noremap к н
|
||||
noremap К Н
|
||||
noremap! <C-к> <C-н>
|
||||
" j -> e
|
||||
noremap й е
|
||||
noremap Й Е
|
||||
noremap! <C-й> <C-е>
|
||||
" l -> i
|
||||
noremap л и
|
||||
noremap Л И
|
||||
noremap! <C-л> <C-и>
|
||||
" h -> o
|
||||
noremap х о
|
||||
noremap Х O
|
||||
noremap! <C-х> <C-о>
|
||||
"#################################
|
||||
|
||||
"############# hacks #############
|
||||
{{ if ne .Env.IS_COMPAT "1" }}
|
||||
autocmd TextYankPost * if (v:event.operator == 'y' || v:event.operator == 'd') | silent! execute 'call system("wl-copy", @")' | endif
|
||||
nnoremap p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
|
||||
{{ end }}
|
||||
"################################
|
||||
Reference in New Issue
Block a user