diff options
Diffstat (limited to 'dotfiles/.config/nvim')
-rw-r--r-- | dotfiles/.config/nvim/init.vim | 52 |
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' |