From bb092b628bf0eadd995dc2eecb177b20939e8c3e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 20 Mar 2019 19:41:22 +0100 Subject: [PATCH] add sentence textobject plugin --- .config/nvim/init.vim | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 2cb1cf3..811bb55 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -43,6 +43,11 @@ Plug 'christoomey/vim-tmux-navigator' Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragraphs etc with gc Plug 'tommcdo/vim-exchange' " adds exchange operator with cx. common use: cxiw . on 2 words to switch Plug 'tpope/vim-surround' " lets you change surrounding things with cs (or ds to del, ys to add) + +Plug 'kana/vim-textobj-user' " dependency for most other textobj plugins +Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detection +" and allows you to jump to the *end* of this or last sentence. + Plug 'jiangmiao/auto-pairs' " Auto close brackets and '' " Ecosystem @@ -60,7 +65,7 @@ Plug 'mhartington/nvim-typescript', {'do': './install.sh'} Plug 'valloric/matchtagalways' Plug 'alvan/vim-closetag' -" Markdown Workflow +" Markdown & Prose Workflow Plug 'reedes/vim-pencil' " provide md convenience functions like hard/softwrap Plug 'junegunn/goyo.vim' " provide distraction free writing Plug 'junegunn/limelight.vim' " provide even distraction free-er writing (lowlight paragraphs) @@ -121,6 +126,14 @@ augroup END " enable syntax highlighting for codeblocks WITHIN markdown let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'javascipt', 'go'] +" PLUGIN: vim-textobj-sentence +" enable extended sentence textobject use on md and plaintext files +augroup textobj_sentence + autocmd! + autocmd FileType mkd call textobj#sentence#init() + autocmd FileType txt call textobj#sentence#init() +augroup END + " PLUGIN: vim-pencil " set default wrap mode to hard - I should test which mode works better for " me, though I would venture a guess that hard is preferable