From 4292d1e5dee0a0349b25d03417d62b4734b60644 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 May 2020 17:46:04 +0200 Subject: [PATCH] [nvim] Add table align plugin; update spell Added alignment plugin. My primary use-case is markdown tables, though the plugin can be used for a lot more than that. Basic use is marking the to-be-aligned area and pressing ga then entering *| (or something else than pipe, if the separator symbol is different). Or doing e.g. gaip to align within paragraph; works as editing command. --- nvim/.config/nvim/init.vim | 4 ++++ nvim/.config/nvim/maps.vim | 7 +++++++ nvim/.config/nvim/spell/en.utf-8.add | 2 ++ 3 files changed, 13 insertions(+) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index ab943f3..a071eec 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -40,6 +40,7 @@ Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragraphs etc w Plug 'tpope/vim-surround' " lets you change surrounding things with cs (or ds to del, ys to add) Plug 'tommcdo/vim-exchange' " adds exchange operator with cx. common use: cxiw . on 2 words to switch Plug 'jiangmiao/auto-pairs' " Auto close brackets and '' +Plug 'junegunn/vim-easy-align' " Align tables and other alignable things Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show a directory listing within vim Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show git status in nerdtree for files and dirs @@ -169,6 +170,9 @@ iabbrev waht what iabbrev tehn then iabbrev whit with iabbrev whith with +iabbrev grwoth growth +iabbrev teh the +iabbrev projcets projects " Text expansion iabbrev mo@ marty.oehme@gmail.com diff --git a/nvim/.config/nvim/maps.vim b/nvim/.config/nvim/maps.vim index 46e6a7a..0157d35 100644 --- a/nvim/.config/nvim/maps.vim +++ b/nvim/.config/nvim/maps.vim @@ -215,6 +215,7 @@ let g:wiki_mappings_global = { \ '(wiki-tag-search)' : '=====================', \ '(wiki-link-toggle-operator)' : '======================', \} +au Filetype markdown,pandoc nnoremap gf :ZettelOpenAtCursor " Mostly dealing with Prose writing from here on out " Format current Paragraph (esp useful in prose writing) @@ -257,3 +258,9 @@ nnoremap po :DocCompileOpen nnoremap PO :DocCompileOpen! nnoremap o :DocOpen nnoremap O :DocOpen! + +" PLUGIN: easy-align +" Start interactive EasyAlign in visual mode (e.g. vipga) +xmap ga (EasyAlign) +" Start interactive EasyAlign for a motion/text object (e.g. gaip) +nmap ga (EasyAlign) diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add index 660c01d..e6c7cc3 100644 --- a/nvim/.config/nvim/spell/en.utf-8.add +++ b/nvim/.config/nvim/spell/en.utf-8.add @@ -34,3 +34,5 @@ artifactual autarky Kyrgyzstan UNSC +plugin +Solidarność