From 38cc825547e579fbab261827be6d9ba32c107a62 Mon Sep 17 00:00:00 2001 From: la-ninpre Date: Thu, 3 Jun 2021 01:01:56 +0300 Subject: nvim: small refactor and add little things --- .config/nvim/init.vim | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 4e02ede..bb476e4 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -23,9 +23,10 @@ set wildmenu " more intuitive splits set splitbelow splitright -" don't highlight everything when search and move cursor to the searched word -set nohlsearch incsearch +" search options +set nohlsearch incsearch ignorecase smartcase showmatch +" ruler set rulerformat=%35(%{strftime('%F\ %H:%M')}%=%l/%L%=%c%V%=%p%%\ %) " expand tabs to spaces @@ -70,6 +71,7 @@ Plug 'tpope/vim-surround' Plug 'mbbill/undotree' Plug 'dense-analysis/ale' Plug 'cespare/vim-toml' +Plug 'https://tildegit.org/sloum/gemini-vim-syntax' call plug#end() filetype plugin indent on @@ -114,10 +116,8 @@ nnoremap vc :e ~/.config/nvim/init.vim nnoremap sl :set list nnoremap sn :set nolist -" goyo and limelight +" goyo nnoremap go :Goyo -autocmd! User GoyoEnter Limelight -autocmd! User GoyoLeave Limelight! " actually magick! " this moves higlighted block up or down @@ -127,18 +127,19 @@ vnoremap K :m '<-2gv=gv " alias for capturing group in command mode (for use with regexps) cmap ;( \(\) +" +" autocommands +" + +" limelight on when goyo +autocmd! User GoyoEnter Limelight +autocmd! User GoyoLeave Limelight! + " fix wrong nvim size when starting in alacritty autocmd VimEnter * :silent exec "!kill -s SIGWINCH $PPID" -" highlight yanked text -" i consider this as transition from visually selecting stuff and yanking it -" to just yank text object without selecting it +" highlight yanked text (needs nvim 0.5.x) augroup highlight_yank autocmd! autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank({timeout = 40}) augroup END - -augroup xmobar_syntax - autocmd! - autocmd BufRead,BufNewFile xmobarrc* set syntax=haskell -augroup END -- cgit v1.2.3