aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-05-28 02:06:24 +0300
committerYaroslav <contact@yaroslavps.com>2020-05-28 02:06:24 +0300
commit9fbba9a74eab06cfd3edbbacef36938912ee0ce1 (patch)
tree2a468118f65cd84c1f212a24a941007a886cd1fe
parent11ce3c619f1b50d6bc9ccc9f772600b2ce9f071c (diff)
downloadvimrice-9fbba9a74eab06cfd3edbbacef36938912ee0ce1.tar.gz
vimrice-9fbba9a74eab06cfd3edbbacef36938912ee0ce1.zip
added shortcuts; made shortcuts more comfy to use with russian layout
-rw-r--r--dotfiles/.config/nvim/init.vim52
1 files changed, 36 insertions, 16 deletions
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 <C-h> <C-w>h
map <C-j> <C-w>j
@@ -47,33 +47,46 @@ let mapleader =" "
" Replace all is aliased to S.
nnoremap S :%s//g<Left><Left>
+" with russian layout
+ nnoremap Ы :%s//g<Left><Left>
" Compile document
map <leader>c :!doccompiler <c-r>%<CR>
+" with russian layout
+ map <leader>с :!doccompiler <c-r>%<CR>
" View live preview of document
map <leader>v :LLPStartPreview<CR>
-" Make calcurse notes markdown compatible:
- autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
-
" Spell-check set to F2:
map <F2> :setlocal spell! spelllang=en_us,es,ru<CR>
-" Copy selected text to system clipboard (requires gvim installed):
- vnoremap <C-c> "*y :let @+=@*<CR>
+" Save changes
+ noremap <leader>s :update<CR>
+" with russian layout
+ noremap <leader>ы :update<CR>
" Copy to clipboard
vnoremap <leader>y "+y
nnoremap <leader>Y "+yg_
nnoremap <leader>y "+y
nnoremap <leader>yy "+yy
+" with russian layout
+ vnoremap <leader>н "+y
+ nnoremap <leader>Н "+yg_
+ nnoremap <leader>н "+y
+ nnoremap <leader>нн "+yy
" Paste from clipboard
nnoremap <leader>p "+p
nnoremap <leader>P "+P
vnoremap <leader>p "+p
vnoremap <leader>P "+P
+" with russian layout
+ nnoremap <leader>з "+p
+ nnoremap <leader>З "+P
+ vnoremap <leader>з "+p
+ vnoremap <leader>З "+P
" Enable autocompletion:
set wildmode=longest,list,full
@@ -91,32 +104,39 @@ let mapleader =" "
" Join line with alt
nnoremap <M-j> J
+" with russian layout
+ nnoremap <M-о> J
" Easier tab navigation (similar to qutebrowser)
nnoremap J :tabn<cr>
nnoremap K :tabp<cr>
+" with russian layout
+ nnoremap О :tabn<cr>
+ nnoremap Л :tabp<cr>
" C-T for new tab
nnoremap <C-t> :tabe<Space>
" Navigating with guides
- inoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- vnoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- map <Space><Tab> <Esc>/<++><Enter>"_c4l
+ inoremap <leader><Tab> <Esc>/<++><Enter>"_c4l
+ vnoremap <leader><Tab> <Esc>/<++><Enter>"_c4l
+ map <leader><Tab> <Esc>/<++><Enter>"_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 <Esc>
inoremap wj <Esc>
" 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'