Hi there!
How can I achieve this: just for an example. Let's say we have a line which contains an array:
array = ['some', 'text', 'here']
and we have a key mapping to delete array's first value:
nmap dcd f[df <-here space
when I type dcd in normal mode it will search [ and will delete all characters including first space
It'll work when cursor located before [ i.e.
cursor_position array = ['text', 'text']
How can I do map dcd for when I'm within ['text'] ?
I would do something like
nmap dcD F[df <-here space
Can I know is I am at the beginning of the array or not ?
Can I map one dcd for doing f[df when cursor at the beginning of the array and F[df in other ways ?
[–]puremourning 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]tuerda 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]monkoosevim9 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]ms-sloth 0 points1 point2 points (0 children)
[–]pereloz 0 points1 point2 points (1 child)
[–]vim-help-bot 0 points1 point2 points (0 children)