Skip to content

Commit 2cca20a

Browse files
committed
Update mappings in readme
1 parent b61984c commit 2cca20a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Plug 'mogelbrod/vim-jsonpath'
1818
let g:jsonpath_register = '*'
1919
2020
" Define mappings for json buffers
21-
au FileType json noremap <buffer> <silent> <expr> <leader>p jsonpath#echo()
22-
au FileType json noremap <buffer> <silent> <expr> <leader>g jsonpath#goto()
21+
au FileType json noremap <buffer> <silent> <leader>d :call jsonpath#echo()<CR>
22+
au FileType json noremap <buffer> <silent> <leader>g :call jsonpath#goto()<CR>
2323
```
2424

2525
### Python support in vim
@@ -38,14 +38,14 @@ Mappings are not provided by default but can easily be added to your `.vimrc`.
3838

3939
* If you only want mappings when working with `.json` files:
4040
```vim
41-
au FileType json noremap <buffer> <silent> <expr> <leader>p jsonpath#echo()
42-
au FileType json noremap <buffer> <silent> <expr> <leader>g jsonpath#goto()
41+
au FileType json noremap <buffer> <silent> <leader>d :call jsonpath#echo()<CR>
42+
au FileType json noremap <buffer> <silent> <leader>g :call jsonpath#goto()<CR>
4343
```
4444

45-
* If you want global mappings:
45+
* If you prefer global mappings:
4646
```vim
47-
noremap <silent> <expr> <leader>p jsonpath#echo()
48-
noremap <silent> <expr> <leader>g jsonpath#goto()
47+
noremap <buffer> <silent> <leader>d :call jsonpath#echo()<CR>
48+
noremap <buffer> <silent> <leader>g :call jsonpath#goto()<CR>
4949
```
5050

5151
## Configuration

0 commit comments

Comments
 (0)