function! s:toFirstCharOfScreenLine() call VSCodeNotify('cursorMove', { 'to': 'wrappedLineFirstNonWhitespaceCharacter' }) endfunction function! s:toLastCharOfScreenLine() call VSCodeNotify('cursorMove', { 'to': 'wrappedLineLastNonWhitespaceCharacter' }) " Offfset cursor moving to the right caused by calling VSCode command in Vim mode call VSCodeNotify('cursorLeft') endfunction nnoremap g0 call toFirstCharOfScreenLine() nnoremap g$ call toLastCharOfScreenLine() " Note: Using these in macro will break it nnoremap gk call VSCodeNotify('cursorMove', { 'to': 'up', 'by': 'wrappedLine', 'value': v:count1 }) nnoremap gj call VSCodeNotify('cursorMove', { 'to': 'down', 'by': 'wrappedLine', 'value': v:count1 })