From 9fbba9a74eab06cfd3edbbacef36938912ee0ce1 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Thu, 28 May 2020 02:06:24 +0300 Subject: added shortcuts; made shortcuts more comfy to use with russian layout --- dotfiles/.config/nvim/init.vim | 52 +++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 16 deletions(-) (limited to 'dotfiles/.config/nvim') diff --git a/dotfiles/.config/nvim/init.vim b/dotfiles/.config/nvim/init.vim index 96fc85f..f72289d 100644 --- a/dotfiles/.config/nvim/init.vim +++ b/dotfiles/.config/nvim/init.vim @@ -1,8 +1,5 @@ let mapleader =" " -" Load Pathogen for plugins: -" execute pathogen#infect() -" execute pathogen#helptags() " Some basics: set nocompatible @@ -24,7 +21,7 @@ let mapleader =" " let g:airline_right_sep='' let g:airline_inactive_collapse=1 -" indentation +" default indentation filetype plugin indent on set tabstop=2 set shiftwidth=2 @@ -34,6 +31,9 @@ let mapleader =" " set splitbelow set splitright +" To avoid switching between keyboards + set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz + " Shortcutting split navigation, saving a keypress: map h map j @@ -47,33 +47,46 @@ let mapleader =" " " Replace all is aliased to S. nnoremap S :%s//g +" with russian layout + nnoremap Ы :%s//g " Compile document map c :!doccompiler % +" with russian layout + map с :!doccompiler % " View live preview of document map v :LLPStartPreview -" Make calcurse notes markdown compatible: - autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown - " Spell-check set to F2: map :setlocal spell! spelllang=en_us,es,ru -" Copy selected text to system clipboard (requires gvim installed): - vnoremap "*y :let @+=@* +" Save changes + noremap s :update +" with russian layout + noremap ы :update " Copy to clipboard vnoremap y "+y nnoremap Y "+yg_ nnoremap y "+y nnoremap yy "+yy +" with russian layout + vnoremap н "+y + nnoremap Н "+yg_ + nnoremap н "+y + nnoremap нн "+yy " Paste from clipboard nnoremap p "+p nnoremap P "+P vnoremap p "+p vnoremap P "+P +" with russian layout + nnoremap з "+p + nnoremap З "+P + vnoremap з "+p + vnoremap З "+P " Enable autocompletion: set wildmode=longest,list,full @@ -91,32 +104,39 @@ let mapleader =" " " Join line with alt nnoremap J +" with russian layout + nnoremap J " Easier tab navigation (similar to qutebrowser) nnoremap J :tabn nnoremap K :tabp +" with russian layout + nnoremap О :tabn + nnoremap Л :tabp " C-T for new tab nnoremap :tabe " Navigating with guides - inoremap /<++>"_c4l - vnoremap /<++>"_c4l - map /<++>"_c4l + inoremap /<++>"_c4l + vnoremap /<++>"_c4l + map /<++>"_c4l inoremap ;gui <++> inoremap жпгш <++> inoremap ñgui <++> -" For normal mode when in terminals (in X I have caps mapped to esc, this replaces it when I don't have X) +" Replace ex mode with gq + map Q gq +" with russian layout + map Й gq + +" For normal mode when can't remap caps to escape inoremap jw inoremap wj " latex pdf viewer let g:livepreview_previewer = 'zathura' -" To avoid switching between keyboards - set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz - " neomake let g:neomake_javascript_enabled_makers = ['eslint'] let g:neomake_javascript_eslint_exe = $PWD .'/node_modules/.bin/eslint' -- cgit v1.2.3