From 40267398b2552fa4dfa8b6388db30575abb16689 Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Mon, 10 May 2021 16:26:06 -0400 Subject: [PATCH] Add JSONpath plugin to vim --- vim/vimrc.d/jsonpath.vim | 6 ++++++ vimrc.bundles.local | 1 + 2 files changed, 7 insertions(+) create mode 100644 vim/vimrc.d/jsonpath.vim diff --git a/vim/vimrc.d/jsonpath.vim b/vim/vimrc.d/jsonpath.vim new file mode 100644 index 0000000..3939213 --- /dev/null +++ b/vim/vimrc.d/jsonpath.vim @@ -0,0 +1,6 @@ +" Copy path to a named register (* in this case) when calling :JsonPath +let g:jsonpath_register = '*' + +" Define mappings for json buffers +au FileType json noremap d :call jsonpath#echo() +au FileType json noremap g :call jsonpath#goto() diff --git a/vimrc.bundles.local b/vimrc.bundles.local index c66745b..38ea5c9 100644 --- a/vimrc.bundles.local +++ b/vimrc.bundles.local @@ -40,6 +40,7 @@ Plug 'leafgarland/typescript-vim' Plug 'peitalin/vim-jsx-typescript' Plug 'jparise/vim-graphql' Plug 'styled-components/vim-styled-components', { 'branch': 'main' } +Plug 'mogelbrod/vim-jsonpath' Plug 'junegunn/goyo.vim' Plug 'reedes/vim-pencil'