On my .vimrc I use this:
:map ,p :!clear; grep -E "def \|class " %
to map ,p to the grep that provide Python def and class hierarchy, it work very well.
I try with no success to do the same to get some vuejs structure.
I get what I need on Bash with this is grep:
$ grep -E '^\s+\S+: {|\() {$|<script>|import' /tmp/somevuejs.vue
But when I try to put it on .vimrc:
:map ,j :!clear; grep -E '^\s+\S+: {|\() {$|<script>|import' %
I get this error:
$ vim file.txt
Error detected while processing /home/me/.vimrc:
line 20:
E10: \ should be followed by /, ? or &
I've try multiples escapes combinatoric with no success, neither of this worked:
:map ,j :!clear; grep -E '^//\s+//\S+: {|\() {$|<script>|import' %
:map ,j :!clear; grep -E "^//\s+//\S+: {|\() {$|<script>|import" %